jsonnet

package
v0.3.0 Latest Latest
Warning

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

Go to latest
Published: Aug 13, 2019 License: Apache-2.0 Imports: 6 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 jssonet 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 a slice with all files this file imports plus downstream imports

func VisitImports

func VisitImports(sonnet string, jpath []string, v ImportVisitor) error

func VisitImportsFile

func VisitImportsFile(jsonnetFile string, v ImportVisitor) error

Types

type File

type File struct {
	// List of files this file imports
	Imports []string
	// Full list of transitive imports
	Dependencies []string
}

File represents a jsonnet file that may import other files

type ImportVisitor

type ImportVisitor func(who, what string) error

type TraceImporter

type TraceImporter struct {
	JPaths  []string
	Visitor ImportVisitor
	// contains filtered or unexported fields
}

func (*TraceImporter) Import

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

Jump to

Keyboard shortcuts

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