jsonnet

package
v0.0.0-...-841f565 Latest Latest
Warning

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

Go to latest
Published: Sep 28, 2022 License: Apache-2.0 Imports: 11 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type ComputedAttrs

type ComputedAttrs struct {
	Files      []string `hcl:"files,attr"`
	OutputDir  string   `hcl:"output_dir,attr"`
	Variables  *string  `hcl:"variables,attr"`
	LibraryDir []string `hcl:"library_dir,optional"`
}

ComputedAttrs used to store the computed attributes of a local_exec target

type Target

type Target struct {
	*base.RawTarget `json:"-"`

	YamlOut    *bool          `hcl:"yaml,attr"`
	Files      hcl.Expression `hcl:"files,attr"`
	OutputDir  hcl.Expression `hcl:"output_dir,attr"`
	Variables  hcl.Expression `hcl:"variables,attr"`
	LibraryDir hcl.Expression `hcl:"library_dir,optional"`
}

Target defines the required and optional attributes for defining a jsonnetutils execution

func (Target) Attributes

func (t Target) Attributes() map[string]cty.Value

Attributes return combined rawTarget.Attributes with typedTarget.Attributes.

func (Target) Build

func (t Target) Build() error

Build constructs a jsonnet manifest from the information provided in the jsonnet target

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) ConstructOutFilePath

func (t Target) ConstructOutFilePath(path string) string

ConstructOutFilePath builds the correct file path with the proper extension based on the HCL block inputs

func (Target) PreBuild

func (t Target) PreBuild() error

PreBuild a lifecycle hook for calculating state before the build

Jump to

Keyboard shortcuts

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