Documentation ¶
Overview ¶
Package template provides functions for templating yaml files.
Package template provides functions for templating yaml files.
Index ¶
- func ProcessYamlFilesInPath(path string, component types.JackalComponent, values Values) ([]string, error)
- func ReplaceTextTemplate(path string, mappings map[string]*TextTemplate, deprecations map[string]string, ...) error
- type TextTemplate
- type Values
- func (values *Values) Apply(component types.JackalComponent, path string, ignoreReady bool) error
- func (values *Values) GetVariables(component types.JackalComponent) (templateMap map[string]*TextTemplate, deprecations map[string]string)
- func (values *Values) Ready() bool
- func (values *Values) SetState(state *types.JackalState)
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func ProcessYamlFilesInPath ¶
func ProcessYamlFilesInPath(path string, component types.JackalComponent, values Values) ([]string, error)
ProcessYamlFilesInPath iterates over all yaml files in a given path and performs Jackal templating + image swapping.
func ReplaceTextTemplate ¶
func ReplaceTextTemplate(path string, mappings map[string]*TextTemplate, deprecations map[string]string, templateRegex string) error
ReplaceTextTemplate loads a file from a given path, replaces text in it and writes it back in place.
Types ¶
type TextTemplate ¶
type TextTemplate struct { Sensitive bool AutoIndent bool Type types.VariableType Value string }
TextTemplate represents a value to be templated into a text file.
type Values ¶
type Values struct {
// contains filtered or unexported fields
}
Values contains the values to be used in the template.
func Generate ¶
func Generate(cfg *types.PackagerConfig) (*Values, error)
Generate returns a Values struct with the values to be used in the template.
func (*Values) GetVariables ¶
func (values *Values) GetVariables(component types.JackalComponent) (templateMap map[string]*TextTemplate, deprecations map[string]string)
GetVariables returns the variables to be used in the template.
func (*Values) SetState ¶
func (values *Values) SetState(state *types.JackalState)
SetState sets the state
Click to show internal directories.
Click to hide internal directories.