Documentation ¶
Index ¶
- type PathConfig
- type Transformer
- func NewDefaultingAnnotationsMapTransformer(m map[string]string) (Transformer, error)
- func NewDefaultingLabelsMapTransformer(m map[string]string) (Transformer, error)
- func NewDefaultingNamePrefixTransformer(nameprefix string) (Transformer, error)
- func NewDefaultingNameReferenceTransformer() (Transformer, error)
- func NewMapTransformer(pc []PathConfig, m map[string]string) (Transformer, error)
- func NewMultiTransformer(t []Transformer) Transformer
- func NewNameHashTransformer() Transformer
- func NewNamePrefixTransformer(pc []PathConfig, np string) (Transformer, error)
- func NewNameReferenceTransformer(pc []referencePathConfig) (Transformer, error)
- func NewNoOpTransformer() Transformer
- func NewOverlayTransformer(overlay []*resource.Resource) (Transformer, error)
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type PathConfig ¶
type PathConfig struct { // If true, it will create the path if it is not found. CreateIfNotPresent bool // The GVK that this path tied to. // If unset, it applied to any GVK // If some fields are set, it applies to all matching GVK. GroupVersionKind *schema.GroupVersionKind // Path to the field that will be munged. Path []string }
PathConfig contains the configuration of a field, including the GVK it ties to, path to the field, etc.
type Transformer ¶
type Transformer interface { // Transform modifies objects in a map, e.g. add prefixes or additional labels. Transform(m resource.ResourceCollection) error }
Transformer can transform objects.
func NewDefaultingAnnotationsMapTransformer ¶
func NewDefaultingAnnotationsMapTransformer(m map[string]string) (Transformer, error)
NewDefaultingAnnotationsMapTransformer construct a mapTransformer with defaultAnnotationsPathConfigs.
func NewDefaultingLabelsMapTransformer ¶
func NewDefaultingLabelsMapTransformer(m map[string]string) (Transformer, error)
NewDefaultingLabelsMapTransformer construct a mapTransformer with defaultLabelsPathConfigs.
func NewDefaultingNamePrefixTransformer ¶
func NewDefaultingNamePrefixTransformer(nameprefix string) (Transformer, error)
NewDefaultingNamePrefixTransformer construct a namePrefixTransformer with defaultNamePrefixPathConfigs.
func NewDefaultingNameReferenceTransformer ¶
func NewDefaultingNameReferenceTransformer() (Transformer, error)
NewDefaultingNameReferenceTransformer constructs a nameReferenceTransformer with defaultNameReferencepathConfigs.
func NewMapTransformer ¶
func NewMapTransformer(pc []PathConfig, m map[string]string) (Transformer, error)
NewMapTransformer construct a mapTransformer.
func NewMultiTransformer ¶
func NewMultiTransformer(t []Transformer) Transformer
NewMultiTransformer constructs a multiTransformer.
func NewNameHashTransformer ¶
func NewNameHashTransformer() Transformer
NewNameHashTransformer construct a nameHashTransformer.
func NewNamePrefixTransformer ¶
func NewNamePrefixTransformer(pc []PathConfig, np string) (Transformer, error)
NewNamePrefixTransformer construct a namePrefixTransformer.
func NewNameReferenceTransformer ¶
func NewNameReferenceTransformer(pc []referencePathConfig) (Transformer, error)
NewNameReferenceTransformer construct a nameReferenceTransformer.
func NewNoOpTransformer ¶
func NewNoOpTransformer() Transformer
NewNoOpTransformer constructs a noOpTransformer.
func NewOverlayTransformer ¶
func NewOverlayTransformer(overlay []*resource.Resource) (Transformer, error)
NewOverlayTransformer constructs a overlayTransformer.