Documentation
¶
Index ¶
- func HistoryMiddleware(recorder history.Recorder, next http.Handler) http.HandlerFunc
- func LoggingMiddleware(logger *slog.Logger, next http.Handler) http.Handler
- func NewRouter(appFS fs.FS, api *handler.API, routePrefix string, logger *slog.Logger) (http.Handler, error)
- func NormalizeRoutePrefix(input string) string
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func HistoryMiddleware ¶
HistoryMiddleware records HTTP access events into history.
func LoggingMiddleware ¶
LoggingMiddleware wraps a handler with structured access logging.
func NewRouter ¶
func NewRouter( appFS fs.FS, api *handler.API, routePrefix string, logger *slog.Logger, ) (http.Handler, error)
NewRouter builds the HTTP router and applies optional route prefixing.
func NormalizeRoutePrefix ¶
NormalizeRoutePrefix returns "" or "/prefix" from input, accepting raw paths or full URLs.
Types ¶
This section is empty.
Click to show internal directories.
Click to hide internal directories.