v1

package module
v0.1.1 Latest Latest
Warning

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

Go to latest
Published: Nov 25, 2019 License: Apache-2.0 Imports: 21 Imported by: 0

Documentation

Index

Constants

View Source
const (
	Metadata     = "metadata"
	Namespace    = "namespace"
	GetValueFrom = "getValueFrom"

	Name         = "name"
	Labels       = "labels"
	Transformers = "format-transformers"
)
View Source
const (
	// Base64ToString - name of the base64 to string transformer
	Base64ToString = "Base64ToString"

	// StringToBase64 - name of the string to base64 transformer
	StringToBase64 = "StringToBase64"

	// StringToInt - name of the string to integer transformer
	StringToInt = "StringToInt"

	// StringToFloat - name of the string to float transformer
	StringToFloat = "StringToFloat"

	// StringToBool - name of the string to boolean transformer
	StringToBool = "StringToBool"

	// ArrayToCSString - name of the array to Comma Separated String (CSS) transformer
	ArrayToCSString = "ArrayToCSString"

	// JSONToObject - name of the JSON to object transformer
	JSONToObject = "JsonToObject"

	// ObjectToJSON - name of the object to JSON transformer
	ObjectToJSON = "ObjectToJson"

	// ToString - name of the transformer, that transforms any object to its native string representation
	ToString = "ToString"
)

Variables

This section is empty.

Functions

func Array2CSStringTransformer

func Array2CSStringTransformer(intValue interface{}) (interface{}, error)

Array2CSStringTransformer ...

func Base642StringTransformer

func Base642StringTransformer(value interface{}) (interface{}, error)

Base642StringTransformer ...

func CompoundTransformer

func CompoundTransformer(value interface{}, transformers ...Transformer) (interface{}, error)

CompoundTransformer - the function that combines several transformers

func CompoundTransformerNames

func CompoundTransformerNames(value interface{}, transNames ...string) (interface{}, error)

CompoundTransformerNames returns names of the given transformers

func GetInt32ValueFromRaw added in v0.1.1

func GetInt32ValueFromRaw(content *runtime.RawExtension) (int32, error)

GetInt32ValueFromRaw is a helper utility to obtain an Int32 from Raw

func GetInt64ValueFromRaw added in v0.1.1

func GetInt64ValueFromRaw(content *runtime.RawExtension) (int64, error)

GetInt64ValueFromRaw is a helper utility to obtain an Int64 from Raw

func GetIntValueFromRaw added in v0.1.1

func GetIntValueFromRaw(content *runtime.RawExtension) (int, error)

GetIntValueFromRaw is a helper utility to obtain an Int from Raw

func GetStringValueFromRaw added in v0.1.1

func GetStringValueFromRaw(content *runtime.RawExtension) (string, error)

GetStringValueFromRaw is a helper utility to obtain an String from Raw

func GetValueFromRaw added in v0.1.1

func GetValueFromRaw(content *runtime.RawExtension) (interface{}, error)

GetValueFromRaw is a helper utility to obtain an interface from Raw

func JSONToObjectTransformer

func JSONToObjectTransformer(value interface{}) (interface{}, error)

JSONToObjectTransformer ...

func NameMatchesResource

func NameMatchesResource(kind string, resource metav1.APIResource, resGroup string) bool

NameMatchesResource checks if the given resource name/kind matches with API resource and its group

func ObjectToJSONTransformer

func ObjectToJSONTransformer(value interface{}) (interface{}, error)

ObjectToJSONTransformer ...

func String2Base64Transformer

func String2Base64Transformer(value interface{}) (interface{}, error)

String2Base64Transformer ...

func String2BoolTransformer

func String2BoolTransformer(value interface{}) (interface{}, error)

String2BoolTransformer ...

func String2FloatTransformer

func String2FloatTransformer(value interface{}) (interface{}, error)

String2FloatTransformer ...

func String2IntTransformer

func String2IntTransformer(value interface{}) (interface{}, error)

String2IntTransformer ...

func ToStringTransformer

func ToStringTransformer(value interface{}) (interface{}, error)

ToStringTransformer ...

Types

type ComposableCache

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

ComposableCache caches objects that have been read so far in a reconcile cycle

type ComposableError

type ComposableError struct {
	Error error
	// This indicates that the consuming Reconcile function should return this error
	ShouldBeReturned bool
}

ComposableError is the error type returned by the composable's Resolve function

func Resolve

func Resolve(r client.Client, cfg *rest.Config, object interface{}, composableNamespace string) (unstructured.Unstructured, *ComposableError)

Resolve resolves an object and returns an Unstructured

func ResolveObject added in v0.1.1

func ResolveObject(r client.Client, config *rest.Config, object interface{}, resolved interface{}, composableNamespace string) *ComposableError

ResolveObject resolves the object into resolved

type Transformer

type Transformer func(interface{}) (interface{}, error)

Transformer - the base transformer function

Jump to

Keyboard shortcuts

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