Documentation
¶
Index ¶
- Constants
- type ErrorPageComponent
- type Route
- type Router
- func (rr *Router) Adapters() path.Adapters
- func (rr *Router) BuildProfiles() resources.BuildProfiles
- func (rr *Router) CSP() *common.CSP
- func (rr *Router) Conf() *common.SystemConf
- func (rr *Router) Count() (int, int)
- func (rr *Router) License() string
- func (rr *Router) PathMaker() path.PathMaker
- func (rr *Router) RemoveSession(id string)
- func (rr *Router) ResourceRegistry() *resources.Registry
- func (rr *Router) ServeHTTP(w http.ResponseWriter, r *http.Request)
- func (rr *Router) SessionCookie() string
- func (rr *Router) Use(use Use)
- type SessionCallback
- type Use
- func UseCSP(csp *common.CSP) Use
- func UseESConf(profiles resources.BuildProfiles) Use
- func UseErrorPage(page ErrorPageComponent) Use
- func UseFallback(handler http.Handler) Use
- func UseLicense(license string) Use
- func UseModel[M any](handler model.Handler[M]) Use
- func UseRoute(r Route) Use
- func UseServerID(id string) Use
- func UseSessionCallback(hook SessionCallback) Use
- func UseSystemConf(conf common.SystemConf) Use
Constants ¶
View Source
const ZombieHeader = "Zombie"
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type ErrorPageComponent ¶
type Router ¶
type Router struct {
// contains filtered or unexported fields
}
func (*Router) BuildProfiles ¶
func (rr *Router) BuildProfiles() resources.BuildProfiles
func (*Router) Conf ¶
func (rr *Router) Conf() *common.SystemConf
func (*Router) RemoveSession ¶
func (*Router) ResourceRegistry ¶
func (*Router) SessionCookie ¶
type SessionCallback ¶
type SessionCallback interface {
// Create is called when a session is created.
Create(id string, header http.Header)
// Delete is called when a session is removed.
Delete(id string)
}
SessionCallback observes session creation and removal.
type Use ¶
type Use interface {
// contains filtered or unexported methods
}
Use mutates a Router during setup.
func UseESConf ¶
func UseESConf(profiles resources.BuildProfiles) Use
UseESConf stores the esbuild profiles used for imports.
func UseErrorPage ¶
func UseErrorPage(page ErrorPageComponent) Use
UseErrorPage stores the page used for framework errors.
func UseFallback ¶
UseFallback registers the fallback handler for unmatched requests.
func UseServerID ¶
UseServerID stores the stable server identifier used in generated paths.
func UseSessionCallback ¶
func UseSessionCallback(hook SessionCallback) Use
UseSessionCallback registers session lifecycle callbacks.
func UseSystemConf ¶
func UseSystemConf(conf common.SystemConf) Use
UseSystemConf stores the router-wide system configuration.
Click to show internal directories.
Click to hide internal directories.