unregister

package
v0.34.0 Latest Latest
Warning

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

Go to latest
Published: May 24, 2024 License: Apache-2.0 Imports: 13 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 unregistering a recipe from an environment, which takes in a factory and returns a cobra command and a runner. It also sets up flags for output, workspace, resource group, environment name and portable resource type, with resource-type being a required flag.

Types

type Runner

type Runner struct {
	ConfigHolder      *framework.ConfigHolder
	ConnectionFactory connections.Factory
	Output            output.Interface
	Workspace         *workspaces.Workspace
	RecipeName        string
	ResourceType      string
}

Runner is the runner implementation for the `rad recipe unregister` command.

func NewRunner

func NewRunner(factory framework.Factory) *Runner

NewRunner creates a new instance of the `rad recipe unregister` runner.

func (*Runner) Run

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

Run checks if a recipe exists in an environment, deletes the recipe from the environment's properties, and then creates the environment with the updated properties. It returns an error if any of these steps fail.

func (*Runner) Validate

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

// Runner.Validate checks the command line arguments for a workspace, environment, recipe name, and resource type, and 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