Documentation
¶
Overview ¶
Package vm allows flexible creation of a Jsonnet VM.
Index ¶
- func ConfigFromCommandParams(cmd *cobra.Command, prefix string, addShortcuts bool) func() (Config, error)
- type Config
- func (c Config) CodeVars() map[string]string
- func (c Config) HasTopLevelVar(name string) bool
- func (c Config) HasVar(name string) bool
- func (c Config) LibPaths() []string
- func (c Config) TopLevelCodeVars() map[string]string
- func (c Config) TopLevelVars() map[string]string
- func (c Config) Vars() map[string]string
- func (c Config) WithCodeVars(add map[string]string) Config
- func (c Config) WithImporter(importer jsonnet.Importer) Config
- func (c Config) WithLibPaths(paths []string) Config
- func (c Config) WithTopLevelCodeVars(add map[string]string) Config
- func (c Config) WithTopLevelVars(add map[string]string) Config
- func (c Config) WithVars(add map[string]string) Config
- func (c Config) WithoutTopLevel() Config
- type VM
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
Types ¶
type Config ¶
type Config struct {
// contains filtered or unexported fields
}
Config is the desired configuration of the Jsonnet VM.
func (Config) CodeVars ¶
CodeVars returns the code external variables defined for this config.
func (Config) HasTopLevelVar ¶ added in v0.6.4
HasTopLevelVar returns true if the specified TLA variable is defined.
func (Config) HasVar ¶ added in v0.6.4
HasVar returns true if the specified external variable is defined.
func (Config) LibPaths ¶
LibPaths returns the library paths for this config.
func (Config) TopLevelCodeVars ¶
TopLevelCodeVars returns the code top-level variables defined for this config.
func (Config) TopLevelVars ¶
TopLevelVars returns the string top-level variables defined for this config.
func (Config) Vars ¶
Vars returns the string external variables defined for this config.
func (Config) WithCodeVars ¶
WithCodeVars returns a config with additional code variables in its environment.
func (Config) WithImporter ¶ added in v0.6.4
WithImporter returns a config with the supplied importer.
func (Config) WithLibPaths ¶
WithLibPaths returns a config with additional library paths.
func (Config) WithTopLevelCodeVars ¶ added in v0.6.4
WithTopLevelCodeVars returns a config with additional top-level code variables in its environment.
func (Config) WithTopLevelVars ¶ added in v0.6.4
WithTopLevelVars returns a config with additional top-level string variables in its environment.
func (Config) WithVars ¶
WithVars returns a config with additional string variables in its environment.
type VM ¶
type VM struct { *jsonnet.VM // contains filtered or unexported fields }
VM wraps a jsonnet VM and provides some additional methods to create new VMs using the same base configuration and additional tweaks.
Source Files
¶
- helm.go
- nativefuncs.go
- vm.go
- yaml.go