jsonnet

package
v0.6.1 Latest Latest
Warning

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

Go to latest
Published: Jan 6, 2020 License: Apache-2.0 Imports: 12 Imported by: 2

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Evaluate

func Evaluate(sonnet string, jpath []string) (string, error)

Evaluate renders the given jsonnet into a string

func EvaluateFile

func EvaluateFile(jsonnetFile string) (string, error)

EvaluateFile opens the file, reads it into memory and evaluates it afterwards (`Evaluate()`)

func TransitiveImports

func TransitiveImports(filename string) ([]string, error)

TransitiveImports returns all recursive imports of a file

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"`

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

func (*ExtendedImporter) Import added in v0.6.0

func (i *ExtendedImporter) Import(importedFrom, importedPath string) (contents jsonnet.Contents, foundAt string, err error)

Import implements the functionality offered by the ExtendedImporter

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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