Documentation
¶
Index ¶
- func ResourcePath(r *resources.Resource, ext string) string
- type ErrorPageComponent
- type Mod
- func RoutePage[M any](handler func(r *Request[M]) Response) Mod
- func ServeDir(prefix string, root http.FileSystem) Mod
- func ServeDirPath(prefix string, localPath string) Mod
- func ServeFallback(handler http.Handler) Mod
- func ServeFile(path string, localPath string) Mod
- func SetBuildProfiles(profiles resources.BuildProfiles) Mod
- func SetCSP(csp *common.CSP) Mod
- func SetErrorPage(page ErrorPageComponent) Mod
- func SetGoroutineLimit(n int) Mod
- func SetSessionHooks(create func(id string), delete func(id string)) Mod
- func SetSystemConf(conf common.SystemConf) Mod
- type PageResponse
- type RedirectResponse
- type Request
- type RerouteResponse
- type Response
- type Router
- func (rr *Router) Adapters() map[string]path.AnyAdapter
- func (rr *Router) CSP() *common.CSP
- func (rr *Router) Conf() *common.SystemConf
- func (rr *Router) Gzip() bool
- func (rr *Router) ImportRegistry() *resources.Registry
- func (rr *Router) RemoveSession(id string)
- func (rr *Router) ServeHTTP(w http.ResponseWriter, r *http.Request)
- func (rr *Router) Spawner(op shredder.OnPanic) *shredder.Spawner
- func (rr *Router) Use(mods ...Mod)
- type StaticPage
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
Types ¶
type ErrorPageComponent ¶
type Mod ¶
type Mod interface {
// contains filtered or unexported methods
}
func ServeDirPath ¶
func ServeFallback ¶
func SetBuildProfiles ¶
func SetBuildProfiles(profiles resources.BuildProfiles) Mod
func SetErrorPage ¶
func SetErrorPage(page ErrorPageComponent) Mod
func SetGoroutineLimit ¶
func SetSessionHooks ¶
func SetSystemConf ¶
func SetSystemConf(conf common.SystemConf) Mod
type PageResponse ¶
type RedirectResponse ¶
type RerouteResponse ¶
type Router ¶
type Router struct {
// contains filtered or unexported fields
}
func (*Router) Conf ¶
func (rr *Router) Conf() *common.SystemConf
func (*Router) ImportRegistry ¶
func (*Router) RemoveSession ¶
type StaticPage ¶
Click to show internal directories.
Click to hide internal directories.