executer

package
v0.22.3 Latest Latest
Warning

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

Go to latest
Published: Jan 12, 2024 License: Apache-2.0 Imports: 14 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Run

func Run(
	ctx context.Context,
	ui *ui.UI,
	c *config.ShuttleProjectContext,
	path string,
	args ...string,
) error

Types

type Action added in v0.21.0

type Action struct {
	Args []ActionArg `json:"args"`
}

type ActionArg added in v0.21.0

type ActionArg struct {
	Name string `json:"name"`
}

type Actions added in v0.21.0

type Actions struct {
	Actions map[string]Action `json:"actions"`
}

Actions represents all the possible commands to be sent to the golang actions binaries. Such as `shuttle run daggerbuild --arg something`, in this daggerbuild would be the name, and arg being an Arg for said action

func List

func List(
	ctx context.Context,
	ui *ui.UI,
	path string,
	c *config.ShuttleProjectContext,
) (*Actions, error)

func NewActions added in v0.21.0

func NewActions() *Actions

func (*Actions) Execute added in v0.21.0

func (a *Actions) Execute(action string, fn func() error) (ran bool, err error)

Execute can execute a single action given a name, and a closure to handle any actual execution

func (*Actions) Merge added in v0.21.0

func (a *Actions) Merge(other ...*Actions) *Actions

Merge exists to combine multiple Actions from a variety of binaries into one. This allows a single set of actions to represent all possible actions by shuttle in a given context

Jump to

Keyboard shortcuts

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