Documentation ¶
Overview ¶
jsonnet is a simple Go wrapper for the JSonnet VM.
Index ¶
- func Version() string
- type ImportCallback
- type VM
- func (vm *VM) Destroy()
- func (vm *VM) EvaluateFile(filename string) (string, error)
- func (vm *VM) EvaluateSnippet(filename, snippet string) (string, error)
- func (vm *VM) ExtCode(key, val string)
- func (vm *VM) ExtVar(key, val string)
- func (vm *VM) FormatFile(filename string) (string, error)
- func (vm *VM) FormatIndent(n int)
- func (vm *VM) FormatSnippet(filename, snippet string) (string, error)
- func (vm *VM) GcGrowthTrigger(v float64)
- func (vm *VM) GcMinObjects(v uint)
- func (vm *VM) ImportCallback(f ImportCallback)
- func (vm *VM) JpathAdd(path string)
- func (vm *VM) MaxStack(v uint)
- func (vm *VM) MaxTrace(v uint)
- func (vm *VM) StringOutput(v bool)
- func (vm *VM) TlaCode(key, val string)
- func (vm *VM) TlaVar(key, val string)
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
Types ¶
type ImportCallback ¶
type VM ¶
type VM struct {
// contains filtered or unexported fields
}
func (*VM) EvaluateFile ¶
Evaluate a file containing Jsonnet code, return a JSON string.
func (*VM) EvaluateSnippet ¶
Evaluate a string containing Jsonnet code, return a JSON string.
func (*VM) FormatFile ¶
Format a file containing Jsonnet code, return a JSON string.
func (*VM) FormatIndent ¶
Indentation level when reformatting (number of spaces)
func (*VM) FormatSnippet ¶
Format a string containing Jsonnet code, return a JSON string.
func (*VM) GcGrowthTrigger ¶
Run the garbage collector after this amount of growth in the number of objects.
func (*VM) GcMinObjects ¶
Set the number of objects required before a garbage collection cycle is allowed.
func (*VM) ImportCallback ¶
func (vm *VM) ImportCallback(f ImportCallback)
Override the callback used to locate imports.
func (*VM) StringOutput ¶
Expect a string as output and don't JSON encode it.
Directories ¶
Path | Synopsis |
---|---|
Command line tool to try evaluating JSonnet.
|
Command line tool to try evaluating JSonnet. |
Click to show internal directories.
Click to hide internal directories.