Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func Evaluate ¶
Evaluate renders the given jsonnet into a string TODO: don't resolve jpath, this is ANONYMOUS AFTER ALL
func EvaluateFile ¶
EvaluateFile evaluates the Jsonnet code in the given file and returns the result in JSON form. It disregards opts.ImportPaths in favor of automatically resolving these according to the specified file.
func MakeVM ¶ added in v0.12.0
MakeVM returns a Jsonnet VM with some extensions of Tanka, including: - extended importer - extCode and tlaCode applied - native functions registered
func TransitiveImports ¶
TransitiveImports returns all recursive imports of an environment
Types ¶
type ExtendedImporter ¶ added in v0.6.0
type ExtendedImporter struct {
// contains filtered or unexported fields
}
ExtendedImporter wraps jsonnet.FileImporter to add additional functionality: - `import "file.yaml"` - `import "tk"`
func NewExtendedImporter ¶ added in v0.6.0
func NewExtendedImporter(jpath []string) *ExtendedImporter
NewExtendedImporter returns a new instance of ExtendedImporter with the correct jpaths set up
type InjectedCode ¶ added in v0.12.0
InjectedCode holds data that is "late-bound" into the VM
func (*InjectedCode) Set ¶ added in v0.12.0
func (i *InjectedCode) Set(key, value string)
Set allows to set values on an InjectedCode, even when it is nil
type Modifier ¶ added in v0.7.0
Modifier allows to set optional parameters on the Jsonnet VM. See jsonnet.With* for this.
type Opts ¶ added in v0.12.0
type Opts struct { ExtCode InjectedCode TLACode InjectedCode ImportPaths []string EvalScript string }
Opts are additional properties for the Jsonnet VM