params

package
v0.9.1 Latest Latest
Warning

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

Go to latest
Published: Mar 8, 2018 License: Apache-2.0 Imports: 8 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func AppendComponent

func AppendComponent(component, snippet string, params Params) (string, error)

AppendComponent takes the following params

component: the name of the new component to be added.
snippet: a jsonnet snippet resembling the current component parameters.
params: the parameters for the new component.

and returns the jsonnet snippet with the appended component and parameters.

func DeleteComponent added in v0.9.0

func DeleteComponent(component, snippet string) (string, error)

DeleteComponent takes

component: the name of the component to be deleted.
snippet: a jsonnet snippet resembling the current component parameters.

and returns the jsonnet snippet with the removed component.

func DeleteEnvironmentComponent added in v0.9.0

func DeleteEnvironmentComponent(component, snippet string) (string, error)

DeleteEnvironmentComponent takes

component: the name of the component to be deleted.
snippet: a jsonnet snippet resembling the current environment parameters (not expanded).

and returns the jsonnet snippet with the removed component.

func GetAllComponentParams

func GetAllComponentParams(snippet string) (map[string]Params, error)

GetAllComponentParams takes

snippet: the jsonnet snippet containing the component params.

and returns a map of key-value param pairs for each component identified.

func GetAllEnvironmentParams

func GetAllEnvironmentParams(snippet string) (map[string]Params, error)

GetAllEnvironmentParams takes

snippet: the jsonnet snippet containing the environment params. This is
         expected to be non-expanded schema; i.e. does not include the
         component params

and returns a map of key-value param pairs for each component identified.

func SetComponentParams

func SetComponentParams(component, snippet string, params Params) (string, error)

SetComponentParams takes

component: the name of the new component to be modified.
snippet: a jsonnet snippet resembling the current component parameters.
params: the parameters to be set for 'component'.

and returns the jsonnet snippet with the modified set of component parameters.

func SetEnvironmentParams

func SetEnvironmentParams(component, snippet string, params Params) (string, error)

SetEnvironmentParams takes

component: the name of the new component to be modified.
snippet: a jsonnet snippet resembling the current environment parameters (not expanded).
params: the parameters to be set for 'component'.

and returns the jsonnet snippet with the modified set of environment parameters.

Types

type Params

type Params map[string]string

func GetComponentParams

func GetComponentParams(component, snippet string) (Params, error)

GetComponentParams takes

component: the name of the component to retrieve params for.
snippet: the jsonnet snippet containing the component parameters.

and returns a map of key-value param pairs corresponding to that component.

An error will be returned if the component is not found in the snippet.

Jump to

Keyboard shortcuts

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