show

package
v0.27.0-rc2 Latest Latest
Warning

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

Go to latest
Published: Nov 9, 2023 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 and a new Runner, and configures the command with the Runner, common flags, and

usage information.

Types

type Runner

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

Runner is the runner implementation for the `rad resource show` command.

func NewRunner

func NewRunner(factory framework.Factory) *Runner

NewRunner creates a new instance of the `rad resource show` runner.

func (*Runner) Run

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

Run creates a connection to an applications management client, retrieves resource details, and writes the details in a specified format to an output. It returns an error if any of these steps fail.

func (*Runner) Validate

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

Validate checks the workspace, scope, resource type and name, and output format from the command line arguments and config, and sets them in the Runner struct. It returns an error if any of these values are not valid.

Jump to

Keyboard shortcuts

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