Versions in this module Expand all Collapse all v1 v1.0.0 Jan 25, 2024 Changes in this version + type Body map[string]any + func (b Body) Map() map[string]any + func (b Body) Reader() io.Reader + type LogFormatterParams struct + ClientIP string + Latency time.Duration + Method string + Path string + ProtocolVersion int + Query map[string][]string + RequestContentEncoding string + RequestContentType string + ResponseContentEncoding string + ResponseContentType string + StatusCode int + Timestamp time.Time + func (l LogFormatterParams) String() string + type LoggerConfig struct + LogFormatter func(LogFormatterParams) string + Output io.Writer + type Middleware func(http.ResponseWriter, *http.Request, Next) + func Logger(config LoggerConfig) Middleware + type Middlewares []Middleware + func (m Middlewares) Append(middleware Middleware) Middlewares + func (m Middlewares) Chain(final http.HandlerFunc) http.HandlerFunc + type MockHandler struct + func NewMockHandler(handler http.Handler) *MockHandler + func (mh *MockHandler) Handler() http.Handler + func (mh *MockHandler) ServeHTTP(rw http.ResponseWriter, r *http.Request) + type MockMiddleware struct + func NewMockMiddleware() *MockMiddleware + func (mm *MockMiddleware) Middleware() Middleware + func (mm *MockMiddleware) Run(rw http.ResponseWriter, r *http.Request, next Next) + type Next func(*http.Request) + type ResponseWriter struct + StatusCode int + func (rw *ResponseWriter) Flush() + func (rw *ResponseWriter) Flusher() (http.Flusher, bool) + func (rw *ResponseWriter) Hijack() (net.Conn, *bufio.ReadWriter, error) + func (rw *ResponseWriter) Hijacker() (http.Hijacker, bool) + func (rw *ResponseWriter) WriteHeader(statusCode int) + type Router struct + func NewRouter() *Router + func (router *Router) Connect(pattern string, handler http.Handler) + func (router *Router) ConnectFunc(pattern string, handlerFunc http.HandlerFunc) + func (router *Router) Delete(pattern string, handler http.Handler) + func (router *Router) DeleteFunc(pattern string, handlerFunc http.HandlerFunc) + func (router *Router) Get(pattern string, handler http.Handler) + func (router *Router) GetFunc(pattern string, handlerFunc http.HandlerFunc) + func (router *Router) Handle(pattern string, handler http.Handler) + func (router *Router) HandleFunc(pattern string, handlerFunc http.HandlerFunc) + func (router *Router) HandleMethod(method, pattern string, handler http.Handler) + func (router *Router) HandleMethodFunc(method, pattern string, handlerFunc http.HandlerFunc) + func (router *Router) Head(pattern string, handler http.Handler) + func (router *Router) HeadFunc(pattern string, handlerFunc http.HandlerFunc) + func (router *Router) NotFound(handler http.Handler) + func (router *Router) Options(pattern string, handler http.Handler) + func (router *Router) OptionsFunc(pattern string, handlerFunc http.HandlerFunc) + func (router *Router) Patch(pattern string, handler http.Handler) + func (router *Router) PatchFunc(pattern string, handlerFunc http.HandlerFunc) + func (router *Router) Post(pattern string, handler http.Handler) + func (router *Router) PostFunc(pattern string, handlerFunc http.HandlerFunc) + func (router *Router) Put(pattern string, handler http.Handler) + func (router *Router) PutFunc(pattern string, handlerFunc http.HandlerFunc) + func (router *Router) ServeHTTP(w http.ResponseWriter, r *http.Request) + func (router *Router) Trace(pattern string, handler http.Handler) + func (router *Router) TraceFunc(pattern string, handlerFunc http.HandlerFunc) + func (router *Router) Use(middleware Middleware) + type TestRoute struct + Method string + Name string + Pattern string + type TestRouteParams struct + Body Body + Method string + Params map[string]any + Path string + Pattern string