Versions in this module Expand all Collapse all v0 v0.1.0 Oct 31, 2026 Changes in this version + const DefaultIdleTimeout + const DefaultMaxBodyBytes + const DefaultMaxHeaderBytes + const DefaultReadHeaderTimeout + const DefaultReadTimeout + const DefaultWriteTimeout + const StreamWriteTimeout + type CORSConfig struct + AllowHeaders []string + AllowMethods []string + AllowOrigins []string + MaxAge time.Duration + func DefaultCORSConfig() CORSConfig + type Context struct + Request *http.Request + ResponseWriter http.ResponseWriter + func (c *Context) BindJSON(v any) error + func (c *Context) BindJSONLimit(v any, limit int64) error + func (c *Context) BindJSONStrict(v any, limit int64) error + func (c *Context) HTML(code int, html string) error + func (c *Context) JSON(code int, data any) error + func (c *Context) NoContent() error + func (c *Context) Param(key string) string + func (c *Context) Query(key string) string + func (c *Context) QueryDefault(key, defaultVal string) string + func (c *Context) Redirect(code int, url string) error + func (c *Context) SSE() (*SSEWriter, error) + func (c *Context) SetHeader(key, value string) + func (c *Context) SetWriteDeadline(t time.Time) error + func (c *Context) StreamJSON(dataChan <-chan any) error + func (c *Context) String(code int, msg string) error + type Engine struct + ErrorHandler func(*Context, error) + func New() *Engine + func (e *Engine) DELETE(path string, h HandlerFunc) + func (e *Engine) GET(path string, h HandlerFunc) + func (e *Engine) Group(prefix string) *Group + func (e *Engine) HEAD(path string, h HandlerFunc) + func (e *Engine) Handle(method, pattern string, handler HandlerFunc) + func (e *Engine) Listen(addr string) error + func (e *Engine) OPTIONS(path string, h HandlerFunc) + func (e *Engine) PATCH(path string, h HandlerFunc) + func (e *Engine) POST(path string, h HandlerFunc) + func (e *Engine) PUT(path string, h HandlerFunc) + func (e *Engine) ServeHTTP(w http.ResponseWriter, r *http.Request) + func (e *Engine) Server(addr string) *http.Server + func (e *Engine) Use(middleware ...MiddlewareFunc) + func (e *Engine) Wrap(middleware ...HTTPMiddleware) + type Group struct + func (g *Group) DELETE(path string, h HandlerFunc) + func (g *Group) GET(path string, h HandlerFunc) + func (g *Group) Group(prefix string) *Group + func (g *Group) HEAD(path string, h HandlerFunc) + func (g *Group) Handle(method, path string, handler HandlerFunc) + func (g *Group) OPTIONS(path string, h HandlerFunc) + func (g *Group) PATCH(path string, h HandlerFunc) + func (g *Group) POST(path string, h HandlerFunc) + func (g *Group) PUT(path string, h HandlerFunc) + func (g *Group) Use(middleware ...MiddlewareFunc) + type HTTPError struct + Err error + Message string + Status int + func (e *HTTPError) Error() string + func (e *HTTPError) Unwrap() error + type HTTPMiddleware func(http.Handler) http.Handler + func CORS(config ...CORSConfig) HTTPMiddleware + type HandlerFunc func(*Context) error + type MiddlewareFunc func(HandlerFunc) HandlerFunc + func Logger() MiddlewareFunc + func Recovery() MiddlewareFunc + type SSEWriter struct + func (s *SSEWriter) Event(name string, data any) error