gotemplate

package
v0.6.0-alpha.3 Latest Latest
Warning

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

Go to latest
Published: May 25, 2023 License: AGPL-3.0 Imports: 14 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 create go template helper To support this caller has a concept of import dependency which is recursive.

As it recurses, it also sets the values to be appropriate for the parameters of the called function, it looks like it's calling a local function.

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