annotate

package
v0.29.11 Latest Latest
Warning

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

Go to latest
Published: Nov 21, 2024 License: Apache-2.0 Imports: 23 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 genericiooptions.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

	genericiooptions.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 genericiooptions.IOStreams) *AnnotateFlags

NewAnnotateFlags returns a default AnnotateFlags

func (*AnnotateFlags) AddFlags added in v0.27.0

func (flags *AnnotateFlags) AddFlags(cmd *cobra.Command, ioStreams genericiooptions.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

	genericiooptions.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