template

package
v0.0.0-...-e537141 Latest Latest
Warning

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

Go to latest
Published: Jun 9, 2023 License: GPL-3.0 Imports: 9 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var ErrFuncsDisallowed = fmt.Errorf("error: engine does not implement setting FuncMap")

Functions

This section is empty.

Types

type HandlebarTemplates

type HandlebarTemplates map[string]*raymond.Template

type HandlebarsEngine

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

func (*HandlebarsEngine) GetStringTemplate

func (h *HandlebarsEngine) GetStringTemplate(inline string) (*raymond.Template, error)

func (*HandlebarsEngine) ParseTemplate

func (h *HandlebarsEngine) ParseTemplate(name string, content io.Reader) (err error)

func (*HandlebarsEngine) Render

func (h *HandlebarsEngine) Render(ctx context.Context, cfg template.Config) error

func (*HandlebarsEngine) RenderParsed

func (h *HandlebarsEngine) RenderParsed(ctx context.Context, id string, cfg template.Config) error

func (*HandlebarsEngine) RenderTpl

func (h *HandlebarsEngine) RenderTpl(ctx context.Context, inline string, cfg template.Config) error

func (*HandlebarsEngine) SetFuncs

func (h *HandlebarsEngine) SetFuncs(funcs template.FuncMap) (err error)

type PongoConfig

type PongoConfig struct {
	BaseDir *string
	Name    string
}

func (PongoConfig) BuildParser

func (cfg PongoConfig) BuildParser() (PongoParser, error)

func (PongoConfig) FromPaths

func (cfg PongoConfig) FromPaths(paths template.Paths) (PongoEngine, error)

func (PongoConfig) Loader

func (cfg PongoConfig) Loader() (pongo.TemplateLoader, error)

func (PongoConfig) Set

func (cfg PongoConfig) Set() (*pongo.TemplateSet, error)

func (PongoConfig) SetWithLoader

func (cfg PongoConfig) SetWithLoader(loaders ...pongo.TemplateLoader) *pongo.TemplateSet

type PongoEngine

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

func EmptyPongoEngine

func EmptyPongoEngine() PongoEngine

func (PongoEngine) GetTemplate

func (pg PongoEngine) GetTemplate(template string) (*pongo.Template, error)

func (PongoEngine) ParseTemplate

func (pg PongoEngine) ParseTemplate(name string, content io.Reader) (err error)

func (PongoEngine) Render

func (pg PongoEngine) Render(ctx context.Context, cfg template.Config) (err error)

func (PongoEngine) SetFuncs

func (pg PongoEngine) SetFuncs(funcs template.FuncMap) error

type PongoParser

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

func (PongoParser) ParseString

func (p PongoParser) ParseString(name, tpl string) (template.Template, error)

func (PongoParser) ParseTemplate

func (p PongoParser) ParseTemplate(name string, from io.Reader) (template.Template, error)

Jump to

Keyboard shortcuts

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