Documentation
¶
Index ¶
- Variables
- func New() *cobra.Command
- type Builder
- func (cb *Builder) Args(args func(*cobra.Command, []string) error) *Builder
- func (cb *Builder) Build() icommand.Command
- func (cb *Builder) BuildWithValidation() icommand.Command
- func (cb *Builder) Condition(fn func(iapi.Api, *client.Client) bool) *Builder
- func (cb *Builder) DependsOn(fns ...func(iapi.Api, *client.Client, []string)) *Builder
- func (cb *Builder) Flags(flags func(cmd *cobra.Command)) *Builder
- func (cb *Builder) Function(fn func(iapi.Api, *client.Client, []string)) *Builder
- func (cb *Builder) Name(name string) *Builder
- func (cb *Builder) Parent(parent string) *Builder
- func (cb *Builder) Validate() error
- type Command
- func (command Command) GetArgs() func(*cobra.Command, []string) error
- func (command Command) GetCommand() func(iapi.Api, *client.Client, []string)
- func (command Command) GetCondition(api iapi.Api, cli *client.Client) bool
- func (command Command) GetDependsOn() []func(iapi.Api, *client.Client, []string)
- func (command Command) GetFlags() func(command *cobra.Command)
- func (command Command) GetName() string
- func (command Command) GetParent() string
- func (command Command) SetFlags(cmd *cobra.Command)
Constants ¶
This section is empty.
Variables ¶
Functions ¶
Types ¶
type Builder ¶
type Builder struct {
// contains filtered or unexported fields
}
func NewBuilder ¶
func NewBuilder() *Builder
func (*Builder) BuildWithValidation ¶
type Command ¶
type Command struct {
Parent string
Name string
Flag string
Args func(*cobra.Command, []string) error
Condition func(iapi.Api, *client.Client) bool
Command func(iapi.Api, *client.Client, []string)
DependsOn []func(iapi.Api, *client.Client, []string)
Flags func(command *cobra.Command)
}
func (Command) GetCommand ¶
func (Command) GetCondition ¶
func (Command) GetDependsOn ¶
Click to show internal directories.
Click to hide internal directories.