v1alpha1

package
v1.11.0-RC1 Latest Latest
Warning

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

Go to latest
Published: Jun 9, 2020 License: Apache-2.0 Imports: 10 Imported by: 9

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func ConfigToMap

func ConfigToMap(all []v1alpha1.Config) (m map[string]interface{}, err error)

ConfigToMap transforms CAS template config type to a nested map

func Engine

func Engine(cast *v1alpha1.CASTemplate, key string, values map[string]interface{}) (e *engine, err error)

Engine returns a new instance of engine

func MergeConfig

func MergeConfig(highPriority, lowPriority []v1alpha1.Config) (final []v1alpha1.Config)

MergeConfig will merge configuration fields from lowPriority that are not present in highPriority configuration and return the resulting config

func UnMarshallToConfig

func UnMarshallToConfig(config string) (configs []v1alpha1.Config, err error)

UnMarshallToConfig un-marshals the provided cas template config in a yaml string format to a typed list of cas template config

Types

type Configurer

type Configurer interface {
	SetConfig(values map[string]interface{})
	SetValues(key string, values map[string]interface{})
}

Configurer abstracts configuring a cas template object

type Interface

type Interface interface {
	Configurer
	Runner
}

Interface abstracts various operations exposed by cas template engine

type Kubeclient

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

Kubeclient enables kubernetes API operationson castemplate instance

func KubeClient

func KubeClient(opts ...KubeclientBuildOption) *Kubeclient

KubeClient returns a new instance of kubeclient meant for castemplate related operations

func (*Kubeclient) Get

func (k *Kubeclient) Get(name string, opts metav1.GetOptions) (*apis.CASTemplate, error)

Get returns a castemplate instance for given name

type KubeclientBuildOption

type KubeclientBuildOption func(*Kubeclient)

KubeclientBuildOption defines the abstraction to build a Kubeclient instance

func WithClientset

func WithClientset(c *clientset.Clientset) KubeclientBuildOption

WithClientset sets the kubernetes clientset against the kubeclient instance

type Runner

type Runner interface {
	Run() (output []byte, err error)
}

Runner abstracts execution of cas template engine

Jump to

Keyboard shortcuts

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