executable

package
v0.4.1 Latest Latest
Warning

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

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

Documentation

Index

Constants

View Source
const (
	TmpDirLabel    = "f:tmp"
	DefaultTimeout = 30 * time.Minute
)
View Source
const (
	ActivateGroupID   = "activate"
	DeactivateGroupID = "deactivate"
	UpdateGroupID     = "update"
	ManageGroupID     = "manage"
	LaunchGroupID     = "launch"
	CreationGroupID   = "creation"
)
View Source
const (
	ReservedEnvVarPrefix = "FLOW_"
)

Variables

View Source
var (
	ValidVerbToGroupID = map[string]string{
		"exec":      ActivateGroupID,
		"run":       ActivateGroupID,
		"start":     ActivateGroupID,
		"install":   ActivateGroupID,
		"setup":     ActivateGroupID,
		"release":   ActivateGroupID,
		"deploy":    ActivateGroupID,
		"apply":     ActivateGroupID,
		"delete":    DeactivateGroupID,
		"remove":    DeactivateGroupID,
		"uninstall": DeactivateGroupID,
		"destroy":   DeactivateGroupID,
		"undeploy":  DeactivateGroupID,
		"update":    UpdateGroupID,
		"upgrade":   UpdateGroupID,
		"refresh":   UpdateGroupID,
		"reload":    UpdateGroupID,
		"manage":    ManageGroupID,
		"configure": ManageGroupID,
		"monitor":   ManageGroupID,
		"edit":      ManageGroupID,
		"open":      LaunchGroupID,
		"launch":    LaunchGroupID,
		"show":      LaunchGroupID,
		"view":      LaunchGroupID,
		"render":    LaunchGroupID,
		"generate":  CreationGroupID,
		"add":       CreationGroupID,
		"new":       CreationGroupID,
		"transform": CreationGroupID,
		"build":     CreationGroupID,
	}
)

Functions

func NewExecutableID

func NewExecutableID(workspace, namespace, name string) string

func ParseExecutableID

func ParseExecutableID(id string) (workspace, namespace, name string)

func SortedValidVerbs

func SortedValidVerbs() []string

func ValidVerbs

func ValidVerbs() []string

Types

type Argument

type Argument struct {
	// The default value to use if the argument is not provided.
	// If the argument is required and no default is provided, the executable will
	// fail.
	//
	Default string `json:"default,omitempty" yaml:"default,omitempty" mapstructure:"default,omitempty"`

	// The name of the environment variable that will be assigned the value.
	EnvKey string `json:"envKey" yaml:"envKey" mapstructure:"envKey"`

	// The flag to use when setting the argument from the command line.
	// Either `flag` or `pos` must be set, but not both.
	//
	Flag string `json:"flag,omitempty" yaml:"flag,omitempty" mapstructure:"flag,omitempty"`

	// The position of the argument in the command line ArgumentList. Values start at
	// 1.
	// Either `flag` or `pos` must be set, but not both.
	//
	Pos int `json:"pos,omitempty" yaml:"pos,omitempty" mapstructure:"pos,omitempty"`

	// If the argument is required, the executable will fail if the argument is not
	// provided.
	// If the argument is not required, the default value will be used if the argument
	// is not provided.
	//
	Required bool `json:"required,omitempty" yaml:"required,omitempty" mapstructure:"required,omitempty"`

	// The type of the argument. This is used to determine how to parse the value of
	// the argument.
	Type ArgumentType `json:"type,omitempty" yaml:"type,omitempty" mapstructure:"type,omitempty"`
	// contains filtered or unexported fields
}

func (*Argument) Set

func (a *Argument) Set(value string)

func (*Argument) Validate

func (a *Argument) Validate() error

func (*Argument) ValidateValue

func (a *Argument) ValidateValue() error

func (*Argument) Value

func (a *Argument) Value() string

type ArgumentList

type ArgumentList []Argument

func (*ArgumentList) SetValues

func (al *ArgumentList) SetValues(flagArgs map[string]string, posArgs []string) error

func (*ArgumentList) ToEnvMap

func (al *ArgumentList) ToEnvMap() map[string]string

func (*ArgumentList) Validate

func (al *ArgumentList) Validate() error

func (*ArgumentList) ValidateValues

func (al *ArgumentList) ValidateValues() error

type ArgumentType

type ArgumentType string
const ArgumentTypeBool ArgumentType = "bool"
const ArgumentTypeFloat ArgumentType = "float"
const ArgumentTypeInt ArgumentType = "int"
const ArgumentTypeString ArgumentType = "string"

type Directory

type Directory string

The directory to execute the command in. If unset, the directory of the flow file will be used. If set to `f:tmp`, a temporary directory will be created for the process. If prefixed with `./`, the path will be relative to the current working directory. If prefixed with `//`, the path will be relative to the workspace root. Environment variables in the path will be expended at runtime.

func (Directory) ExpandDirectory

func (e Directory) ExpandDirectory(
	logger io.Logger,
	wsPath, execPath, processTmpDir string,
	env map[string]string,
) (dir string, isTmpDir bool, err error)

type ExecExecutableType

type ExecExecutableType struct {
	// Args corresponds to the JSON schema field "args".
	Args ArgumentList `json:"args,omitempty" yaml:"args,omitempty" mapstructure:"args,omitempty"`

	// The command to execute.
	// Only one of `cmd` or `file` must be set.
	//
	Cmd string `json:"cmd,omitempty" yaml:"cmd,omitempty" mapstructure:"cmd,omitempty"`

	// Dir corresponds to the JSON schema field "dir".
	Dir Directory `json:"dir,omitempty" yaml:"dir,omitempty" mapstructure:"dir,omitempty"`

	// The file to execute.
	// Only one of `cmd` or `file` must be set.
	//
	File string `json:"file,omitempty" yaml:"file,omitempty" mapstructure:"file,omitempty"`

	// The log mode to use when running the executable.
	// This can either be `hidden`, `json`, `logfmt` or `text`
	//
	LogMode io.LogMode `json:"logMode,omitempty" yaml:"logMode,omitempty" mapstructure:"logMode,omitempty"`

	// Params corresponds to the JSON schema field "params".
	Params ParameterList `json:"params,omitempty" yaml:"params,omitempty" mapstructure:"params,omitempty"`
	// contains filtered or unexported fields
}

Standard executable type. Runs a command/file in a subprocess.

func (*ExecExecutableType) GetLogFields

func (e *ExecExecutableType) GetLogFields() map[string]interface{}

func (*ExecExecutableType) SetLogFields

func (e *ExecExecutableType) SetLogFields(fields map[string]interface{})

type Executable

type Executable struct {
	// Aliases corresponds to the JSON schema field "aliases".
	Aliases ExecutableAliases `json:"aliases,omitempty" yaml:"aliases,omitempty" mapstructure:"aliases,omitempty"`

	// A description of the executable.
	// This description is rendered as markdown in the interactive UI.
	//
	Description string `json:"description,omitempty" yaml:"description,omitempty" mapstructure:"description,omitempty"`

	// Exec corresponds to the JSON schema field "exec".
	Exec *ExecExecutableType `json:"exec,omitempty" yaml:"exec,omitempty" mapstructure:"exec,omitempty"`

	// Launch corresponds to the JSON schema field "launch".
	Launch *LaunchExecutableType `json:"launch,omitempty" yaml:"launch,omitempty" mapstructure:"launch,omitempty"`

	// The name of the executable.
	//
	// Name is used to reference the executable in the CLI using the format
	// `workspace:namespace/name`.
	// [Verb group + Name] must be unique within the namespace of the workspace.
	//
	Name string `json:"name" yaml:"name" mapstructure:"name"`

	// Parallel corresponds to the JSON schema field "parallel".
	Parallel *ParallelExecutableType `json:"parallel,omitempty" yaml:"parallel,omitempty" mapstructure:"parallel,omitempty"`

	// Render corresponds to the JSON schema field "render".
	Render *RenderExecutableType `json:"render,omitempty" yaml:"render,omitempty" mapstructure:"render,omitempty"`

	// Request corresponds to the JSON schema field "request".
	Request *RequestExecutableType `json:"request,omitempty" yaml:"request,omitempty" mapstructure:"request,omitempty"`

	// Serial corresponds to the JSON schema field "serial".
	Serial *SerialExecutableType `json:"serial,omitempty" yaml:"serial,omitempty" mapstructure:"serial,omitempty"`

	// Tags corresponds to the JSON schema field "tags".
	Tags ExecutableTags `json:"tags,omitempty" yaml:"tags,omitempty" mapstructure:"tags,omitempty"`

	// The maximum amount of time the executable is allowed to run before being
	// terminated.
	// The timeout is specified in Go duration format (e.g. 30s, 5m, 1h).
	//
	Timeout time.Duration `json:"timeout,omitempty" yaml:"timeout,omitempty" mapstructure:"timeout,omitempty"`

	// Verb corresponds to the JSON schema field "verb".
	Verb Verb `json:"verb" yaml:"verb" mapstructure:"verb"`

	// Visibility corresponds to the JSON schema field "visibility".
	Visibility *ExecutableVisibility `json:"visibility,omitempty" yaml:"visibility,omitempty" mapstructure:"visibility,omitempty"`
	// contains filtered or unexported fields
}

The executable schema defines the structure of an executable in the Flow CLI. Executables are the building blocks of workflows and are used to define the actions that can be performed in a workspace.

func (*Executable) AliasesIDs

func (e *Executable) AliasesIDs() []string

func (*Executable) Env

func (*Executable) FlowFilePath

func (e *Executable) FlowFilePath() string

func (*Executable) ID

func (e *Executable) ID() string

func (*Executable) IsExecutableFromWorkspace

func (e *Executable) IsExecutableFromWorkspace(workspaceFilter string) bool

IsExecutableFromWorkspace returns true if the executable can be executed from the given workspace.

func (*Executable) IsVisibleFromWorkspace

func (e *Executable) IsVisibleFromWorkspace(workspaceFilter string) bool

IsVisibleFromWorkspace returns true if the executable should be shown in terminal output for the given workspace.

func (*Executable) JSON

func (e *Executable) JSON() (string, error)

func (*Executable) Markdown

func (e *Executable) Markdown() string

func (*Executable) MergeTags

func (e *Executable) MergeTags(tags common.Tags)

func (*Executable) NameEquals

func (e *Executable) NameEquals(name string) bool

func (*Executable) Ref

func (e *Executable) Ref() Ref

func (*Executable) SetContext

func (e *Executable) SetContext(workspaceName, workspacePath, namespace, flowFilePath string)

func (*Executable) SetDefaults

func (e *Executable) SetDefaults()

func (*Executable) SetInheritedFields added in v0.4.0

func (e *Executable) SetInheritedFields(flowFile *FlowFile)

func (*Executable) Validate

func (e *Executable) Validate() error

func (*Executable) WorkspacePath

func (e *Executable) WorkspacePath() string

func (*Executable) YAML

func (e *Executable) YAML() (string, error)

type ExecutableAliases

type ExecutableAliases common.Aliases

type ExecutableEnvironment

type ExecutableEnvironment struct {
	Params ParameterList `json:"params" yaml:"params"`
	Args   ArgumentList  `json:"args"   yaml:"args"`
}

type ExecutableList

type ExecutableList []*Executable

func (ExecutableList) FilterByNamespace

func (l ExecutableList) FilterByNamespace(ns string) ExecutableList

func (ExecutableList) FilterBySubstring

func (l ExecutableList) FilterBySubstring(str string) ExecutableList

func (ExecutableList) FilterByTags

func (l ExecutableList) FilterByTags(tags common.Tags) ExecutableList

func (ExecutableList) FilterByVerb

func (l ExecutableList) FilterByVerb(verb Verb) ExecutableList

func (ExecutableList) FilterByWorkspace

func (l ExecutableList) FilterByWorkspace(ws string) ExecutableList

func (ExecutableList) FindByVerbAndID

func (l ExecutableList) FindByVerbAndID(verb Verb, id string) (*Executable, error)

func (ExecutableList) Items

func (l ExecutableList) Items() []*types.CollectionItem

func (ExecutableList) JSON

func (l ExecutableList) JSON() (string, error)

func (ExecutableList) Plural

func (l ExecutableList) Plural() string

func (ExecutableList) Singular

func (l ExecutableList) Singular() string

func (ExecutableList) YAML

func (l ExecutableList) YAML() (string, error)

type ExecutableTags

type ExecutableTags common.Tags

type ExecutableVisibility

type ExecutableVisibility common.Visibility

type FlowFile

type FlowFile struct {

	// A description of the executables defined within the flow file. This description
	// will used as a shared description
	// for all executables in the flow file.
	//
	Description string `json:"description,omitempty" yaml:"description,omitempty" mapstructure:"description,omitempty"`

	// A path to a markdown file that contains the description of the executables
	// defined within the flow file.
	DescriptionFile string `json:"descriptionFile,omitempty" yaml:"descriptionFile,omitempty" mapstructure:"descriptionFile,omitempty"`

	// Executables corresponds to the JSON schema field "executables".
	Executables ExecutableList `json:"executables,omitempty" yaml:"executables,omitempty" mapstructure:"executables,omitempty"`

	// FromFile corresponds to the JSON schema field "fromFile".
	FromFile FromFile `json:"fromFile,omitempty" yaml:"fromFile,omitempty" mapstructure:"fromFile,omitempty"`

	// The namespace to be given to all executables in the flow file.
	// If not set, the executables in the file will be grouped into the root (*)
	// namespace.
	// Namespaces can be reused across multiple flow files.
	//
	// Namespaces are used to reference executables in the CLI using the format
	// `workspace:namespace/name`.
	//
	Namespace string `json:"namespace,omitempty" yaml:"namespace,omitempty" mapstructure:"namespace,omitempty"`

	// Tags to be applied to all executables defined within the flow file.
	Tags []string `json:"tags,omitempty" yaml:"tags,omitempty" mapstructure:"tags,omitempty"`

	// Visibility corresponds to the JSON schema field "visibility".
	Visibility *FlowFileVisibility `json:"visibility,omitempty" yaml:"visibility,omitempty" mapstructure:"visibility,omitempty"`
	// contains filtered or unexported fields
}

Configuration for a group of Flow CLI executables. The file must have the extension `.flow` in order to be discovered by the CLI. It's configuration is used to define a group of executables with shared metadata (namespace, tags, etc). A workspace can have multiple flow files located anywhere in the workspace directory

func (*FlowFile) ConfigPath

func (f *FlowFile) ConfigPath() string

func (*FlowFile) SetContext

func (f *FlowFile) SetContext(workspaceName, workspacePath, configPath string)

func (*FlowFile) SetDefaults

func (f *FlowFile) SetDefaults()

func (*FlowFile) WorkspacePath

func (f *FlowFile) WorkspacePath() string

type FlowFileList

type FlowFileList []*FlowFile

func (*FlowFileList) FilterByNamespace

func (l *FlowFileList) FilterByNamespace(namespace string) FlowFileList

func (*FlowFileList) FilterByTag

func (l *FlowFileList) FilterByTag(tag string) FlowFileList

type FlowFileTemplate

type FlowFileTemplate struct {
	// A list of template data to be used when rendering the flow executable config file.
	Data TemplateData `yaml:"data"`
	// A list of files to include when copying the template in a new location. The files are copied as-is.
	Artifacts []string `yaml:"artifacts,omitempty"`

	*FlowFile `yaml:",inline"`
	// contains filtered or unexported fields
}

func (*FlowFileTemplate) Location

func (t *FlowFileTemplate) Location() string

func (*FlowFileTemplate) SetContext

func (t *FlowFileTemplate) SetContext(location string)

func (*FlowFileTemplate) Validate

func (t *FlowFileTemplate) Validate() error

type FlowFileVisibility

type FlowFileVisibility common.Visibility

type FromFile

type FromFile []string

A list of `.sh` files to convert into generated executables in the file's executable group.

type LaunchExecutableType

type LaunchExecutableType struct {
	// The application to launch the URI with.
	App string `json:"app,omitempty" yaml:"app,omitempty" mapstructure:"app,omitempty"`

	// Args corresponds to the JSON schema field "args".
	Args ArgumentList `json:"args,omitempty" yaml:"args,omitempty" mapstructure:"args,omitempty"`

	// Params corresponds to the JSON schema field "params".
	Params ParameterList `json:"params,omitempty" yaml:"params,omitempty" mapstructure:"params,omitempty"`

	// The URI to launch. This can be a file path or a web URL.
	URI string `json:"uri" yaml:"uri" mapstructure:"uri"`

	// If set to true, the executable will wait for the launched application to exit
	// before continuing.
	Wait bool `json:"wait,omitempty" yaml:"wait,omitempty" mapstructure:"wait,omitempty"`
}

Launches an application or opens a URI.

type ParallelExecutableType

type ParallelExecutableType struct {
	// Args corresponds to the JSON schema field "args".
	Args ArgumentList `json:"args,omitempty" yaml:"args,omitempty" mapstructure:"args,omitempty"`

	// If set to true, the parallel executable will fail if any of the sub-executables
	// fail.
	FailFast bool `json:"failFast,omitempty" yaml:"failFast,omitempty" mapstructure:"failFast,omitempty"`

	// The maximum number of threads to use when executing the parallel executables.
	MaxThreads int `json:"maxThreads,omitempty" yaml:"maxThreads,omitempty" mapstructure:"maxThreads,omitempty"`

	// Params corresponds to the JSON schema field "params".
	Params ParameterList `json:"params,omitempty" yaml:"params,omitempty" mapstructure:"params,omitempty"`

	// Refs corresponds to the JSON schema field "refs".
	Refs RefList `json:"refs" yaml:"refs" mapstructure:"refs"`
}

type Parameter

type Parameter struct {
	// The name of the environment variable that will be assigned the value.
	EnvKey string `json:"envKey" yaml:"envKey" mapstructure:"envKey"`

	// A prompt to be displayed to the user when collecting an input value.
	Prompt string `json:"prompt,omitempty" yaml:"prompt,omitempty" mapstructure:"prompt,omitempty"`

	// A reference to a secret to be passed to the executable.
	SecretRef string `json:"secretRef,omitempty" yaml:"secretRef,omitempty" mapstructure:"secretRef,omitempty"`

	// A static value to be passed to the executable.
	Text string `json:"text,omitempty" yaml:"text,omitempty" mapstructure:"text,omitempty"`
}

A parameter is a value that can be passed to an executable and all of its sub-executables. Only one of `text`, `secretRef`, or `prompt` must be set. Specifying more than one will result in an error.

func (*Parameter) Validate

func (p *Parameter) Validate() error

type ParameterList

type ParameterList []Parameter

type Ref

type Ref string

A reference to an executable. The format is `<verb> <workspace>/<namespace>:<executable name>`. For example, `exec ws/ns:my-workflow`.

The workspace and namespace are optional. If the workspace is not specified, the current workspace will be used. If the namespace is not specified, the current namespace will be used.

func NewRef

func NewRef(id string, verb Verb) Ref

func (Ref) Equals

func (r Ref) Equals(other Ref) bool

func (Ref) GetID

func (r Ref) GetID() string

func (Ref) GetNamespace

func (r Ref) GetNamespace() string

func (Ref) GetVerb

func (r Ref) GetVerb() Verb

func (Ref) GetWorkspace

func (r Ref) GetWorkspace() string

func (Ref) String

func (r Ref) String() string

func (Ref) Validate

func (r Ref) Validate() error

type RefList

type RefList []Ref

type RenderExecutableType

type RenderExecutableType struct {
	// Args corresponds to the JSON schema field "args".
	Args ArgumentList `json:"args,omitempty" yaml:"args,omitempty" mapstructure:"args,omitempty"`

	// Dir corresponds to the JSON schema field "dir".
	Dir Directory `json:"dir,omitempty" yaml:"dir,omitempty" mapstructure:"dir,omitempty"`

	// Params corresponds to the JSON schema field "params".
	Params ParameterList `json:"params,omitempty" yaml:"params,omitempty" mapstructure:"params,omitempty"`

	// The path to the JSON or YAML file containing the template data.
	TemplateDataFile string `json:"templateDataFile,omitempty" yaml:"templateDataFile,omitempty" mapstructure:"templateDataFile,omitempty"`

	// The path to the markdown template file to render.
	TemplateFile string `json:"templateFile" yaml:"templateFile" mapstructure:"templateFile"`
}

Renders a markdown template file with data.

type RequestExecutableType

type RequestExecutableType struct {
	// Args corresponds to the JSON schema field "args".
	Args ArgumentList `json:"args,omitempty" yaml:"args,omitempty" mapstructure:"args,omitempty"`

	// The body of the request.
	Body string `json:"body,omitempty" yaml:"body,omitempty" mapstructure:"body,omitempty"`

	// A map of headers to include in the request.
	Headers RequestExecutableTypeHeaders `json:"headers,omitempty" yaml:"headers,omitempty" mapstructure:"headers,omitempty"`

	// If set to true, the response will be logged as program output.
	LogResponse bool `json:"logResponse,omitempty" yaml:"logResponse,omitempty" mapstructure:"logResponse,omitempty"`

	// The HTTP method to use when making the request.
	Method RequestExecutableTypeMethod `json:"method,omitempty" yaml:"method,omitempty" mapstructure:"method,omitempty"`

	// Params corresponds to the JSON schema field "params".
	Params ParameterList `json:"params,omitempty" yaml:"params,omitempty" mapstructure:"params,omitempty"`

	// ResponseFile corresponds to the JSON schema field "responseFile".
	ResponseFile *RequestResponseFile `json:"responseFile,omitempty" yaml:"responseFile,omitempty" mapstructure:"responseFile,omitempty"`

	// The timeout for the request in Go duration format (e.g. 30s, 5m, 1h).
	Timeout time.Duration `json:"timeout,omitempty" yaml:"timeout,omitempty" mapstructure:"timeout,omitempty"`

	// JQ query to transform the response before saving it to a file or outputting it.
	TransformResponse string `json:"transformResponse,omitempty" yaml:"transformResponse,omitempty" mapstructure:"transformResponse,omitempty"`

	// The URL to make the request to.
	URL string `json:"url" yaml:"url" mapstructure:"url"`

	// A list of valid status codes. If the response status code is not in this list,
	// the executable will fail.
	// If not set, the response status code will not be checked.
	//
	ValidStatusCodes []int `json:"validStatusCodes,omitempty" yaml:"validStatusCodes,omitempty" mapstructure:"validStatusCodes,omitempty"`
}

Makes an HTTP request.

type RequestExecutableTypeHeaders

type RequestExecutableTypeHeaders map[string]string

A map of headers to include in the request.

type RequestExecutableTypeMethod

type RequestExecutableTypeMethod string
const RequestExecutableTypeMethodDELETE RequestExecutableTypeMethod = "DELETE"
const RequestExecutableTypeMethodGET RequestExecutableTypeMethod = "GET"
const RequestExecutableTypeMethodPATCH RequestExecutableTypeMethod = "PATCH"
const RequestExecutableTypeMethodPOST RequestExecutableTypeMethod = "POST"
const RequestExecutableTypeMethodPUT RequestExecutableTypeMethod = "PUT"

type RequestResponseFile

type RequestResponseFile struct {
	// Dir corresponds to the JSON schema field "dir".
	Dir Directory `json:"dir,omitempty" yaml:"dir,omitempty" mapstructure:"dir,omitempty"`

	// The name of the file to save the response to.
	Filename string `json:"filename" yaml:"filename" mapstructure:"filename"`

	// The format to save the response as.
	SaveAs RequestResponseFileSaveAs `json:"saveAs,omitempty" yaml:"saveAs,omitempty" mapstructure:"saveAs,omitempty"`
}

Configuration for saving the response of a request to a file.

type RequestResponseFileSaveAs

type RequestResponseFileSaveAs string
const RequestResponseFileSaveAsIndentedJson RequestResponseFileSaveAs = "indented-json"
const RequestResponseFileSaveAsJson RequestResponseFileSaveAs = "json"
const RequestResponseFileSaveAsRaw RequestResponseFileSaveAs = "raw"
const RequestResponseFileSaveAsYaml RequestResponseFileSaveAs = "yaml"
const RequestResponseFileSaveAsYml RequestResponseFileSaveAs = "yml"

type SerialExecutableType

type SerialExecutableType struct {
	// Args corresponds to the JSON schema field "args".
	Args ArgumentList `json:"args,omitempty" yaml:"args,omitempty" mapstructure:"args,omitempty"`

	// If set to true, the serial executable will fail if any of the sub-executables
	// fail.
	FailFast bool `json:"failFast,omitempty" yaml:"failFast,omitempty" mapstructure:"failFast,omitempty"`

	// Params corresponds to the JSON schema field "params".
	Params ParameterList `json:"params,omitempty" yaml:"params,omitempty" mapstructure:"params,omitempty"`

	// Refs corresponds to the JSON schema field "refs".
	Refs RefList `json:"refs" yaml:"refs" mapstructure:"refs"`
}

Executes a list of executables in serial.

type TemplateData

type TemplateData []TemplateDataEntry

func (*TemplateData) MapInterface

func (t *TemplateData) MapInterface() map[string]interface{}

func (*TemplateData) Set

func (t *TemplateData) Set(key, value string)

func (*TemplateData) Validate

func (t *TemplateData) Validate() error

func (*TemplateData) ValidateValues

func (t *TemplateData) ValidateValues() error

type TemplateDataEntry

type TemplateDataEntry struct {
	// The key to associate the data with. This is used as the key in the template data map.
	Key string `yaml:"key"`
	// A prompt to be displayed to the user when collecting an input value.
	Prompt string `yaml:"prompt"`
	// The default value to use if a value is not set.
	Default string `yaml:"default"`
	// If true, a value must be set. If false, the default value will be used if a value is not set.
	Required bool `yaml:"required"`
	// contains filtered or unexported fields
}

func (*TemplateDataEntry) Set

func (t *TemplateDataEntry) Set(value string)

func (*TemplateDataEntry) Validate

func (t *TemplateDataEntry) Validate() error

func (*TemplateDataEntry) ValidateValue

func (t *TemplateDataEntry) ValidateValue() error

func (*TemplateDataEntry) Value

func (t *TemplateDataEntry) Value() string

type Verb

type Verb string
const VerbAdd Verb = "add"
const VerbApply Verb = "apply"
const VerbBuild Verb = "build"
const VerbConfigure Verb = "configure"
const VerbDelete Verb = "delete"
const VerbDeploy Verb = "deploy"
const VerbDestroy Verb = "destroy"
const VerbEdit Verb = "edit"
const VerbExec Verb = "exec"
const VerbGenerate Verb = "generate"
const VerbInstall Verb = "install"
const VerbLaunch Verb = "launch"
const VerbManage Verb = "manage"
const VerbMonitor Verb = "monitor"
const VerbNew Verb = "new"
const VerbOpen Verb = "open"
const VerbRefresh Verb = "refresh"
const VerbRelease Verb = "release"
const VerbReload Verb = "reload"
const VerbRemove Verb = "remove"
const VerbRender Verb = "render"
const VerbRun Verb = "run"
const VerbSetup Verb = "setup"
const VerbShow Verb = "show"
const VerbStart Verb = "start"
const VerbTransform Verb = "transform"
const VerbUndeploy Verb = "undeploy"
const VerbUninstall Verb = "uninstall"
const VerbUpdate Verb = "update"
const VerbUpgrade Verb = "upgrade"
const VerbView Verb = "view"

func RelatedVerbs

func RelatedVerbs(verb Verb) []Verb

func (Verb) Equals

func (v Verb) Equals(other Verb) bool

func (Verb) String

func (v Verb) String() string

func (Verb) Validate

func (v Verb) Validate() error

Jump to

Keyboard shortcuts

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