externals

package
v0.14.6 Latest Latest
Warning

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

Go to latest
Published: Aug 16, 2021 License: Apache-2.0 Imports: 8 Imported by: 0 modules, 0 packages

The first number is the count of modules that contain a package that imports this one. The module count is a better indicator of popularity than the package count. A module with 100 importing packages is counted only once instead of 100 times, reflecting the fact that the choice to use the package was likely made only once, not 100 times.
A '?' means that the value hasn't been computed yet.

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func FromCommandParams

func FromCommandParams(cmd *cobra.Command, prefix string, addShortcuts bool) func() (Externals, error)

FromCommandParams attaches VM related flags to the specified command and returns a function that provides the config based on command line flags.

Types

type Externals

type Externals struct {
	Variables   UserVariables // variables specified on command line
	LibPaths    []string      // library paths in filesystem for the file importer
	DataSources []string      // data sources defined on the command line
}

Externals is the desired configuration of the Jsonnet VM as specified by the user.

func (Externals) WithLibPaths

func (c Externals) WithLibPaths(paths []string) Externals

WithLibPaths returns a config with additional library paths.

type UserVal

type UserVal struct {
	Value string // variable value
	Code  bool   // whether the value should be treated as jsonnet code
}

UserVal is a user-supplied variable value to be initialized for the jsonnet VM

type UserVariables

type UserVariables struct {
	Vars         map[string]UserVal // variables keyed by name
	TopLevelVars map[string]UserVal // TLA string vars keyed by name
}

UserVariables is a set of user-provided variables to be registered with a jsonnet VM

Jump to

Keyboard shortcuts

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