Documentation ¶
Index ¶
- type Action
- type ComputedAttrs
- type Target
- func (t Target) ActionsToSend(filename string) ([]*entrypoint.Action, error)
- func (t Target) Attributes() map[string]cty.Value
- func (t Target) Build() error
- func (t Target) CacheEnabled()
- func (t Target) ComputedAttrs() *ComputedAttrs
- func (t Target) PreBuild() error
- func (t Target) RenderedFilePath() string
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Action ¶
type Action struct { Command []string `hcl:"command,attr" cty:"command"` WorkDir string `hcl:"work_dir,attr" cty:"work_dir"` Patterns []string `hcl:"patterns,attr" cty:"patterns"` }
Action defines the required fields to execute one or more commands when a changed file matches a given pattern
type ComputedAttrs ¶
type ComputedAttrs struct { Manifest string `hcl:"manifest,attr" json:"manifest"` PortForward []string `hcl:"port_forward,optional" json:"port_forward"` // TODO: There's no input validation for this in this code LiveSyncEnabled bool `hcl:"live_sync_enabled,optional" json:"live_sync_enabled"` LiveSyncRestartMode string `hcl:"live_sync_restart_mode,optional" json:"live_sync_restart_mode"` // TODO: There's no input validation for this code or setting of a default LiveSyncOnActions []Action `hcl:"live_sync_on_actions,optional" json:"live_sync_on_actions"` Env []map[string]string `hcl:"env,optional" json:"env"` }
ComputedAttrs used to store the computed attributes of a local_exec target
type Target ¶
type Target struct { *base.RawTarget `json:"-"` Manifest hcl.Expression `hcl:"manifest,attr" json:"manifest"` PortForward hcl.Expression `hcl:"port_forward,optional" json:"port_forward"` LiveSyncEnabled hcl.Expression `hcl:"live_sync_enabled,optional" json:"live_sync_enabled"` LiveSyncRestartMode hcl.Expression `hcl:"live_sync_restart_mode,optional" json:"live_sync_restart_mode"` LiveSyncOnActions hcl.Expression `hcl:"live_sync_on_actions,optional" json:"live_sync_on_actions"` Env hcl.Expression `hcl:"env,optional" json:"env"` }
Target defines the required and optional attributes for defining a jsonnetutils execution
func (Target) ActionsToSend ¶
func (t Target) ActionsToSend(filename string) ([]*entrypoint.Action, error)
ActionsToSend builds the pattern list for a matcher and then compares a file path against the matcher, returning a boolean and an error if there is one
func (Target) Attributes ¶
Attributes return combined rawTarget.Attributes with typedTarget.Attributes.
func (Target) Build ¶
Build constructs a jsonnet manifest from the information provided in the jsonnet target
func (Target) CacheEnabled ¶
func (t Target) CacheEnabled()
CacheEnabled overrides the default target caching behavior
func (Target) ComputedAttrs ¶
func (t Target) ComputedAttrs() *ComputedAttrs
ComputedAttrs returns a pointer to computed attributes from the state store. If attributes are not in the state store it will create a new pointer and insert it into the state store.
func (Target) RenderedFilePath ¶
RenderedFilePath path of ark artifacts directory where the manifest will be written to