bicep

package
v0.31.0 Latest Latest
Warning

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

Go to latest
Published: Feb 29, 2024 License: Apache-2.0 Imports: 24 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, sets up the command's flags and usage information, and returns the command and the Runner.

Types

type Runner

type Runner struct {
	Bicep             bicep.Interface
	ConfigHolder      *framework.ConfigHolder
	ConnectionFactory connections.Factory
	Output            output.Interface

	File          string
	Target        string
	PlainHTTP     bool
	Destination   *destination
	Template      map[string]any
	TemplateBytes []byte
}

Runner is the runner implementation for the `rad bicep publish` command.

func NewRunner

func NewRunner(factory framework.Factory) *Runner

NewRunner creates a new instance of the `rad bicep publish` runner.

func (*Runner) Run

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

The Run function prepares a Bicep template, extracts the destination, publishes the template to the target, and logs a success message if no errors are encountered. An error is returned if any of the steps fail.

func (*Runner) Validate

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

Runner.Validate parses the command line flags and sets the File and Target fields of the Runner struct, returning an error if the target flag is not in the expected format.

Jump to

Keyboard shortcuts

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