Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
Types ¶
type CmdOptions ¶
type CmdOptions struct { Flags *Flags FlagSet *pflag.FlagSet Client discovery.CachedDiscoveryInterface genericclioptions.IOStreams }
CmdOptions contains all the options for running the command.
func (*CmdOptions) Complete ¶
func (o *CmdOptions) Complete(cmd *cobra.Command, _ []string) error
Complete completes all the required options for the command.
func (*CmdOptions) Run ¶
func (o *CmdOptions) Run() error
Run implements all the necessary functionality for the command.
func (*CmdOptions) Validate ¶
func (o *CmdOptions) Validate() error
Validate validates all the required options for the command.
type Flags ¶
type Flags struct { *genericclioptions.ConfigFlags APIGroup string Cached bool Categories []string Namespaced bool NoHeaders bool Output string SortBy string }
Flags composes common configuration flag structs used in the command.
func NewFlags ¶
func NewFlags() *Flags
NewFlags returns flags associated with command configuration, with default values set.
func (*Flags) AddFlags ¶
AddFlags receives a *pflag.FlagSet reference and binds flags related to configuration to it.
func (*Flags) ToDiscoveryClient ¶
func (f *Flags) ToDiscoveryClient() (discovery.CachedDiscoveryInterface, error)
ToClient returns a client based on the flag configuration.
Click to show internal directories.
Click to hide internal directories.