delete

package
v0.31.3 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: 68

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func NewCmdDelete

func NewCmdDelete(f cmdutil.Factory, streams genericiooptions.IOStreams) *cobra.Command

Types

type DeleteFlags

type DeleteFlags struct {
	FileNameFlags *genericclioptions.FileNameFlags
	LabelSelector *string
	FieldSelector *string

	All               *bool
	AllNamespaces     *bool
	CascadingStrategy *string
	Force             *bool
	GracePeriod       *int
	IgnoreNotFound    *bool
	Now               *bool
	Timeout           *time.Duration
	Wait              *bool
	Output            *string
	Raw               *string
	Interactive       *bool
}

DeleteFlags composes common printer flag structs used for commands requiring deletion logic.

func NewDeleteCommandFlags

func NewDeleteCommandFlags(usage string) *DeleteFlags

NewDeleteCommandFlags provides default flags and values for use with the "delete" command

func NewDeleteFlags

func NewDeleteFlags(usage string) *DeleteFlags

NewDeleteFlags provides default flags and values for use in commands outside of "delete"

func (*DeleteFlags) AddFlags

func (f *DeleteFlags) AddFlags(cmd *cobra.Command)

func (*DeleteFlags) ToOptions

func (f *DeleteFlags) ToOptions(dynamicClient dynamic.Interface, streams genericiooptions.IOStreams) (*DeleteOptions, error)

type DeleteOptions

type DeleteOptions struct {
	resource.FilenameOptions

	LabelSelector       string
	FieldSelector       string
	DeleteAll           bool
	DeleteAllNamespaces bool
	CascadingStrategy   metav1.DeletionPropagation
	IgnoreNotFound      bool
	DeleteNow           bool
	ForceDeletion       bool
	WaitForDeletion     bool
	Quiet               bool
	WarnClusterScope    bool
	Raw                 string
	Interactive         bool

	GracePeriod int
	Timeout     time.Duration

	DryRunStrategy cmdutil.DryRunStrategy

	Output string

	DynamicClient dynamic.Interface
	Mapper        meta.RESTMapper
	Result        *resource.Result
	PreviewResult *resource.Result

	genericiooptions.IOStreams
	WarningPrinter *printers.WarningPrinter
	// contains filtered or unexported fields
}

func (*DeleteOptions) Complete

func (o *DeleteOptions) Complete(f cmdutil.Factory, args []string, cmd *cobra.Command) error

func (*DeleteOptions) DeleteResult

func (o *DeleteOptions) DeleteResult(r *resource.Result) error

func (*DeleteOptions) PrintObj

func (o *DeleteOptions) PrintObj(info *resource.Info)

PrintObj for deleted objects is special because we do not have an object to print. This mirrors name printer behavior

func (*DeleteOptions) RunDelete

func (o *DeleteOptions) RunDelete(f cmdutil.Factory) error

func (*DeleteOptions) Validate

func (o *DeleteOptions) Validate() error

Jump to

Keyboard shortcuts

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