Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Runner ¶
type Runner struct {
// contains filtered or unexported fields
}
Runner execute the sub-command lifecycle, wrapper around sub-commands.
func NewRunner ¶
func NewRunner(params *params.Params, ioStreams *genericclioptions.IOStreams, subCmd SubCommand) *Runner
NewRunner instantiate a Runner.
type SubCommand ¶
type SubCommand interface { // Cmd shares the cobra.Command instance. Cmd() *cobra.Command // Complete aggregate data needed for the sub-command primary logic. Complete(params *params.Params, ioStreams *genericclioptions.IOStreams, args []string) error // Validate perform validation against the context collected. Validate() error // Run execute the primary sub-command logic. Run(params *params.Params, ioStreams *genericclioptions.IOStreams) error }
SubCommand defines the methods for a sub-command wrapped with Runner.
Click to show internal directories.
Click to hide internal directories.