delete

package
v0.33.0 Latest Latest
Warning

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

Go to latest
Published: Apr 25, 2024 License: Apache-2.0 Imports: 9 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func NewCommand

func NewCommand(factory framework.Factory) (*cobra.Command, framework.Runner)

NewCommand creates a new cobra command for deleting a workspace, with flags for workspace name and confirmation, and returns it along with a Runner to execute the command.

Types

type Runner

type Runner struct {
	ConfigHolder        *framework.ConfigHolder
	ConfigFileInterface framework.ConfigFileInterface
	Output              output.Interface
	InputPrompter       prompt.Interface
	Workspace           *workspaces.Workspace
	Confirm             bool
}

Runner is the runner implementation for the `rad workspace delete` command.

func NewRunner

func NewRunner(factory framework.Factory) *Runner

NewRunner creates a new instance of the `rad workspace delete` runner.

func (*Runner) Run

func (r *Runner) Run(ctx context.Context) error

Run prompts the user to confirm the deletion of a workspace, and if confirmed, deletes the workspace from the config file, returning an error if one occurs.

func (*Runner) Validate

func (r *Runner) Validate(cmd *cobra.Command, args []string) error

Validate checks if the workspace is valid and sets the workspace and confirmation flags accordingly, returning an error if the workspace is not stored in configuration.

Jump to

Keyboard shortcuts

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