Documentation ¶
Index ¶
- Constants
- type Values
- func (v *Values) Apply(templateStr string, item interface{}, stepName string) ([]byte, error)
- func (v *Values) Clone() (*Values, error)
- func (v *Values) GetChildren(stepName string) interface{}
- func (v *Values) GetError(stepName string) interface{}
- func (v *Values) GetMetadata(stepName string) interface{}
- func (v *Values) GetOutput(stepName string) interface{}
- func (v *Values) GetState(stepName string) interface{}
- func (v *Values) GetSteps() map[string]interface{}
- func (v *Values) GetVariables() map[string]*Variable
- func (v *Values) SetChildren(stepName string, value interface{})
- func (v *Values) SetConfig(cfg map[string]interface{})
- func (v *Values) SetError(stepName string, value interface{})
- func (v *Values) SetFunctionsArgs(in map[string]interface{})
- func (v *Values) SetInput(in map[string]interface{})
- func (v *Values) SetIterator(i interface{})
- func (v *Values) SetMetadata(stepName string, value interface{})
- func (v *Values) SetOutput(stepName string, value interface{})
- func (v *Values) SetPreHook(output, metadata interface{})
- func (v *Values) SetResolverInput(in map[string]interface{})
- func (v *Values) SetState(stepName string, value interface{})
- func (v *Values) SetTaskInfos(t map[string]interface{})
- func (v *Values) SetVariables(vars []Variable)
- func (v *Values) UnsetChildren(stepName string)
- func (v *Values) UnsetError(stepName string)
- func (v *Values) UnsetIterator()
- func (v *Values) UnsetMetadata(stepName string)
- func (v *Values) UnsetOutput(stepName string)
- func (v *Values) UnsetState(stepName string)
- type Variable
Constants ¶
const ( InputKey = "input" FunctionsArgsKey = "function_args" ResolverInputKey = "resolver_input" StepKey = "step" ConfigKey = "config" TaskKey = "task" VarKey = "var" IteratorKey = "iterator" // reserved for transient one-off values, set/unset when applying values to template StateKey = "state" PreHookKey = "pre_hook" OutputKey = "output" MetadataKey = "metadata" ChildrenKey = "children" ErrorKey = "error" )
keys to store/retrieve data from a Values struct
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Values ¶
type Values struct {
// contains filtered or unexported fields
}
Values is a container for all the live data of a running task
func NewValues ¶
func NewValues() *Values
NewValues instantiates a new Values holder, complete with custom templating functions available to task template authors
func (*Values) GetChildren ¶
GetChildren returns the collection of results issued from a named "foreach" step
func (*Values) GetMetadata ¶
GetMetadata returns the metadata of a named step
func (*Values) GetVariables ¶
GetVariables returns all template variables stored in Values
func (*Values) SetChildren ¶
SetChildren stores the collection of results issued from a named "foreach" step
func (*Values) SetFunctionsArgs ¶ added in v1.7.0
SetFunctionsArgs stores a task function args in Values
func (*Values) SetIterator ¶
func (v *Values) SetIterator(i interface{})
SetIterator stores the data for the current item in an iteration
func (*Values) SetMetadata ¶
SetMetadata stores a step's metadata in Values
func (*Values) SetPreHook ¶ added in v1.8.0
func (v *Values) SetPreHook(output, metadata interface{})
SetPreHook stores a step's prehook in Values
func (*Values) SetResolverInput ¶
SetResolverInput stores a task resolver's inputs in Values
func (*Values) SetTaskInfos ¶
SetTaskInfos stores task-related data in Values
func (*Values) SetVariables ¶
SetVariables stores template-defined variables in Values
func (*Values) UnsetChildren ¶
UnsetChildren empties results for a named "foreach" step
func (*Values) UnsetError ¶ added in v1.0.1
UnsetError empties the error from a failed step
func (*Values) UnsetIterator ¶
func (v *Values) UnsetIterator()
UnsetIterator cleans up data on iterator
func (*Values) UnsetMetadata ¶
UnsetMetadata empties the metadata of a named step
func (*Values) UnsetOutput ¶
UnsetOutput empties the output data of a named step
func (*Values) UnsetState ¶ added in v1.4.1
UnsetState empties the state of a step
type Variable ¶
type Variable struct { Name string `json:"name"` Expression string `json:"expression"` ExpressionTimeout string `json:"expression_timeout"` Value interface{} `json:"value"` // contains filtered or unexported fields }
Variable holds a named variable, with either a JS expression to be evalued or a concrete value