Documentation ¶
Index ¶
- func Add(c Config)
- func FRender(b io.Writer, context any, baseKey string, path ...string) error
- func Funcs(funcs template.FuncMap)
- func Overrides(funcs ...func(any) (any, error))
- func Processors(funcs ...func(any))
- func Render(context any, baseKey string, path ...string) (template.HTML, error)
- func RequestProcessors(funcs ...func(ctx.ContextWithRequest))
- type Config
- type Renderer
- type TemplateRenderer
- func (r *TemplateRenderer) Add(cfg Config)
- func (r *TemplateRenderer) FS() fs.FS
- func (r *TemplateRenderer) Funcs(funcs template.FuncMap)
- func (r *TemplateRenderer) Override(funcs ...func(any) (any, error))
- func (r *TemplateRenderer) Processors(funcs ...func(any))
- func (r *TemplateRenderer) Render(b io.Writer, context any, baseKey string, path ...string) error
- func (r *TemplateRenderer) RequestProcessors(funcs ...func(ctx.ContextWithRequest))
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func Processors ¶
func Processors(funcs ...func(any))
func RequestProcessors ¶ added in v1.6.8
func RequestProcessors(funcs ...func(ctx.ContextWithRequest))
Types ¶
type Renderer ¶
type Renderer interface { Add(cfg Config) Processors(funcs ...func(any)) Override(funcs ...func(any) (any, error)) RequestProcessors(funcs ...func(ctx.ContextWithRequest)) Render(buffer io.Writer, data any, appKey string, path ...string) error Funcs(funcs template.FuncMap) }
var Global Renderer
type TemplateRenderer ¶
type TemplateRenderer struct {
// contains filtered or unexported fields
}
func NewRenderer ¶
func NewRenderer() *TemplateRenderer
func (*TemplateRenderer) Add ¶
func (r *TemplateRenderer) Add(cfg Config)
func (*TemplateRenderer) FS ¶
func (r *TemplateRenderer) FS() fs.FS
func (*TemplateRenderer) Funcs ¶
func (r *TemplateRenderer) Funcs(funcs template.FuncMap)
func (*TemplateRenderer) Override ¶ added in v1.6.9
func (r *TemplateRenderer) Override(funcs ...func(any) (any, error))
func (*TemplateRenderer) Processors ¶
func (r *TemplateRenderer) Processors(funcs ...func(any))
func (*TemplateRenderer) RequestProcessors ¶ added in v1.6.8
func (r *TemplateRenderer) RequestProcessors(funcs ...func(ctx.ContextWithRequest))
Click to show internal directories.
Click to hide internal directories.