template

package
Version: v0.4.0 Latest Latest
Warning

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

Go to latest
Published: Mar 3, 2022 License: MIT Imports: 8 Imported by: 0

Documentation

Index

Constants

View Source
const (
	DefaultVarsInstance  = "{{INSTANCE}}"
	DefaultVarsNamespace = "{{NAMESPACE}}"
	DefaultVarsTemplate  = "{{TEMPLATE}}"
)

Variables

View Source
var (
	ErrInvalidVars = errors.New("invalid Vars string")
)

Functions

func FixupTemplateVarKey

func FixupTemplateVarKey(key string) string

func GetTemplateType

func GetTemplateType(l LabelHolder) (string, bool)

func SetTemplateType

func SetTemplateType(l LabelHolder, tmplType string)

func UnstructuredToJSONBytes

func UnstructuredToJSONBytes(obj *unstructured.Unstructured) ([]byte, error)

func ValidCustomVars

func ValidCustomVars(varString string) error

Types

type LabelHolder

type LabelHolder interface {
	GetLabels() map[string]string
	SetLabels(map[string]string)
}

type UnstructuredBuilder added in v0.3.0

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

func NewUnstructuredBuilder added in v0.3.0

func NewUnstructuredBuilder(rawYaml string, inst *cosmov1alpha1.Instance) *UnstructuredBuilder

func (*UnstructuredBuilder) Build added in v0.3.0

func (*UnstructuredBuilder) ReplaceCustomVars added in v0.3.0

func (t *UnstructuredBuilder) ReplaceCustomVars() *UnstructuredBuilder

func (*UnstructuredBuilder) ReplaceDefaultVars added in v0.3.0

func (t *UnstructuredBuilder) ReplaceDefaultVars() *UnstructuredBuilder

Jump to

Keyboard shortcuts

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