v1

package module
v0.1.0 Latest Latest
Warning

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

Go to latest
Published: Nov 12, 2019 License: Apache-2.0 Imports: 19 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 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
}

type ComposableError

type ComposableError struct {
	Error error
	// TODO do we need this state separation
	IsPendable bool
	// if the error is retrievable the controller will return it to the manager, and teh last will recall Reconcile again
	IsRetrievable bool
}

func Resolve

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

type ComposableGetValueFrom

type ComposableGetValueFrom struct {
	Kind               string   `json:"kind"`
	APIVersion         string   `json:"apiVersion,omitempty"`
	Name               string   `json:"name"`
	Namespace          string   `json:"namespace,omitempty"`
	Path               string   `json:"path"`
	FormatTransformers []string `json:"format-transformers,omitempty"`
}

ComposableGetValueFrom is the struct for Composable getValueFrom

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