transformer

package
v0.1.0 Latest Latest
Warning

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

Go to latest
Published: Oct 24, 2021 License: MIT Imports: 12 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Name

func Name(trans Transformer) string

func NestedMap

func NestedMap(objMap map[string]interface{}, path string) (map[string]interface{}, bool)

func NestedMapDelete

func NestedMapDelete(objMap map[string]interface{}, path string) bool

func NestedSlice

func NestedSlice(objMap map[string]interface{}, path string) ([]interface{}, bool)

func ToObject

func ToObject(u map[string]interface{}, obj interface{}) error

ToObject makes Unstructured to object obj must to be the pointer of object struct

func ToUnstructured

func ToUnstructured(obj interface{}) (map[string]interface{}, error)

ToUnstructured makes object to a property of Unstructured object must be bool, int64, float64, string, []interface{}, map[string]interface{}, json.Number or nil

Types

type JSONPatchTransformer

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

func NewJSONPatchTransformer

func NewJSONPatchTransformer(json6902 []cosmov1alpha1.Json6902, instName string) *JSONPatchTransformer

func (*JSONPatchTransformer) Transform

type MetadataTransformer

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

func NewMetadataTransformer

func NewMetadataTransformer(inst *cosmov1alpha1.Instance, tmpl *cosmov1alpha1.Template, scheme *runtime.Scheme) *MetadataTransformer

func (*MetadataTransformer) Transform

type NetworkTransformer

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

func NewNetworkTransformer

func NewNetworkTransformer(netSpec *cosmov1alpha1.NetworkOverrideSpec, instName string) *NetworkTransformer

func (*NetworkTransformer) Transform

type ScalingTransformer

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

func NewScalingTransformer

func NewScalingTransformer(ScalingOverrideSpecs []cosmov1alpha1.ScalingOverrideSpec, instName string) *ScalingTransformer

func (*ScalingTransformer) Transform

type Transformer

type Transformer interface {
	Transform(*unstructured.Unstructured) (*unstructured.Unstructured, error)
}

Jump to

Keyboard shortcuts

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