Documentation ¶
Index ¶
- type Command
- func (c *Command) Completer(m menu.Menu, id uuid.UUID) (comp readline.PrefixCompleterInterface)
- func (c *Command) Do(m menu.Menu, id uuid.UUID, arguments string) (response commands.Response)
- func (c *Command) DoListener(id uuid.UUID, arguments string) (response commands.Response)
- func (c *Command) DoListenerSetup(id uuid.UUID, arguments string) (response commands.Response)
- func (c *Command) DoModule(id uuid.UUID, arguments string) (response commands.Response)
- func (c *Command) Help(m menu.Menu) help.Help
- func (c *Command) Menu(m menu.Menu) bool
- func (c *Command) OS() os.OS
- func (c *Command) String() string
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) DoListener ¶
DoListener handles the command arguments for the listener menu
func (*Command) DoListenerSetup ¶
DoListenerSetup handles the command arguments for the listener menu
func (*Command) Help ¶
Help returns a help.Help structure that can be used to view a command's Description, Notes, Usage, and an example