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) HasTopLevelVar ¶ added in v0.6.2
HasTopLevelVar returns true if the specified TLA variable is defined.
func (Config) HasVar ¶ added in v0.6.2
HasVar returns true if the specified external variable is defined.
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) WithCodeVars ¶
WithCodeVars returns a config with additional code variables in its environment.
func (Config) WithImporter ¶ added in v0.6.2
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.2
WithTopLevelCodeVars returns a config with additional top-level code variables in its environment.
func (Config) WithTopLevelVars ¶ added in v0.6.2
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.
func (Config) WithoutTopLevel ¶ added in v0.6.2
WithoutTopLevel returns a config that does not have any top level variables set.