template

package
v0.2.2 Latest Latest
Warning

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

Go to latest
Published: Nov 18, 2021 License: MIT Imports: 7 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 TemplateBuilder

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

func NewTemplateBuilder

func NewTemplateBuilder(data string, inst *cosmov1alpha1.Instance) *TemplateBuilder

func (*TemplateBuilder) Build

func (*TemplateBuilder) ReplaceCustomVars

func (t *TemplateBuilder) ReplaceCustomVars() *TemplateBuilder

func (*TemplateBuilder) ReplaceDefaultVars

func (t *TemplateBuilder) ReplaceDefaultVars() *TemplateBuilder

Jump to

Keyboard shortcuts

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