commands

package
v0.0.0-...-0d671b9 Latest Latest
Warning

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

Go to latest
Published: May 7, 2020 License: Apache-2.0 Imports: 15 Imported by: 0

Documentation

Index

Constants

View Source
const (
	// CompletionFuncNameAction holds the name of the bash function used to autocomplete action flag
	CompletionFuncNameAction = "__c2ae_autocomplete_actions"
	// CompletionFuncNameTriggerType holds the name of the bash function used to autocomplete trigger type flag
	CompletionFuncNameTriggerType = "__c2ae_autocomplete_trigger_types"
	// CompletionFuncNameTargetType holds the name of the bash function used to autocomplete target type flag
	CompletionFuncNameTargetType = "__c2ae_autocomplete_target_types"
)

Variables

This section is empty.

Functions

This section is empty.

Types

type Command

type Command interface {
	CobraCmd() *cobra.Command
}

Command defines a cli Command

func NewAddTargetCommand

func NewAddTargetCommand(c2aeClientFactory cli.APIClientFactory) Command

NewAddTargetCommand creates a new command to create a target on a rule

func NewAddTriggerCommand

func NewAddTriggerCommand(c2aeClientFactory cli.APIClientFactory) Command

NewAddTriggerCommand creates a new command to create a trigger on a rule

func NewCreateCommand

func NewCreateCommand(c2aeClientFactory cli.APIClientFactory) Command

NewCreateCommand creates a new command to create a new rule

func NewDeleteCommand

func NewDeleteCommand(c2aeClientFactory cli.APIClientFactory) Command

NewDeleteCommand creates a new command to delete rules

func NewListCommand

func NewListCommand(c2aeClientFactory cli.APIClientFactory) Command

NewListCommand creates a new command to list all the rules

func NewRootCommand

func NewRootCommand(c2aeClientFactory cli.APIClientFactory, version string) Command

NewRootCommand creates and configure a new cli root command

func NewShowCommand

func NewShowCommand(c2aeClientFactory cli.APIClientFactory) Command

NewShowCommand creates a new command to show a given rule

type CompletionCommand

type CompletionCommand struct {
	// contains filtered or unexported fields
}

CompletionCommand defines a custom Command to deal with auto completion

func NewCompletionCommand

func NewCompletionCommand(rootCommand Command) *CompletionCommand

NewCompletionCommand returns the cobra command used to generate the autocompletion

func (*CompletionCommand) CobraCmd

func (c *CompletionCommand) CobraCmd() *cobra.Command

CobraCmd returns the cobra command

func (*CompletionCommand) GenerateCustomCompletionFuncs

func (c *CompletionCommand) GenerateCustomCompletionFuncs() string

GenerateCustomCompletionFuncs returns the bash script snippets to use for custom autocompletion

Jump to

Keyboard shortcuts

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