Documentation ¶
Index ¶
Constants ¶
const ( // XDGDataHome is the directory to search for data files in the XDG spec XDGDataHome = "XDG_DATA_HOME" // XDGDataDirs defines an additional list of directories which can be searched for data files XDGDataDirs = "XDG_DATA_DIRS" )
Variables ¶
This section is empty.
Functions ¶
func CacheDirectory ¶ added in v0.22.0
func CacheDirectory() string
CacheDirectory returns the full path to the cache directory where all of the plugins are stored.
func Install ¶ added in v0.22.0
Install installs the plugin to the host machine from either a path on the file system, or a URL. A configuration file must be present and valid at the source in order for the installation to complete successfully.
If the installation is successful, the plugin will be saved to the plugin cache inside of a folder named the same name of the plugin as defined in the plugins configuration file.
Types ¶
type Plugin ¶
type Plugin struct { Name string `yaml:"name"` Version string `yaml:"version"` Usage string `yaml:"usage"` Description string `yaml:"description"` Command string `yaml:"command"` }
Plugin represents a plugin.
func FindAll ¶ added in v0.22.0
FindAll finds all of the plugins available on the local file system.
func FromDirectory ¶ added in v0.22.0
FromDirectory returns a plugin from a specific directory.
The given directory must contain a plugin configuration file in order to return successfully.
func Load ¶ added in v0.22.0
Load loads a plugin given the name of the plugin. The name of the plugin is defined in the plugin configuration and is stored in a folder with the name of the plugin.