executors

package
v0.23.0 Latest Latest
Warning

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

Go to latest
Published: Jan 24, 2024 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 added in v0.15.1

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

func ShellExecutor added in v0.15.1

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

func TaskExecutor added in v0.17.2

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

type Matcher added in v0.15.1

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

type Registry added in v0.15.1

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

func NewRegistry added in v0.15.1

func NewRegistry(executors ...Matcher) *Registry

func (*Registry) Execute added in v0.15.1

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