handlers

package
v0.0.18 Latest Latest
Warning

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

Go to latest
Published: Sep 16, 2023 License: MIT Imports: 7 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type FSTemplateHandler added in v0.0.18

type FSTemplateHandler struct {
	fs.FS
	FuncMap   template.FuncMap
	GetModel  TemplateModelGetter
	Root      *template.Template
	DebugMode bool
	Log       *slog.Logger
}

func NewFSTemplateHandler added in v0.0.18

func NewFSTemplateHandler(fs fs.FS) FSTemplateHandler

func (FSTemplateHandler) Parse added in v0.0.18

func (FSTemplateHandler) ServeHTTP added in v0.0.18

func (s FSTemplateHandler) ServeHTTP(w http.ResponseWriter, r *http.Request)

func (FSTemplateHandler) WithDebug added in v0.0.18

func (s FSTemplateHandler) WithDebug() FSTemplateHandler

func (FSTemplateHandler) WithFuncs added in v0.0.18

func (FSTemplateHandler) WithLog added in v0.0.18

func (FSTemplateHandler) WithModelGetter added in v0.0.18

func (s FSTemplateHandler) WithModelGetter(getter TemplateModelGetter) FSTemplateHandler

func (FSTemplateHandler) WithModelMap added in v0.0.18

func (s FSTemplateHandler) WithModelMap(modelMap map[string]any) FSTemplateHandler

type TemplateModelGetter added in v0.0.18

type TemplateModelGetter func(template string) any

Jump to

Keyboard shortcuts

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