executors

package
v0.2.0 Latest Latest
Warning

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

Go to latest
Published: Jul 26, 2025 License: Apache-2.0 Imports: 17 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Help

func Help(
	scripts map[string]config.ShuttlePlanScript,
	script string,
	output io.Writer,
	template string,
) error

Types

type ActionExecutionContext

type ActionExecutionContext struct {
	ScriptContext ScriptExecutionContext
	Action        config.ShuttleAction
	ActionIndex   int
}

ActionExecutionContext gives context to the execution of Actions in a script

type Executor

type Executor func(context.Context, *ui.UI, ActionExecutionContext) error

func ShellExecutor

func ShellExecutor(action config.ShuttleAction) (Executor, bool)

func TaskExecutor

func TaskExecutor(action config.ShuttleAction) (Executor, bool)

type Matcher

type Matcher func(config.ShuttleAction) (Executor, bool)

type Registry

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

func NewRegistry

func NewRegistry(executors ...Matcher) *Registry

func (*Registry) Execute

func (r *Registry) Execute(
	ctx context.Context,
	p config.ShuttleProjectContext,
	command string,
	args map[string]string,
	validateArgs bool,
) error

Execute is the command executor for the plan files

type ScriptExecutionContext

type ScriptExecutionContext struct {
	ScriptName string
	Script     config.ShuttlePlanScript
	Project    config.ShuttleProjectContext
	Args       map[string]string
}

ScriptExecutionContext gives context to the execution of a plan script

Directories

Path Synopsis
golang

Jump to

Keyboard shortcuts

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