Documentation
¶
Index ¶
- func ConvertObjectToMap(obj *astext.Object) (map[string]interface{}, error)
- func DecodeValue(s string) (interface{}, error)
- func FieldID(field astext.ObjectField) (string, error)
- func FindObject(object *astext.Object, path []string) (*astext.Object, error)
- func HasField(object *astext.Object, name string) bool
- func Import(filename string) (*astext.Object, error)
- func ImportFromFs(filename string, fs afero.Fs) (*astext.Object, error)
- func ImportNodeFromFs(filename string, fs afero.Fs) (ast.Node, error)
- func Parse(filename, src string) (*astext.Object, error)
- func ParseNode(filename, src string) (ast.Node, error)
- func Set(object *astext.Object, path []string, value ast.Node) error
- type VM
- type VMOpt
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func ConvertObjectToMap ¶
ConvertObjectToMap converts an object to a map.
func DecodeValue ¶
DecodeValue decodes a string to an interface value. nolint: gocyclo
func FieldID ¶
func FieldID(field astext.ObjectField) (string, error)
FieldID returns the id for an object field.
func FindObject ¶
FindObject finds a path in an object.
func ImportFromFs ¶
ImportFromFs imports jsonnet object from a path on an afero filesystem.
func ImportNodeFromFs ¶
ImportNodeFromFs imports jsonnet node from a path on an afero filesystem.
Types ¶
type VM ¶
type VM struct { // UseMemoryImporter forces the vm to use a memory importer rather than the // file import. UseMemoryImporter bool Fs afero.Fs // contains filtered or unexported fields }
VM is a ksonnet wrapper for the jsonnet VM.
func (*VM) EvaluateSnippet ¶
EvaluateSnippet evaluates a jsonnet snippet.
Click to show internal directories.
Click to hide internal directories.