Documentation
¶
Overview ¶
Package plugins provides support for creating extensible CLIs
Index ¶
Constants ¶
This section is empty.
Variables ¶
var ( ErrPluginNotFound = errors.New("plugin not found") ErrPluginInvalid = errors.New("invalid plugin") Prefix = "fission-" )
Functions ¶
func Exec ¶
Exec executes the plugin using the provided args. All input and output is redirected to stdin, stdout, and stderr.
func SearchRegistries ¶
SearchRegistries will search (remote) registries for the presence of the command. For now we only use the builtinRegistry
Types ¶
type Metadata ¶
type Metadata struct { Name string `json:"name,omitempty"` Version string `json:"version,omitempty"` Aliases []string `json:"aliases,omitempty"` Usage string `json:"usage,omitempty"` Path string `json:"path,omitempty"` }
ObjectMeta contains the metadata of a plugin. The only metadata that is guaranteed to be non-empty is the path and Name. All other fields are considered optional.
func Find ¶
Find searches the machine for the given plugin, returning the metadata of the plugin. The only metadata that is guaranteed to be non-empty is the path and Name. All other fields are considered optional. If found it returns the plugin, otherwise it returns ErrPluginNotFound if the plugin was not found.