Documentation ¶
Overview ¶
Package plugincmdtree provides functionality for constructing and maintaining the plugin command trees
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func GetPluginsCommandTreeCachePath ¶
func GetPluginsCommandTreeCachePath() string
Types ¶
type Cache ¶
type Cache interface { // GetTree returns the plugin command tree // If the plugin command tree doesn't exist, it constructs and adds the command tree to the cache // and then returns the plugin command tree, otherwise it returns error GetTree(plugin *cli.PluginInfo) (*CommandNode, error) // ConstructAndAddTree constructs and adds the plugin command tree to the cache // If the plugin command tree already exists, it returns success immediately ConstructAndAddTree(plugin *cli.PluginInfo) error // DeleteTree deletes the plugin command tree from the cache DeleteTree(plugin *cli.PluginInfo) error }
Cache is the local cache for storing and accessing command trees of different plugins
type CommandNode ¶
type CommandNode struct { Subcommands map[string]*CommandNode `yaml:"subcommands" json:"subcommands"` Aliases map[string]struct{} `yaml:"aliases" json:"aliases"` AliasProcessed bool `yaml:"-" json:"-"` }
func NewCommandNode ¶
func NewCommandNode() *CommandNode
Click to show internal directories.
Click to hide internal directories.