Versions in this module Expand all Collapse all v1 v1.0.0 Jul 3, 2026 Changes in this version + func ReleaseContext(c *Context) + func SetTrustedProxies(cidrs ...string) error + type Context struct + Request *Request + Response *Response + func AcquireContext(w http.ResponseWriter, r *http.Request) *Context + func NewContext(w http.ResponseWriter, r *http.Request, params map[string]string) *Context + func (c *Context) Abort(status int, message string) error + func (c *Context) Bind(dest any) error + func (c *Context) Cookie(name string) (string, error) + func (c *Context) Ctx() context.Context + func (c *Context) Data(status int, contentType string, b []byte) error + func (c *Context) DefaultQuery(name, def string) string + func (c *Context) Detach() + func (c *Context) File(path string) error + func (c *Context) FormFile(name string) (*multipart.FileHeader, error) + func (c *Context) FormValue(name string) string + func (c *Context) Get(key string) (any, bool) + func (c *Context) HTML(status int, html string) error + func (c *Context) Header(name string) string + func (c *Context) IP() string + func (c *Context) IsAJAX() bool + func (c *Context) IsJSON() bool + func (c *Context) JSON(status int, v any) error + func (c *Context) Method() string + func (c *Context) MustGet(key string) any + func (c *Context) NoContent() error + func (c *Context) Param(name string) string + func (c *Context) ParamInt(name string) (int, error) + func (c *Context) ParseUpload(field string, cfg ...UploadConfig) (*UploadedFile, error) + func (c *Context) ParseUploads(field string, cfg ...UploadConfig) ([]*UploadedFile, error) + func (c *Context) Path() string + func (c *Context) PushParam(key, value string) + func (c *Context) Query(name string) string + func (c *Context) QueryBool(name string) bool + func (c *Context) QueryD(name, def string) string + func (c *Context) QueryInt(name string, def int) int + func (c *Context) Redirect(status int, url string) error + func (c *Context) Set(key string, value any) + func (c *Context) SetCookie(cookie *http.Cookie) + func (c *Context) String(status int, format string, args ...any) error + func (c *Context) Validate(dest any) error + func (c *Context) WithContext(ctx context.Context) *Context + func (c *Context) XML(status int, v any) error + type HTTPError struct + Code int + Message string + func NewHTTPError(code int, message string) *HTTPError + func (e *HTTPError) Error() string + type HandlerFunc func(*Context) error + type Kernel struct + func NewKernel(cfg ServerConfig, handler http.Handler) *Kernel + func (k *Kernel) Addr() string + func (k *Kernel) ListenAndServeBackground() (string, error) + func (k *Kernel) Serve() error + func (k *Kernel) Shutdown() error + func (k *Kernel) WithLogger(l *slog.Logger) *Kernel + type Map = map[string]any + type MiddlewareFunc func(HandlerFunc) HandlerFunc + type Request struct + func (r *Request) BearerToken() string + func (r *Request) Bind(dest any) error + func (r *Request) BodyBytes() ([]byte, error) + func (r *Request) IP() string + func (r *Request) IsSecure() bool + func (r *Request) Param(name string) string + func (r *Request) Params() map[string]string + func (r *Request) WantsJSON() bool + type Response struct + func (r *Response) Committed() bool + func (r *Response) Flush() + func (r *Response) Hijack() (net.Conn, *bufio.ReadWriter, error) + func (r *Response) Size() int64 + func (r *Response) Status() int + func (r *Response) Unwrap() http.ResponseWriter + func (r *Response) Wrap(w http.ResponseWriter) + func (r *Response) Write(b []byte) (int, error) + func (r *Response) WriteHeader(code int) + type ServerConfig struct + Host string + IdleTimeout time.Duration + Port int + ReadTimeout time.Duration + ShutdownTimeout time.Duration + TLSCertFile string + TLSKeyFile string + WriteTimeout time.Duration + func DefaultServerConfig() ServerConfig + type UploadConfig struct + AllowedTypes []string + MaxSize int64 + func DefaultUploadConfig() UploadConfig + type UploadedFile struct + Header *multipart.FileHeader + MIMEType string + Original string + Size int64 + func (uf *UploadedFile) Ext() string + func (uf *UploadedFile) IsImage() bool + func (uf *UploadedFile) Open() (multipart.File, error) + func (uf *UploadedFile) Store(dir string, filename ...string) (string, error) + type ValidationError struct + Fields validation.Errors + func (e *ValidationError) Error() string