show

package
v1.1.1 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Dec 14, 2023 License: GPL-3.0 Imports: 14 Imported by: 0

Documentation

Index

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

func (c *Command) Do(m menu.Menu, id uuid.UUID, arguments string) (response commands.Response)

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

func (c *Command) DoListener(id uuid.UUID, arguments string) (response commands.Response)

DoListener handles the command arguments for the LISTENER menu

func (*Command) DoListenerSetup

func (c *Command) DoListenerSetup(id uuid.UUID, arguments string) (response commands.Response)

DoListenerSetup handles the command arguments for the LISTENERSETUP menu

func (*Command) DoModule

func (c *Command) DoModule(id uuid.UUID, arguments string) (response commands.Response)

func (*Command) Help

func (c *Command) Help(m menu.Menu) help.Help

Help returns a help.Help structure that can be used to view a command's Description, Notes, Usage, and an example

func (*Command) Menu

func (c *Command) Menu(m menu.Menu) bool

Menu checks to see if the command is supported for the provided menu

func (*Command) OS

func (c *Command) OS() os.OS

OS returns the supported operating system the Agent command can be executed on

func (*Command) String

func (c *Command) String() string

String returns the unique name of the command as a string

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL