template

package
v0.1.0 Latest Latest
Warning

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

Go to latest
Published: Mar 5, 2023 License: BSD-3-Clause Imports: 14 Imported by: 0

Documentation

Index

Constants

View Source
const (
	DAY90 = 90 * 24 * time.Hour
	DAY10 = 10 * 24 * time.Hour
	DAY7  = 7 * 24 * time.Hour
	DAY   = 24 * time.Hour
)

Variables

View Source
var (
	Globals        = make(map[string]interface{})
	GlobalFuncs    = make(map[string]func(map[string]interface{}) interface{})
	RegisterTag    = pongo2.RegisterTag
	RegisterFilter = pongo2.RegisterFilter
)

Functions

func Expr

func Expr(expr string) (*pongo2.Template, error)

func Register

func Register(k string, v interface{})

func RegisterFunc

func RegisterFunc(k string, v func(map[string]interface{}) interface{})

Types

type Interface

type Interface interface {
	Lookup(string) (Writer, error)
}

func New

func New(conf config.Config, theme fs.FS) Interface

type Writer

type Writer interface {
	Name() string
	Write(string, map[string]interface{}) error
	Execute(map[string]interface{}) (string, error)
}

Jump to

Keyboard shortcuts

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