package
0.0.3
Repository: https://github.com/gkong/go-qweb.git
Documentation: pkg.go.dev

# Functions

H2Ctx adapts a CtxHandler to be callable by net/http.
Hr2Ctx adapts a CtxHandler to be callable by julienschmidt/httprouter.
MwHeader is middleware which sets HTTP response headers.
MwLogger is middleware which logs HTTP requests to a given io.Writer, optionally including decoration with ANSI escape sequences.
MwRecovery is panic-recovery middleware in the spirit of http.Error() - it assumes the client, upon receipt of an error code, expects a plain-text error message in the response body.
MwRequireSess is middleware which checks for a valid qsess session.
MwStack makes a middleware stack from one or more MwMakers.
MwStripPrefix is middleware that removes a given prefix from the request URL's path, by wrapping the standard go library http.StripPrefix.

# Structs

Ctx holds per-request ("context") information.
WrappedRW wraps http.ResponseWriter, to capture the HTTP status code and observe whether or not any data has been written to the response body.

# Interfaces

CtxHandler is a handler/middleware interface like http.Handler, but with a single ctx argument.

# Type aliases

No description provided by the author
No description provided by the author
MwMaker defines a piece of stackable middleware.