template

package
v0.0.125 Latest Latest
Warning

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

Go to latest
Published: Nov 30, 2016 License: Apache-2.0 Imports: 9 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type EvaluateOpts added in v0.0.87

type EvaluateOpts struct {
	ExpectAllKeys         bool
	PostVarSubstitutionOp patch.Op
	UnescapedMultiline    bool
}

type MultiVars added in v0.0.112

type MultiVars struct {
	// contains filtered or unexported fields
}

func NewMultiVars added in v0.0.112

func NewMultiVars(varss []Variables) MultiVars

func (MultiVars) Get added in v0.0.112

func (m MultiVars) Get(varDef VariableDefinition) (interface{}, bool, error)

type StaticVariables added in v0.0.112

type StaticVariables map[string]interface{}

func (StaticVariables) Get added in v0.0.112

func (v StaticVariables) Get(varDef VariableDefinition) (interface{}, bool, error)

type Template

type Template struct {
	// contains filtered or unexported fields
}

func NewTemplate

func NewTemplate(bytes []byte) Template

func (Template) Evaluate

func (t Template) Evaluate(vars Variables, op patch.Op, opts EvaluateOpts) ([]byte, error)

type VarFileArg added in v0.0.121

type VarFileArg struct {
	FS boshsys.FileSystem

	Vars StaticVariables
}

func (*VarFileArg) UnmarshalFlag added in v0.0.121

func (a *VarFileArg) UnmarshalFlag(data string) error

type VarKV

type VarKV struct {
	Name  string
	Value interface{}
}

func (*VarKV) UnmarshalFlag

func (a *VarKV) UnmarshalFlag(data string) error

type VariableDefinition added in v0.0.112

type VariableDefinition struct {
	Name    string
	Type    string
	Options interface{}
}

type Variables

type Variables interface {
	Get(VariableDefinition) (interface{}, bool, error)
}

type VarsEnvArg added in v0.0.101

type VarsEnvArg struct {
	Vars StaticVariables

	EnvironFunc func() []string
}

func (*VarsEnvArg) UnmarshalFlag added in v0.0.101

func (a *VarsEnvArg) UnmarshalFlag(prefix string) error

type VarsFileArg

type VarsFileArg struct {
	FS boshsys.FileSystem

	Vars StaticVariables
}

func (*VarsFileArg) UnmarshalFlag

func (a *VarsFileArg) UnmarshalFlag(filePath string) error

Jump to

Keyboard shortcuts

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