hil

package
v0.0.0-...-f33f84d Latest Latest
Warning

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

Go to latest
Published: Feb 23, 2018 License: GPL-3.0 Imports: 3 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type ResourceVariable

type ResourceVariable struct {
	Kind, Name, Field string
}

ResourceVariable defines a variable type used to reference fields of a resource e.g. ${file.file1.Content}

func (*ResourceVariable) Key

func (r *ResourceVariable) Key() string

Key returns a string representation of the variable key.

type Variable

type Variable interface {
	Key() string
}

Variable defines an interpolated variable.

func NewInterpolatedVariable

func NewInterpolatedVariable(k string) (Variable, error)

NewInterpolatedVariable takes a variable key and return the interpolated variable of the required type.

func ParseVariables

func ParseVariables(tree ast.Node) ([]Variable, error)

ParseVariables will traverse a HIL tree looking for variables and returns a list of them.

Jump to

Keyboard shortcuts

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