page

package
v0.0.10 Latest Latest
Warning

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

Go to latest
Published: Jan 28, 2024 License: GPL-3.0 Imports: 6 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Add

func Add[C context.Context, M any](c *route.Configuration[C], r string, m string, p Handler[C, M], e Error[C])

Types

type Error

type Error[C context.Context] func(c C, w http.ResponseWriter, r *http.Request, err error) *template.Template

type Handler

type Handler[C context.Context, M any] func(c C, w http.ResponseWriter, r *http.Request) (*template.Template, M, error)

type Page

type Page[C context.Context, M any] struct {
	Decorators   []route.Decorator[C]
	PageHandler  Handler[C, M]
	ErrorHandler Error[C]
}

func (*Page[C, M]) ServeHTTP

func (p *Page[C, M]) ServeHTTP(w http.ResponseWriter, r *http.Request)

Jump to

Keyboard shortcuts

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