annotate

package
v0.27.5 Latest Latest
Warning

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

Go to latest
Published: Aug 24, 2023 License: Apache-2.0 Imports: 21 Imported by: 8

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func NewCmdAnnotate

func NewCmdAnnotate(parent string, f cmdutil.Factory, streams genericclioptions.IOStreams) *cobra.Command

NewCmdAnnotate creates the `annotate` command

Types

type AnnotateFlags added in v0.27.0

type AnnotateFlags struct {
	// Common user flags
	All            bool
	AllNamespaces  bool
	DryRunStrategy cmdutil.DryRunStrategy
	FieldManager   string
	FieldSelector  string
	resource.FilenameOptions
	List         bool
	Local        bool
	OutputFormat string

	PrintFlags  *genericclioptions.PrintFlags
	RecordFlags *genericclioptions.RecordFlags

	Selector string

	genericclioptions.IOStreams
	// contains filtered or unexported fields
}

AnnotateFlags directly reflect the information that CLI is gathering via flags. They will be converted to Options, which reflect the runtime requirements for the command. This structure reduces the transformation to wiring and makes the logic itself easy to unit test

func NewAnnotateFlags added in v0.27.0

func NewAnnotateFlags(streams genericclioptions.IOStreams) *AnnotateFlags

NewAnnotateFlags returns a default AnnotateFlags

func (*AnnotateFlags) AddFlags added in v0.27.0

func (flags *AnnotateFlags) AddFlags(cmd *cobra.Command, ioStreams genericclioptions.IOStreams)

AddFlags registers flags for a cli.

func (*AnnotateFlags) ToOptions added in v0.27.0

func (flags *AnnotateFlags) ToOptions(f cmdutil.Factory, cmd *cobra.Command, args []string) (*AnnotateOptions, error)

ToOptions converts from CLI inputs to runtime inputs.

type AnnotateOptions

type AnnotateOptions struct {
	resource.FilenameOptions

	genericclioptions.IOStreams

	PrintObj printers.ResourcePrinterFunc

	Recorder genericclioptions.Recorder
	// contains filtered or unexported fields
}

AnnotateOptions have the data required to perform the annotate operation

func (AnnotateOptions) RunAnnotate

func (o AnnotateOptions) RunAnnotate() error

RunAnnotate does the work

Jump to

Keyboard shortcuts

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