Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
Types ¶
type ConfigurablePlugin ¶ added in v0.15.0
type ConfigurablePlugin interface {
// SetConfig allows plugins to store config for use in subcommands
SetConfig(cfg *config.Config)
}
ConfigurablePlugin is an optional interface for plugins that need access to config in subcommands
type FlaggablePlugin ¶
type FlaggablePlugin interface {
Plugin
// SetupFlags allows plugins to add custom flags to their command
SetupFlags(cmd *cobra.Command)
}
FlaggablePlugin is an optional interface for plugins that need custom flags
type Plugin ¶
type Plugin interface {
// Name returns the name of the plugin (used as command name)
Name() string
// Description returns a short description of the plugin
Description() string
// Execute runs the plugin with the given configuration
Execute(config *config.Config) error
}
Plugin defines the interface that all plugins must implement
type Registry ¶
type Registry struct {
// contains filtered or unexported fields
}
Registry holds all registered plugins
func (*Registry) GetPlugins ¶
GetPlugins returns all registered plugins
Click to show internal directories.
Click to hide internal directories.