Help us shape the future of Go! Take the 2026 Go Developer Survey

workflow

package
v1.25.3 Latest Latest
Warning

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

Go to latest
Published: May 29, 2026 License: MIT Imports: 7 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type AzdCommandRunner

type AzdCommandRunner interface {
	ExecuteContext(ctx context.Context, args []string) error
}

AzdCommandRunner abstracts the execution of an azd command given a set of arguments and context.

type Command

type Command struct {
	Args []string `yaml:"args,omitempty"`
}

Command stores a single command to execute

func (*Command) UnmarshalYAML

func (c *Command) UnmarshalYAML(unmarshal func(any) error) error

UnmarshalYAML will unmarshal the Command from YAML. In command YAML the command can be specified as a simple string or a more verbose map/struct style

type Runner

type Runner struct {
	// contains filtered or unexported fields
}

Runner is responsible for executing a workflow

func NewRunner

func NewRunner(azdRunner AzdCommandRunner, console input.Console) *Runner

NewRunner creates a new instance of the Runner.

func (*Runner) Run

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

Run executes the specified workflow against the root cobra command

type Step

type Step struct {
	AzdCommand Command `yaml:"azd,omitempty"`
}

Step stores a single step to execute within a workflow This struct can be expanded over time to support other types of steps/commands

func NewAzdCommandStep

func NewAzdCommandStep(args ...string) *Step

NewAzdCommandStep creates a new step that executes an azd command with the specified name and args

type Workflow

type Workflow struct {
	Name  string  `yaml:"-"`
	Steps []*Step `yaml:"steps,omitempty"`
}

Workflow stores a list of steps to execute

func (*Workflow) UnmarshalYAML

func (w *Workflow) UnmarshalYAML(unmarshal func(any) error) error

UnmarshalYAML will unmarshal the Workflow from YAML. The workflow YAML can be specified as either a simple array of steps or a more verbose map/struct style

type WorkflowMap

type WorkflowMap map[string]*Workflow

Stores a map of workflows configured for an azd project

func (*WorkflowMap) UnmarshalYAML

func (wm *WorkflowMap) UnmarshalYAML(unmarshal func(any) error) error

UnmarshalYAML will unmarshal the WorkflowMap from YAML. The unmarshalling will marshall the YAML like a standard Go map but will also persist the key as the workflow name within the Workflow struct.

Jump to

Keyboard shortcuts

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