Versions in this module Expand all Collapse all v1 v1.0.0 Jan 5, 2023 Changes in this version + var Done = errors.New("<done>") + var Gzip = Wrap + var LogRequests = Wrap + var WriteLog = func(e LogEntry) + func HandleError(w http.ResponseWriter, r *http.Request, l *LogEntry, err error) + func HandleErrorJson(w http.ResponseWriter, r *http.Request, l *LogEntry, err error) + func NoLog(e *LogEntry) + func ServeFS(f fs.FS, fsRoot string, pathParam string) func(w http.ResponseWriter, r *http.Request, p Params) + type ChainMutation interface + Apply func(c chain.Func) chain.Func + type Error struct + Cause error + ClientMsg string + Code int + LogMsg string + func ToError(err error) Error + func (e Error) Error() string + func (e Error) LogIfMsg(l *LogEntry) + type LogEntry struct + Elapsed time.Duration + Error error + Note map[string]string + Quiet bool + RemoteIp string + Request *http.Request + ResponseSize int + Start time.Time + StatusCode int + func NewLogEntry(r *http.Request) *LogEntry + func (entry *LogEntry) Commit(w *ResponseWriter) + func (l LogEntry) NotesAndError() string + type Params map[string]string + type ResponseWriter struct + Code int + Size int + func WrapResponseWriter(w http.ResponseWriter) (http.ResponseWriter, *ResponseWriter) + func (w *ResponseWriter) Flush() + func (w *ResponseWriter) Hijack() (net.Conn, *bufio.ReadWriter, error) + func (w *ResponseWriter) Write(p []byte) (int, error) + func (w *ResponseWriter) WriteHeader(code int) + type Router interface + Any func(path string, handlers ...any) + Delete func(path string, handlers ...any) + Get func(path string, handlers ...any) + On func(method, path string, handlers ...any) + OnErr func(handler any) + Patch func(path string, handlers ...any) + Post func(path string, handlers ...any) + Put func(path string, handlers ...any) + ServeHTTP func(w http.ResponseWriter, r *http.Request) + Set func(vals ...any) + SetAs func(val, ifacePtr any) + SubRouter func(pathPrefix string) Router + Use func(middlewareHandlers ...any) + func BuildYourOwn() Router + func TheUsual() Router + type Wrap struct + After any + Before any + func (w Wrap) Apply(c chain.Func) chain.Func