Documentation ¶
Index ¶
- type Command
- func (c *Command) Completer(menu.Menu, uuid.UUID) readline.PrefixCompleterInterface
- func (c *Command) Do(m menu.Menu, id uuid.UUID, arguments string) (response commands.Response)
- func (c *Command) Get(id uuid.UUID, arguments string) (response commands.Response)
- func (c *Command) Help(menu.Menu) help.Help
- func (c *Command) Menu(m menu.Menu) bool
- func (c *Command) OS() os.OS
- func (c *Command) Set(id uuid.UUID, arguments string) (response commands.Response)
- func (c *Command) Show(id uuid.UUID, arguments string) (response commands.Response)
- func (c *Command) String() string
- func (c *Command) Unset(id uuid.UUID, arguments string) (response commands.Response)
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Command ¶
type Command struct {
// contains filtered or unexported fields
}
Command is an aggregate structure for a command executed on the command line interface
func NewCommand ¶
func NewCommand() *Command
NewCommand is a factory that builds and returns a Command structure that implements the Command interface
func (*Command) Completer ¶
Completer returns the data that is displayed in the CLI for tab completion depending on the menu the command is for Errors are not returned to ensure the CLI is not interrupted. Errors are logged and can be viewed by enabling debug output in the CLI
func (*Command) Do ¶
Do executes the command and returns a Response to the caller to facilitate changes in the CLI service m, an optional parameter, is the Menu the command was executed from id, an optional parameter, used to identify a specific Agent or Listener arguments, and optional, parameter, is the full unparsed string entered on the command line to include the command itself passed into command for processing
func (*Command) Help ¶
Help returns a help.Help structure that can be used to view a command's Description, Notes, Usage, and an example