list

package
v0.35.0-rc1 Latest Latest
Warning

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

Go to latest
Published: Jun 19, 2024 License: Apache-2.0 Imports: 12 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 and a Runner object, configures the command with flags and arguments, and returns the command and the runner.

Types

type Runner

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

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

func NewRunner

func NewRunner(factory framework.Factory) *Runner

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

func (*Runner) Run

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

Run retrieves environment recipes from the given workspace and writes them to the output in the specified format. It returns an error if the connection to the workspace fails or if there is an error writing to the output.

func (*Runner) Validate

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

Validate checks the command line arguments for a workspace, environment name, and output format, and sets the corresponding fields in the Runner struct if they are valid. If any of the arguments are invalid, an error is returned.

Jump to

Keyboard shortcuts

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