Documentation ¶
Overview ¶
Utilities to aid transformer plugins.
TODO: Push remaining code down into the plugins or into an appropriately named utility package. This package made more sense in the pre-plugin days.
Index ¶
- func MutateField(m map[string]interface{}, pathToField []string, createIfNotPresent bool, ...) error
- func NewAnnotationsMapTransformer(m map[string]string, fs []config.FieldSpec) (resmap.Transformer, error)
- func NewLabelsMapTransformer(m map[string]string, fs []config.FieldSpec) (resmap.Transformer, error)
- func NewMapTransformer(pc []config.FieldSpec, m map[string]string) (resmap.Transformer, error)
- func NewMultiTransformer(t []resmap.Transformer) resmap.Transformer
- func NewNameReferenceTransformer(br []config.NameBackReferences) resmap.Transformer
- func NewNoOpTransformer() resmap.Transformer
- type RefVarTransformer
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func MutateField ¶
func NewAnnotationsMapTransformer ¶
func NewAnnotationsMapTransformer( m map[string]string, fs []config.FieldSpec) (resmap.Transformer, error)
NewAnnotationsMapTransformer construct a mapTransformer.
func NewLabelsMapTransformer ¶
func NewLabelsMapTransformer( m map[string]string, fs []config.FieldSpec) (resmap.Transformer, error)
NewLabelsMapTransformer constructs a mapTransformer.
func NewMapTransformer ¶
NewMapTransformer construct a mapTransformer.
func NewMultiTransformer ¶
func NewMultiTransformer(t []resmap.Transformer) resmap.Transformer
NewMultiTransformer constructs a multiTransformer.
func NewNameReferenceTransformer ¶
func NewNameReferenceTransformer(br []config.NameBackReferences) resmap.Transformer
NewNameReferenceTransformer constructs a nameReferenceTransformer with a given slice of NameBackReferences.
func NewNoOpTransformer ¶
func NewNoOpTransformer() resmap.Transformer
NewNoOpTransformer constructs a noOpTransformer.
Types ¶
type RefVarTransformer ¶
type RefVarTransformer struct {
// contains filtered or unexported fields
}
func NewRefVarTransformer ¶
func NewRefVarTransformer( varMap map[string]interface{}, fs []config.FieldSpec) *RefVarTransformer
NewRefVarTransformer returns a new RefVarTransformer that replaces $(VAR) style variables with values. The fieldSpecs are the places to look for occurrences of $(VAR).
func (*RefVarTransformer) Transform ¶
func (rv *RefVarTransformer) Transform(m resmap.ResMap) error
Transform replaces $(VAR) style variables with values.
func (*RefVarTransformer) UnusedVars ¶
func (rv *RefVarTransformer) UnusedVars() []string
UnusedVars returns slice of Var names that were unused after a Transform run.
Source Files ¶
Directories ¶
Path | Synopsis |
---|---|
Package config provides the functions to load default or user provided configurations for different transformers
|
Package config provides the functions to load default or user provided configurations for different transformers |
defaultconfig
Package defaultconfig provides the default transformer configurations
|
Package defaultconfig provides the default transformer configurations |