register

package
v0.34.0 Latest Latest
Warning

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

Go to latest
Published: May 24, 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 and a Runner object to register a recipe to an environment, with parameters specified using a JSON file or key-value-pairs.

Types

type Runner

type Runner struct {
	ConfigHolder      *framework.ConfigHolder
	ConnectionFactory connections.Factory
	Output            output.Interface
	Workspace         *workspaces.Workspace
	TemplateKind      string
	TemplatePath      string
	PlainHTTP         bool
	TemplateVersion   string
	ResourceType      string
	RecipeName        string
	Parameters        map[string]map[string]any
}

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

func NewRunner

func NewRunner(factory framework.Factory) *Runner

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

func (*Runner) Run

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

Run function creates an ApplicationsManagementClient, gets the environment details, adds the recipe properties to the environment recipes, and creates the environment with the updated recipes. It returns an error if any of the steps fail.

func (*Runner) Validate

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

Validate validates the command line args, sets the workspace, environment, template kind, template path, resource type, recipe name, and parameters, and returns an error if any of these fail.

Jump to

Keyboard shortcuts

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