Documentation ¶
Index ¶
- Constants
- type Command
- func NewAddTargetCommand(c2aeClientFactory cli.APIClientFactory) Command
- func NewAddTriggerCommand(c2aeClientFactory cli.APIClientFactory) Command
- func NewCreateCommand(c2aeClientFactory cli.APIClientFactory) Command
- func NewDeleteCommand(c2aeClientFactory cli.APIClientFactory) Command
- func NewListCommand(c2aeClientFactory cli.APIClientFactory) Command
- func NewRootCommand(c2aeClientFactory cli.APIClientFactory, version string) Command
- func NewShowCommand(c2aeClientFactory cli.APIClientFactory) Command
- type CompletionCommand
Constants ¶
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 ¶
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