Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func NewCommand ¶
NewCommand creates a new Cobra command and a Runner to list resources of a specified type in an application or the default environment, and adds flags for application name, resource group, output and workspace.
Types ¶
type Runner ¶
type Runner struct {
ConfigHolder *framework.ConfigHolder
UCPClientFactory *v20231001preview.ClientFactory
ConnectionFactory connections.Factory
Output output.Interface
Workspace *workspaces.Workspace
ApplicationName string
Format string
ResourceType string
ResourceTypeSuffix string
ResourceProviderNamespace string
}
Runner is the runner implementation for the `rad resource list` command.
func (*Runner) Run ¶
Run checks if an application name is provided and if so, checks if the application exists in the workspace, then lists all resources of the specified type in the application, and finally writes the resources to the output in the specified format. If no application name is provided, it lists all resources of the specified type. An error is returned if the application does not exist in the workspace.