gotemplate

package
v0.7.0-alpha.16 Latest Latest
Warning

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

Go to latest
Published: Sep 23, 2023 License: AGPL-3.0 Imports: 15 Imported by: 0

Documentation

Index

Constants

View Source
const (
	DefaultTemplateOps = "missingkey=error"
)
View Source
const (
	GoTemplateLibraryAnnotationKey = "config.kubeblocks.io/go-template-library"
)

Variables

This section is empty.

Functions

This section is empty.

Types

type BuiltInObjectsFunc

type BuiltInObjectsFunc map[string]interface{}

type TplEngine

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

func NewTplEngine

func NewTplEngine(values *TplValues, funcs *BuiltInObjectsFunc, tplName string, cli types2.ReadonlyClient, ctx context.Context) *TplEngine

NewTplEngine creates go template helper

func (*TplEngine) GetTplEngine

func (t *TplEngine) GetTplEngine() *template.Template

func (*TplEngine) Render

func (t *TplEngine) Render(context string) (string, error)

type TplValues

type TplValues map[string]interface{}

func ConstructFunctionArgList

func ConstructFunctionArgList(args ...interface{}) TplValues

Jump to

Keyboard shortcuts

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