destroy

package
v0.11.1 Latest Latest
Warning

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

Go to latest
Published: Apr 30, 2024 License: Apache-2.0 Imports: 20 Imported by: 1

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func NewCmdDestroy

func NewCmdDestroy(ui *terminal.UI, ioStreams genericiooptions.IOStreams) *cobra.Command

NewCmdDestroy creates the `delete` command.

Types

type DeleteFlags added in v0.11.1

type DeleteFlags struct {
	MetaFlags *meta.MetaFlags

	Operator string
	Yes      bool
	Detail   bool
	NoStyle  bool

	UI *terminal.UI

	genericiooptions.IOStreams
}

DeleteFlags directly reflect the information that CLI is gathering via flags. They will be converted to DeleteOptions, 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 NewDeleteFlags added in v0.11.1

func NewDeleteFlags(ui *terminal.UI, streams genericiooptions.IOStreams) *DeleteFlags

NewDeleteFlags returns a default DeleteFlags

func (*DeleteFlags) AddFlags added in v0.11.1

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

AddFlags registers flags for a cli.

func (*DeleteFlags) ToOptions added in v0.11.1

func (flags *DeleteFlags) ToOptions() (*DeleteOptions, error)

ToOptions converts from CLI inputs to runtime inputs.

type DeleteOptions added in v0.11.1

type DeleteOptions struct {
	*meta.MetaOptions

	Operator string
	Yes      bool
	Detail   bool
	NoStyle  bool

	UI *terminal.UI

	genericiooptions.IOStreams
}

DeleteOptions defines flags and other configuration parameters for the `delete` command.

func (*DeleteOptions) Run added in v0.11.1

func (o *DeleteOptions) Run() error

Run executes the `delete` command.

func (*DeleteOptions) Validate added in v0.11.1

func (o *DeleteOptions) Validate(cmd *cobra.Command, args []string) error

Validate verifies if DeleteOptions are valid and without conflicts.

Jump to

Keyboard shortcuts

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