delete

package
v0.6.0-beta.23 Latest Latest
Warning

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

Go to latest
Published: Aug 3, 2023 License: AGPL-3.0 Imports: 14 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Confirm

func Confirm(names []string, in io.Reader) error

Confirm let user double-check what to delete

Types

type DeleteHook

type DeleteHook func(options *DeleteOptions, object runtime.Object) error

type DeleteOptions

type DeleteOptions struct {
	Factory       cmdutil.Factory
	Namespace     string
	LabelSelector string
	AllNamespaces bool
	Force         bool
	GracePeriod   int
	Now           bool
	AutoApprove   bool

	// Names are the resource names
	Names []string
	// ConfirmedNames used to double-check the resource names to delete, sometimes Names are used to build
	// label selector and be set to nil, ConfirmedNames should be used to record the names to be confirmed.
	ConfirmedNames []string
	GVR            schema.GroupVersionResource
	Result         *resource.Result

	PreDeleteHook  DeleteHook
	PostDeleteHook DeleteHook

	genericclioptions.IOStreams
}

func (*DeleteOptions) AddFlags

func (o *DeleteOptions) AddFlags(cmd *cobra.Command)

func (*DeleteOptions) Run

func (o *DeleteOptions) Run() error

Jump to

Keyboard shortcuts

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