list

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 that can be used to list resource groups within the current or specified workspace, and returns a Runner object that can be used to execute the command. It also adds workspace and output flags to the command.

Types

type Runner

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

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

func NewRunner

func NewRunner(factory framework.Factory) *Runner

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

func (*Runner) Run

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

Run creates an ApplicationsManagementClient, retrieves a list of radius resource groups, and writes the results to an output in a formatted way, returning an error if one occurs.

func (*Runner) Validate

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

Validate makes sure the default workspace or the one specified using command flags is valid, and sets the workspace to this value. It also sets the output format to table by default or to the one specified using command flags.

Jump to

Keyboard shortcuts

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