Documentation ¶
Overview ¶
Package config holds our basic translation from a TOML configuration file to a usable struct.
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Config ¶
type Config struct { // Required are required values that must be passed in. Required []Required // CreateVars are a list of variables to create. This operation is done before any // sequence has run, but it does allow use of variables stored in the vals map. CreateVars []*CreateVar Seqs []toml.Primitive // contains filtered or unexported fields }
Config holds our configuration from the configuration file.
type CreateVar ¶
type CreateVar struct { // Name is the unique name of the CreateVar sequence. Name string // Key is the to save the variable in. Key string // Value is the value to save. This can contain template variables that reference keys // stored in our val map. Value string }
CreateVar creates a variable.
type Required ¶
type Required struct { // Name is the name of the value that must be passed. Name string // Regex is the regexp.Regexp that must match for the value to be valid. // If not set, the value is not checked. Regex string }
Required is a required value that must be passed in before anything is executed.
type Runner ¶
type Runner struct { // Name is the name of this Runner. (Required) Name string // Cmd is the command to execute. You may use {{.KeyName}} for value substitution that comes from the passed // map. All "\n" and "\" characters are turned into spaces before parsing. (Required) Cmd string // Sleep indicates the amount of time to sleep before executing this command. Sleep duration // Retries is the number of retries to attempt if this fails. Failure is marked with any non-0 return code. Retries int // RetrySleep is the time to sleep between retries. RetrySleep duration // ValueKey is the unique key to store the STDOUT of this command in. This value will have TrimSpace() called on it // before it is stored. ValueKey string }
Runner represents a runner node in the DAG.
type Sequence ¶
type Sequence struct {
// contains filtered or unexported fields
}
Sequence represents a sequenced action to perform. This is either a CreateVar, Runner or WriteFile.
type WriteFile ¶
type WriteFile struct { // Name is the unique name of the CreateVar sequence. Name string // Path is where to store the file. Path string // Value is the value to write to the file. This can contain template variables that reference keys // stored in our val map. Value string }
WriteFile writes a file to disk.
Click to show internal directories.
Click to hide internal directories.