Versions in this module Expand all Collapse all v0 v0.1.1 Nov 3, 2026 v0.1.0 Nov 2, 2026 Changes in this version + const CookieSameSiteLax + const CookieSameSiteNone + const CookieSameSiteStrict + const DefaultBodyLimit + var ErrBadRequest = NewError(http.StatusBadRequest) + var ErrCertificateAfterStart = errors.New("qinetic: ListenTLSWithCertificate called while the app is already serving") + var ErrConflict = NewError(http.StatusConflict) + var ErrForbidden = NewError(http.StatusForbidden) + var ErrInternalServerError = NewError(http.StatusInternalServerError) + var ErrMethodNotAllowed = NewError(http.StatusMethodNotAllowed) + var ErrNotAcceptable = NewError(http.StatusNotAcceptable) + var ErrNotFound = NewError(http.StatusNotFound) + var ErrNotImplemented = NewError(http.StatusNotImplemented) + var ErrRequestEntityTooLarge = NewError(http.StatusRequestEntityTooLarge) + var ErrRequestTimeout = NewError(http.StatusRequestTimeout) + var ErrResponseSent = errors.New("qinetic: response already sent by a qilat handler") + var ErrServiceUnavailable = NewError(http.StatusServiceUnavailable) + var ErrTooManyRequests = NewError(http.StatusTooManyRequests) + var ErrUnauthorized = NewError(http.StatusUnauthorized) + var ErrUnprocessableEntity = NewError(http.StatusUnprocessableEntity) + var ErrUnsupportedMediaType = NewError(http.StatusUnsupportedMediaType) + func DefaultErrorHandler(c *Ctx, err error) error + type App struct + func New(cfg ...Config) *App + func (app *App) Add(methods []string, path string, handler Handler, handlers ...Handler) Router + func (app *App) All(path string, handler Handler, handlers ...Handler) Router + func (app *App) Connect(path string, handler Handler, handlers ...Handler) Router + func (app *App) Delete(path string, handler Handler, handlers ...Handler) Router + func (app *App) Get(path string, handler Handler, handlers ...Handler) Router + func (app *App) Group(prefix string, handlers ...Handler) Router + func (app *App) Handler() qilat.Handler + func (app *App) Head(path string, handler Handler, handlers ...Handler) Router + func (app *App) Listen(addr string) error + func (app *App) ListenQUIC(pc net.PacketConn) error + func (app *App) ListenTLS(addr, certFile, keyFile string) error + func (app *App) ListenTLSWithCertificate(addr string, cert tls.Certificate) error + func (app *App) Listener(ln net.Listener) error + func (app *App) ListenerTLS(ln net.Listener) error + func (app *App) OnShutdown(fn func(ctx context.Context) error) + func (app *App) Options(path string, handler Handler, handlers ...Handler) Router + func (app *App) Patch(path string, handler Handler, handlers ...Handler) Router + func (app *App) Post(path string, handler Handler, handlers ...Handler) Router + func (app *App) Put(path string, handler Handler, handlers ...Handler) Router + func (app *App) Route(prefix string, fn func(Router)) Router + func (app *App) ServeHTTP(w qilat.ResponseWriter, r *qilat.Request) + func (app *App) Shutdown(ctx context.Context) error + func (app *App) ShutdownWithTimeout(d time.Duration) error + func (app *App) Test(req *http.Request) (*http.Response, error) + func (app *App) Trace(path string, handler Handler, handlers ...Handler) Router + func (app *App) Use(args ...any) Router + type Bind struct + func (b *Bind) Body(v any) error + func (b *Bind) Form(v any) error + func (b *Bind) JSON(v any) error + func (b *Bind) Query(v any) error + func (b *Bind) XML(v any) error + type Config struct + BodyLimit int64 + CaseSensitive bool + DebugPoison bool + DisableHTTP3 bool + ErrorHandler ErrorHandler + H2C bool + IdleTimeout time.Duration + JSONDecoder func(data []byte, v any) error + JSONEncoder func(v any) ([]byte, error) + Logger *slog.Logger + ProxyHeader string + ReadTimeout time.Duration + Server func(srv *qilat.Server) + StrictRouting bool + TLSConfig *tls.Config + TrustedProxies []string + WriteTimeout time.Duration + type Cookie struct + Domain string + Expires time.Time + HTTPOnly bool + MaxAge int + Name string + Partitioned bool + Path string + SameSite string + Secure bool + Value string + type Ctx struct + func (c *Ctx) Append(field string, values ...string) + func (c *Ctx) Attachment(filename ...string) + func (c *Ctx) Bind() *Bind + func (c *Ctx) Body() ([]byte, error) + func (c *Ctx) BodyReader() io.Reader + func (c *Ctx) ClearCookie(names ...string) + func (c *Ctx) Committed() bool + func (c *Ctx) Context() context.Context + func (c *Ctx) Cookie(ck *Cookie) + func (c *Ctx) Cookies(key string, def ...string) string + func (c *Ctx) Download(file string, filename ...string) error + func (c *Ctx) Flush() error + func (c *Ctx) FormFile(key string) (*multipart.FileHeader, error) + func (c *Ctx) FormValue(key string, def ...string) string + func (c *Ctx) Get(key string, def ...string) string + func (c *Ctx) GetRespHeader(key string, def ...string) string + func (c *Ctx) HandleError(err error) + func (c *Ctx) Host() string + func (c *Ctx) Hostname() string + func (c *Ctx) IP() string + func (c *Ctx) IPs() []string + func (c *Ctx) JSON(v any) error + func (c *Ctx) Locals(key any, value ...any) any + func (c *Ctx) Method() string + func (c *Ctx) MultipartForm() (*multipart.Form, error) + func (c *Ctx) Next() error + func (c *Ctx) OriginalURL() string + func (c *Ctx) Params(key string, def ...string) string + func (c *Ctx) ParamsInt(key string) (int, error) + func (c *Ctx) Path() string + func (c *Ctx) PeekHeader(key string) []byte + func (c *Ctx) PeekParam(key string) []byte + func (c *Ctx) PeekQuery(key string) []byte + func (c *Ctx) Protocol() string + func (c *Ctx) Queries() map[string]string + func (c *Ctx) Query(key string, def ...string) string + func (c *Ctx) QueryBool(key string, def ...bool) bool + func (c *Ctx) QueryInt(key string, def ...int) int + func (c *Ctx) Redirect(location string, code ...int) error + func (c *Ctx) Request() *qilat.Request + func (c *Ctx) ResponseBody() []byte + func (c *Ctx) ResponseHeader() *qilat.Header + func (c *Ctx) ResponseSize() int64 + func (c *Ctx) Route() Route + func (c *Ctx) Secure() bool + func (c *Ctx) Send(body []byte) error + func (c *Ctx) SendFile(file string) error + func (c *Ctx) SendStatus(code int) error + func (c *Ctx) SendStream(r io.Reader, size ...int) error + func (c *Ctx) SendString(s string) error + func (c *Ctx) Set(key, val string) + func (c *Ctx) Status(code int) *Ctx + func (c *Ctx) StatusCode() int + func (c *Ctx) Trailer() *qilat.Header + func (c *Ctx) Type(ext string, charset ...string) *Ctx + func (c *Ctx) Vary(fields ...string) + func (c *Ctx) Writer() io.Writer + func (c *Ctx) XML(v any) error + type Error struct + Code int + Message string + func NewError(code int, message ...string) *Error + func (e *Error) Error() string + func (e *Error) Unwrap() error + type ErrorHandler = func(c *Ctx, err error) error + type Group struct + func (g *Group) Add(methods []string, path string, handler Handler, handlers ...Handler) Router + func (g *Group) All(path string, handler Handler, handlers ...Handler) Router + func (g *Group) Connect(path string, handler Handler, handlers ...Handler) Router + func (g *Group) Delete(path string, handler Handler, handlers ...Handler) Router + func (g *Group) Get(path string, handler Handler, handlers ...Handler) Router + func (g *Group) Group(prefix string, handlers ...Handler) Router + func (g *Group) Head(path string, handler Handler, handlers ...Handler) Router + func (g *Group) Options(path string, handler Handler, handlers ...Handler) Router + func (g *Group) Patch(path string, handler Handler, handlers ...Handler) Router + func (g *Group) Post(path string, handler Handler, handlers ...Handler) Router + func (g *Group) Put(path string, handler Handler, handlers ...Handler) Router + func (g *Group) Route(prefix string, fn func(Router)) Router + func (g *Group) Trace(path string, handler Handler, handlers ...Handler) Router + func (g *Group) Use(args ...any) Router + type Handler = func(c *Ctx) error + func FromQilat(h qilat.Handler) Handler + func FromQilatMiddleware(mw func(qilat.Handler) qilat.Handler) Handler + func FromStd(h http.Handler) Handler + func FromStdMiddleware(mw func(http.Handler) http.Handler) Handler + type Incrementer interface + Incr func(ctx context.Context, key string, delta int64, ttl time.Duration) (int64, time.Time, error) + type Route struct + Method string + Params []string + Path string + type Router interface + Add func(methods []string, path string, handler Handler, handlers ...Handler) Router + All func(path string, handler Handler, handlers ...Handler) Router + Connect func(path string, handler Handler, handlers ...Handler) Router + Delete func(path string, handler Handler, handlers ...Handler) Router + Get func(path string, handler Handler, handlers ...Handler) Router + Group func(prefix string, handlers ...Handler) Router + Head func(path string, handler Handler, handlers ...Handler) Router + Options func(path string, handler Handler, handlers ...Handler) Router + Patch func(path string, handler Handler, handlers ...Handler) Router + Post func(path string, handler Handler, handlers ...Handler) Router + Put func(path string, handler Handler, handlers ...Handler) Router + Route func(prefix string, fn func(Router)) Router + Trace func(path string, handler Handler, handlers ...Handler) Router + Use func(args ...any) Router + type Storage interface + Close func() error + Delete func(ctx context.Context, key string) error + Get func(ctx context.Context, key string) ([]byte, error) + Set func(ctx context.Context, key string, val []byte, ttl time.Duration) error