cli

package
v1.10.0 Latest Latest
Warning

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

Go to latest
Published: Nov 25, 2022 License: Apache-2.0 Imports: 10 Imported by: 12

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func GetConfirmation

func GetConfirmation() bool

GetConfirmation ensures that the user confirms the action before proceeding.

Types

type DeleteOptions

type DeleteOptions struct {
	*SelectOptions
	Confirm   bool
	Client    clientset.Interface
	Namespace string
}

DeleteOptions contains parameters used for deleting a restore.

func NewDeleteOptions

func NewDeleteOptions(singularTypeName string) *DeleteOptions

func (*DeleteOptions) BindFlags

func (o *DeleteOptions) BindFlags(flags *pflag.FlagSet)

BindFlags binds options for this command to flags.

func (*DeleteOptions) Complete

func (o *DeleteOptions) Complete(f client.Factory, args []string) error

Complete fills in the correct values for all the options.

func (*DeleteOptions) Validate

func (o *DeleteOptions) Validate(c *cobra.Command, f client.Factory, args []string) error

Validate validates the fields of the DeleteOptions struct.

type SelectOptions added in v1.10.0

type SelectOptions struct {
	Names            []string
	All              bool
	Selector         flag.LabelSelector
	CMD              string
	SingularTypeName string
}

SelectOptions defines the options for selecting resources

func NewSelectOptions added in v1.10.0

func NewSelectOptions(cmd, singularTypeName string) *SelectOptions

NewSelectOptions creates a new option for selector

func (*SelectOptions) BindFlags added in v1.10.0

func (o *SelectOptions) BindFlags(flags *pflag.FlagSet)

BindFlags binds options for this command to flags.

func (*SelectOptions) Complete added in v1.10.0

func (o *SelectOptions) Complete(args []string) error

Complete fills in the correct values for all the options.

func (*SelectOptions) Validate added in v1.10.0

func (o *SelectOptions) Validate() error

Validate validates the fields of the SelectOptions struct.

Jump to

Keyboard shortcuts

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