Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func IsLocalPath ¶ added in v28.4.0
IsLocalPath returns true if the path is a local directory.
Types ¶
type Config ¶
type Config struct { // Apps holds the list of installed Ignite Apps. // Ignite Apps are implemented as plugins. Apps []Plugin `yaml:"apps"` // contains filtered or unexported fields }
func ParseDir ¶
ParseDir expects to find a plugin config file in dir. If dir is not a folder, an error is returned. The plugin config file format can be `igniteapps.yml` or `igniteapps.yaml`. If found, the file is parsed into a Config and returned. If no file from the given names above are found, then an empty config is returned, w/o errors.
type Plugin ¶
type Plugin struct { // Path holds the location of the plugin. // A path can be local, in that case it must start with a `/`. // A remote path on the other hand, is an URL to a public remote git // repository. For example: // // path: github.com/foo/bar // // It can contain a path inside that repository, if for instance the repo // contains multiple plugins, for example: // // path: github.com/foo/bar/plugin1 // // It can also specify a tag or a branch, by adding a `@` and the branch/tag // name at the end of the path. For example: // // path: github.com/foo/bar/plugin1@v42 Path string `yaml:"path"` // With holds arguments passed to the plugin interface With map[string]string `yaml:"with,omitempty"` // Global holds whether the plugin is installed globally // (default: $HOME/.ignite/apps/igniteapps.yml) or locally for a chain. Global bool `yaml:"-"` }
Plugin keeps plugin name and location.
func RemoveDuplicates ¶
RemoveDuplicates takes a list of Plugins and returns a new list with only unique values. Local plugins take precedence over global plugins if duplicate paths exist. Duplicates are compared regardless of version.
func (Plugin) CanonicalPath ¶
CanonicalPath returns the canonical path of a plugin (excludes version ref).
func (Plugin) HasPath ¶
HasPath verifies if a plugin has the given path regardless of version. For example github.com/foo/bar@v1 and github.com/foo/bar@v2 have the same path so "true" will be returned.
func (Plugin) IsGlobal ¶
IsGlobal returns whether the plugin is installed globally or locally for a chain.
func (Plugin) IsLocalPath ¶
IsLocalPath returns true if the plugin path is a local directory.