show

package
v0.39.0-rc1 Latest Latest
Warning

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

Go to latest
Published: Oct 9, 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 that can be used to show details of a configured cloud provider credential, with optional flags for output and workspace.

Types

type Runner

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

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

func NewRunner

func NewRunner(factory framework.Factory) *Runner

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

func (*Runner) Run

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

Run attempts to retrieve the credentials for a given cloud provider and prints them in a formatted table. It returns an error if the cloud provider cannot be found or if there is an issue with writing the formatted table.

func (*Runner) Validate

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

Validate checks the workspace, output format, and cloud provider name from the command line arguments and returns an error if any of them are invalid.

Jump to

Keyboard shortcuts

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