params

package
v0.11.0 Latest Latest
Warning

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

Go to latest
Published: May 31, 2018 License: Apache-2.0 Imports: 16 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func DeleteFromObject

func DeleteFromObject(fieldPath []string, paramsData, key, root string) (string, error)

DeleteFromObject deletes a value from an object. `root` will generally be either `components` or `global`. `key` is the component name.

func EvaluateEnv

func EvaluateEnv(a app.App, sourcePath, paramsStr, envName string) (string, error)

EvaluateEnv evaluates an env with jsonnet.

func PatchJSON

func PatchJSON(jsonObject, patch, patchName string) (string, error)

PatchJSON patches components.

func SetInObject

func SetInObject(fieldPath []string, paramsData, key string, value interface{}, root string) (string, error)

SetInObject sets a value in an object. `root` will generally be either `components` or `global`. `key` is the component name.

func ToMap

func ToMap(componentName, src, root string) (map[string]interface{}, error)

ToMap converts a component's params to a map.

Types

type EnvComponentRemover

type EnvComponentRemover struct {
}

EnvComponentRemover removes param configuration for components from env params libsonnet files.

func NewEnvComponentRemover

func NewEnvComponentRemover() *EnvComponentRemover

NewEnvComponentRemover creates an instance of EnvComponentRemover.

func (*EnvComponentRemover) Remove

func (ecr *EnvComponentRemover) Remove(componentName, snippet string) (string, error)

Remove removes component name from the jsonnet snippet.

type EnvGlobalsSet

type EnvGlobalsSet struct {
}

EnvGlobalsSet sets environment globals.

func NewEnvGlobalsSet

func NewEnvGlobalsSet() *EnvGlobalsSet

NewEnvGlobalsSet creates an instance of EnvGlobalsSet.

func (*EnvGlobalsSet) Set

func (egs *EnvGlobalsSet) Set(snippet string, p params.Params) (string, error)

Set sets params in environment globals files.

type EnvGlobalsUnset

type EnvGlobalsUnset struct {
}

EnvGlobalsUnset un-sets global environment params.

func NewEnvGlobalsUnset

func NewEnvGlobalsUnset() *EnvGlobalsUnset

NewEnvGlobalsUnset creates an instance of EnvGlobalsUnset.

func (*EnvGlobalsUnset) Unset

func (epu *EnvGlobalsUnset) Unset(paramName, snippet string) (string, error)

Unset un-sets globals.

type EnvParamSet

type EnvParamSet struct {
}

EnvParamSet sets environment params for a component.

func NewEnvParamSet

func NewEnvParamSet() *EnvParamSet

NewEnvParamSet creates an instance of EnvParamSet.

func (*EnvParamSet) Set

func (epa *EnvParamSet) Set(componentName, snippet string, p params.Params) (string, error)

Set sets params in environment parameter files.

type EnvParamUnset

type EnvParamUnset struct {
}

EnvParamUnset unset param configuration for components from env params libsonnet files.

func NewEnvParamUnset

func NewEnvParamUnset() *EnvParamUnset

NewEnvParamUnset creates an instance of EnvParamUnset.

func (*EnvParamUnset) Unset

func (epu *EnvParamUnset) Unset(componentName, paramName, snippet string) (string, error)

Unset un-sets params.

Jump to

Keyboard shortcuts

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