template

package
v7.5.1 Latest Latest
Warning

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

Go to latest
Published: Dec 12, 2023 License: Apache-2.0 Imports: 11 Imported by: 3 modules, 1 package

The first number is the count of modules that contain a package that imports this one. The module count is a better indicator of popularity than the package count. A module with 100 importing packages is counted only once instead of 100 times, reflecting the fact that the choice to use the package was likely made only once, not 100 times.
A '?' means that the value hasn't been computed yet.

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type EvaluateOpts

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

type MultiVars

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

func NewMultiVars

func NewMultiVars(varss []Variables) MultiVars

func (MultiVars) Get

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

func (MultiVars) List

func (m MultiVars) List() ([]VariableDefinition, error)

type StaticVariables

type StaticVariables map[string]interface{}

func (StaticVariables) Get

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

func (StaticVariables) List

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

type VarFileArg struct {
	FS boshsys.FileSystem

	Vars StaticVariables
}

func (*VarFileArg) UnmarshalFlag

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

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

type Variables

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

type VarsEnvArg

type VarsEnvArg struct {
	Vars StaticVariables

	EnvironFunc func() []string
}

func (*VarsEnvArg) UnmarshalFlag

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