delete

package
v0.26.7 Latest Latest
Warning

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

Go to latest
Published: Oct 23, 2023 License: Apache-2.0 Imports: 10 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 resource group, which takes in a workspace and resource group

name as arguments, and a confirmation flag, and returns a cobra command and a runner.

Types

type Runner

type Runner struct {
	ConfigHolder         *framework.ConfigHolder
	ConnectionFactory    connections.Factory
	Output               output.Interface
	InputPrompter        prompt.Interface
	Workspace            *workspaces.Workspace
	UCPResourceGroupName string
	Confirmation         bool
}

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

func NewRunner

func NewRunner(factory framework.Factory) *Runner

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

func (*Runner) Run

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

Run checks if the user has confirmed the deletion of the resource group, and if so, deletes the resource group and returns an error if unsuccessful.

func (*Runner) Validate

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

Validate checks if the required workspace, resource group and confirmation flag are present and sets them in the Runner struct if they are. It returns an error if any of these are not present.

Jump to

Keyboard shortcuts

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