apicategories

package
v0.1.0 Latest Latest
Warning

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

Go to latest
Published: Nov 15, 2021 License: Apache-2.0 Imports: 16 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func NewCmd

func NewCmd(streams genericclioptions.IOStreams, name, parentCmdPath string) *cobra.Command

NewCmd returns an initialized Command for the command.

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

func (f *Flags) AddFlags(flags *pflag.FlagSet)

AddFlags receives a *pflag.FlagSet reference and binds flags related to configuration to it.

func (*Flags) Copy

func (f *Flags) Copy() Flags

Copy returns a copy of Flags for mutation.

func (*Flags) ToDiscoveryClient

func (f *Flags) ToDiscoveryClient() (discovery.CachedDiscoveryInterface, error)

ToClient returns a client based on the flag configuration.

Jump to

Keyboard shortcuts

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