transformers

package
v2.0.4+incompatible Latest Latest
Warning

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

Go to latest
Published: Feb 23, 2021 License: Apache-2.0 Imports: 11 Imported by: 0

Documentation

Overview

Package transformers has implementations of resmap.ResMap transformers.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type RefVarTransformer

type RefVarTransformer struct {
	// contains filtered or unexported fields
}

func NewRefVarTransformer added in v1.0.2

func NewRefVarTransformer(
	varMap map[string]string, 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.

type Transformer

type Transformer interface {
	// Transform modifies data in the argument, e.g. adding labels to resources that can be labelled.
	Transform(m resmap.ResMap) error
}

A Transformer modifies an instance of resmap.ResMap.

func NewAnnotationsMapTransformer added in v1.0.9

func NewAnnotationsMapTransformer(
	m map[string]string, fs []config.FieldSpec) (Transformer, error)

NewAnnotationsMapTransformer construct a mapTransformer.

func NewImageTransformer

func NewImageTransformer(slice []image.Image) (Transformer, error)

NewImageTransformer constructs an imageTransformer.

func NewLabelsMapTransformer added in v1.0.9

func NewLabelsMapTransformer(
	m map[string]string, fs []config.FieldSpec) (Transformer, error)

NewLabelsMapTransformer constructs a mapTransformer.

func NewMapTransformer

func NewMapTransformer(
	pc []config.FieldSpec, m map[string]string) (Transformer, error)

NewMapTransformer construct a mapTransformer.

func NewMultiTransformer

func NewMultiTransformer(t []Transformer) Transformer

NewMultiTransformer constructs a multiTransformer.

func NewMultiTransformerWithConflictCheck added in v1.0.8

func NewMultiTransformerWithConflictCheck(t []Transformer) Transformer

NewMultiTransformerWithConflictCheck constructs a multiTransformer with checking of conflicts.

func NewNamePrefixSuffixTransformer added in v1.0.11

func NewNamePrefixSuffixTransformer(
	np, ns string, fieldSpecs []config.FieldSpec) (Transformer, error)

NewNamePrefixSuffixTransformer makes a namePrefixSuffixTransformer.

func NewNameReferenceTransformer

func NewNameReferenceTransformer(br []config.NameBackReferences) Transformer

NewNameReferenceTransformer constructs a nameReferenceTransformer with a given slice of NameBackReferences.

func NewNamespaceTransformer added in v1.0.2

func NewNamespaceTransformer(ns string, cf []config.FieldSpec) Transformer

NewNamespaceTransformer construct a namespaceTransformer.

func NewNoOpTransformer

func NewNoOpTransformer() Transformer

NewNoOpTransformer constructs a noOpTransformer.

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

Jump to

Keyboard shortcuts

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