show

package
v0.41.0-rc1 Latest Latest
Warning

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

Go to latest
Published: Dec 6, 2024 License: Apache-2.0 Imports: 13 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 recipe details, such as the name, resource type, parameters, parameter details and template path, with the option to customize the output format.

Types

type Runner

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

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

func NewRunner

func NewRunner(factory framework.Factory) *Runner

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

func (*Runner) Run

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

Run retrieves the recipe details and parameters from the Applications Management service and prints them in the specified format. It returns an error if one occurs.

func (*Runner) Validate

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

Validate takes in a command and a slice of strings and validates the command line arguments, setting the workspace, environment, recipe name, portable resource type and output format in the Runner struct. It returns an error if any of the arguments are invalid.

Jump to

Keyboard shortcuts

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