template

package
v0.1.59 Latest Latest
Warning

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

Go to latest
Published: Oct 1, 2025 License: GPL-3.0 Imports: 21 Imported by: 1

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Extract added in v0.0.137

func Extract(namekey string) (string, string, error)

func FQDN added in v0.1.42

func FQDN(name string) string

func Fetch added in v0.1.4

func Fetch(format iformat.Format, name string, client *clients.Http, user *authentication.User) ([]byte, f.Format, error)

func Lookup added in v0.0.137

func Lookup(placeholder string, client *clients.Http, user *authentication.User, runtime *smaps.Smap, dependencies []f.Format, depth int) (string, error)

func Parse added in v0.0.137

func Parse(name string, value string, client *clients.Http, user *authentication.User, runtime *smaps.Smap, depth int) (string, []f.Format, error)

Types

type Builder added in v0.1.56

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

func NewBuilder added in v0.1.56

func NewBuilder() *Builder

func NewBuilderEmpty added in v0.1.56

func NewBuilderEmpty() *Builder

func (*Builder) Build added in v0.1.56

func (b *Builder) Build() *FunctionManager

func (*Builder) WithFunction added in v0.1.56

func (b *Builder) WithFunction(name string, fn interface{}) *Builder

func (*Builder) WithFunctions added in v0.1.56

func (b *Builder) WithFunctions(functions map[string]interface{}) *Builder

func (*Builder) WithoutFunction added in v0.1.56

func (b *Builder) WithoutFunction(name string) *Builder

func (*Builder) WithoutFunctions added in v0.1.56

func (b *Builder) WithoutFunctions(names ...string) *Builder

type FunctionManager added in v0.1.56

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

func NewEmptyFunctionManager added in v0.1.56

func NewEmptyFunctionManager() *FunctionManager

func NewFunctionManager added in v0.1.56

func NewFunctionManager() *FunctionManager

func (*FunctionManager) AddFunction added in v0.1.56

func (fm *FunctionManager) AddFunction(name string, fn interface{}) error

func (*FunctionManager) AddFunctions added in v0.1.56

func (fm *FunctionManager) AddFunctions(functions map[string]interface{}) error

func (*FunctionManager) Clear added in v0.1.56

func (fm *FunctionManager) Clear()

func (*FunctionManager) Clone added in v0.1.56

func (fm *FunctionManager) Clone() *FunctionManager

func (*FunctionManager) Count added in v0.1.56

func (fm *FunctionManager) Count() int

func (*FunctionManager) FuncMap added in v0.1.56

func (fm *FunctionManager) FuncMap() template.FuncMap

func (*FunctionManager) GetFunction added in v0.1.56

func (fm *FunctionManager) GetFunction(name string) (interface{}, bool)

func (*FunctionManager) HasFunction added in v0.1.56

func (fm *FunctionManager) HasFunction(name string) bool

func (*FunctionManager) ListFunctions added in v0.1.56

func (fm *FunctionManager) ListFunctions() []string

func (*FunctionManager) LoadDefaultFunctions added in v0.1.56

func (fm *FunctionManager) LoadDefaultFunctions()

func (*FunctionManager) RemoveFunction added in v0.1.56

func (fm *FunctionManager) RemoveFunction(name string)

func (*FunctionManager) RemoveFunctions added in v0.1.56

func (fm *FunctionManager) RemoveFunctions(names ...string)

type Template added in v0.0.137

type Template struct {
	Name      string
	Templated string
	Values    Variables
	Functions template.FuncMap
}

func New added in v0.0.137

func New(name string, tmpl string, values Variables, functions template.FuncMap) Template

func (Template) Parse added in v0.0.137

func (tmpl Template) Parse(left string, right string) (string, error)

type Variables added in v0.0.137

type Variables struct {
	Values map[string]interface{}
}

Jump to

Keyboard shortcuts

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