Documentation ¶
Overview ¶
nolint
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func NewCmd ¶
func NewCmd(parent string, f cmdutil.Factory, configFlags *genericclioptions.ConfigFlags, streams genericclioptions.IOStreams, mapping *meta.RESTMapping, resourcePath, resourceNamePlural string) *cobra.Command
NewCmd creates a command object for the generic "get" action, which retrieves one or more resources from a server.
Types ¶
type NopPositioner ¶
type NopPositioner struct{}
NopPositioner and OriginalPositioner is required for swap/sort operations of data in table format
func (*NopPositioner) OriginalPosition ¶
func (t *NopPositioner) OriginalPosition(ix int) int
OriginalPosition returns the original position from NopPositioner object
type Options ¶
type Options struct { PrintFlags *kubectlget.PrintFlags ToPrinter func(*meta.RESTMapping, *bool, bool, bool) (printers.ResourcePrinterFunc, error) IsHumanReadablePrinter bool PrintWithOpenAPICols bool CmdParent string resource.FilenameOptions Watch bool ChunkSize int64 OutputWatchEvents bool LabelSelector string FieldSelector string ServerPrint bool NoHeaders bool Sort bool IgnoreNotFound bool genericclioptions.IOStreams // contains filtered or unexported fields }
Options contains the input to the get command.
func NewOptions ¶
func NewOptions(parent string, configFlags *genericclioptions.ConfigFlags, streams genericclioptions.IOStreams, mapping *meta.RESTMapping, resourcePath string) *Options
NewOptions returns a Options with default chunk size 500.
func (*Options) Complete ¶
Complete takes the command arguments and factory and infers any remaining options.
type OriginalPositioner ¶
OriginalPositioner and NopPositioner is required for swap/sort operations of data in table format
type RuntimeSorter ¶
type RuntimeSorter struct {
// contains filtered or unexported fields
}
RuntimeSorter holds the required objects to perform sorting of runtime objects
func NewRuntimeSorter ¶
func NewRuntimeSorter(objects []runtime.Object, sortBy string) *RuntimeSorter
NewRuntimeSorter returns a new instance of RuntimeSorter
func (*RuntimeSorter) OriginalPosition ¶
func (r *RuntimeSorter) OriginalPosition(ix int) int
OriginalPosition returns the original position of a runtime object
func (*RuntimeSorter) Sort ¶
func (r *RuntimeSorter) Sort() error
Sort performs the sorting of runtime objects
func (*RuntimeSorter) WithDecoder ¶
func (r *RuntimeSorter) WithDecoder(decoder runtime.Decoder) *RuntimeSorter
WithDecoder allows custom decoder to be set for testing