transformers

package
v1.0.10 Latest Latest
Warning

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

Go to latest
Published: Oct 26, 2018 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 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 NewImageTagTransformer added in v1.0.5

func NewImageTagTransformer(slice []types.ImageTag) (Transformer, error)

NewImageTagTransformer constructs a imageTagTransformer.

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 NewNamePrefixTransformer

func NewNamePrefixTransformer(np string, pc []config.FieldSpec) (Transformer, error)

NewNamePrefixTransformer construct a namePrefixTransformer.

func NewNameReferenceTransformer

func NewNameReferenceTransformer(
	br []config.NameBackReferences) (Transformer, error)

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.

func NewRefVarTransformer added in v1.0.2

func NewRefVarTransformer(vars map[string]string, p []config.FieldSpec) Transformer

NewRefVarTransformer returns a Trasformer that replaces $(VAR) style variables with values.

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