Documentation
¶
Index ¶
- type ComputedAttrs
- type Target
- func (t Target) Artifact() string
- func (t Target) Attributes() map[string]cty.Value
- func (t Target) Build() error
- func (t Target) CacheEnabled()
- func (t Target) CheckLocalBuildCache() (bool, error)
- func (t Target) ComputedAttrs() *ComputedAttrs
- func (t Target) CopyArtifact() error
- func (t Target) PreBuild() error
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type ComputedAttrs ¶
type ComputedAttrs struct { Filename string `hcl:"filename,attr"` Content string `hcl:"content,attr"` FilePermissions os.FileMode `hcl:"file_permissions,optional"` DirectoryPermissions os.FileMode `hcl:"directory_permissions,optional"` }
ComputedAttrs used to store the computed attributes of a local_file target
type Target ¶
type Target struct { *base.RawTarget `json:"-"` Filename hcl.Expression `hcl:"filename,attr"` Content hcl.Expression `hcl:"content,attr"` FilePermissions hcl.Expression `hcl:"file_permissions,optional"` DirectoryPermissions hcl.Expression `hcl:"directory_permissions,optional"` }
Target an executable target, when built, it creates a file from provided data
func (Target) Attributes ¶
Attributes returns a combined map of rawTarget.Attributes and typedTarget.Attributes
func (Target) Build ¶
Build creates the file from the content in the location specified with the permissions specified
func (Target) CacheEnabled ¶
func (t Target) CacheEnabled()
CacheEnabled overrides the default target caching behavior
func (Target) CheckLocalBuildCache ¶
CheckLocalBuildCache loads the build cache state and verifies that the hashes match
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) CopyArtifact ¶
CopyArtifact makes a copy of an artifact in a desired location