builtin

package
v0.3.4 Latest Latest
Warning

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

Go to latest
Published: Nov 9, 2021 License: Apache-2.0 Imports: 18 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func RegisterAll

func RegisterAll(mc rocket.MissionController)

RegisterAll all built-in task types with the passed mission control.

Types

type Copy added in v0.3.0

type Copy struct {
	Sources     []string `mapstructure:"sources"`
	Destination string   `mapstructure:"destination"`
	Overwrite   string   `mapstructure:"overwrite"`
	Log         bool     `mapstructure:"log"`
}

Copy task is used to copy files.

type Delims added in v0.3.0

type Delims struct {
	// Left is the opening delimiter
	Left string `mapstructure:"left"`

	// Right is the closing delimiter
	Right string `mapstructure:"right"`
}

Delims are the delimiters to use to escape template functions.

type Fetch

type Fetch struct {
	Resources []FetchResource `mapstructure:"resources"`
	Log       bool            `mapstructure:"log"`
}

Fetch task is used get one or more web resources.

type FetchResource

type FetchResource struct {
	Source rocket.InputSpec  `mapstructure:"source"`
	Output rocket.OutputSpec `mapstructure:"output"`
}

FetchResource defines the input source and output target runbooks for a fetch request.

type MkDir

type MkDir struct {
	Dirs []string `mapstructure:"dirs"`
	Log  bool     `mapstructure:"log"`
}

MkDir task is used create directories.

type Move added in v0.3.0

type Move struct {
	Sources     []string `mapstructure:"sources"`
	Destination string   `mapstructure:"destination"`
	Overwrite   string   `mapstructure:"overwrite"`
	Log         bool     `mapstructure:"log"`
}

Move task is used to move files. The tool can recursively move files. Directories cannot be specified as a source, the wild card ** pattern can be used to recursively move the contents of the directory. The directory structure is moved, but the source sub directories are not deleted.

type Remove added in v0.3.0

type Remove struct {
	Files []string `mapstructure:"files"`
	Log   bool     `mapstructure:"log"`
}

Remove lists files or directories to remove

type Run

type Run struct {
	// List of arguments, subject to string expansion.
	Args []string `mapstructure:"args"`

	// Command to execute.  This is a raw executed command and is not
	// wrapped ina shell, as such globing etc may not work as expected.
	// Command is subject to string expansion.
	Command string `mapstructure:"command"`

	// Dir is the directory to execute the task within.
	Dir string `mapstructure:"dir"`

	// GlobArgs specifies if arguments should be glob expanded prior
	// to passing the program.  If true *.go would ne expanded as a arg per matching file.
	GlobArgs bool `mapstructure:"glob"`

	// Redirect handles input and output redirection.
	rocket.Redirection `mapstructure:",squash"`
}

Run task is used to execute a specific command line program.

type Template

type Template struct {
	Template rocket.InputSpec `mapstructure:"template"`

	// OutputSpec is the runbook for the template output
	Output *rocket.OutputSpec `mapstructure:"output"`

	// Delims are the delimiters used to identify template script.
	// Leave blank for the default go templating delimiters
	Delims Delims `mapstructure:"delims"`
}

Template is a task to expand the input file using the Template file. Output is written to the redirected STDOUT Delims is used to change the standard golang templatiing delimiters This can be useful when processing a source file that itself uses golang tempalting.

Jump to

Keyboard shortcuts

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