Documentation ¶
Index ¶
- Variables
- type CommandSpec
- type Config
- type ConfigSpec
- type Engine
- func (e *Engine) Execute(pluginName string, args []string) (err error)
- func (e *Engine) LoadPlugin(manifestPath string) (p *Plugin, err error)
- func (e *Engine) LoadPlugins() (plugins Plugins)
- func (e *Engine) NewExecutablePlugin(p *Plugin, config map[string]interface{}) (execP *ExecutablePlugin, err error)
- type ExecutablePlugin
- type Manifest
- type Option
- type Plugin
- type PluginSpec
- type Plugins
Constants ¶
This section is empty.
Variables ¶
View Source
var ErrNoPluginWithNameFound = fmt.Errorf("no plugin with that name could be found in the pluginCache")
Functions ¶
This section is empty.
Types ¶
type CommandSpec ¶ added in v0.9.8
type CommandSpec struct { Cmd string `yaml:"cmd"` Help string `yaml:"help,omitempty"` Subcommands []CommandSpec `yaml:"subcommands,omitempty"` }
type ConfigSpec ¶ added in v0.9.8
type ConfigSpec struct { Values map[string]string Static map[string]interface{} Dynamic map[string]string }
func ResolveDynamic ¶ added in v0.9.8
func ResolveDynamic(c ConfigSpec, e *Engine) (cfg ConfigSpec, err error)
type Engine ¶ added in v0.9.8
type Engine struct {
// contains filtered or unexported fields
}
func (*Engine) LoadPlugin ¶ added in v0.9.8
func (*Engine) LoadPlugins ¶ added in v0.9.8
func (*Engine) NewExecutablePlugin ¶ added in v0.9.8
func (e *Engine) NewExecutablePlugin(p *Plugin, config map[string]interface{}) (execP *ExecutablePlugin, err error)
type ExecutablePlugin ¶ added in v0.9.8
func (*ExecutablePlugin) Exec ¶ added in v0.9.8
func (execP *ExecutablePlugin) Exec(args []string) (err error)
type Manifest ¶ added in v0.9.8
type Manifest struct { Version string `yaml:"version"` PluginSpec `yaml:"plugin"` }
type PluginSpec ¶ added in v0.9.8
type PluginSpec struct { *CommandSpec `yaml:"cmd,inline"` Name string `yaml:"name"` Pkg string `yaml:"pkg"` Config ConfigSpec `yaml:"config,omitempty"` }
Click to show internal directories.
Click to hide internal directories.