Versions in this module Expand all Collapse all v0 v0.1.6 Mar 23, 2026 v0.1.5 Mar 23, 2026 v0.1.3 Mar 23, 2026 Changes in this version + const DefaultMaxBodySize + func Connect[T any](r *Router[T], path string, h HandlerFunc[T]) + func Delete[T any](r *Router[T], path string, h HandlerFunc[T]) + func Get[T any](r *Router[T], path string, h HandlerFunc[T]) + func Head[T any](r *Router[T], path string, h HandlerFunc[T]) + func Options[T any](r *Router[T], path string, h HandlerFunc[T]) + func Patch[T, B any](r *Router[T], path string, h HandlerWithBody[T, B]) + func Post[T, B any](r *Router[T], path string, h HandlerWithBody[T, B]) + func Put[T, B any](r *Router[T], path string, h HandlerWithBody[T, B]) + func Static[T any](r *Router[T], pathPrefix, rootFolder string) + func Trace[T any](r *Router[T], path string, h HandlerFunc[T]) + type App struct + func New[T any](conf *Config[T]) *App[T] + func (a *App[T]) AddCron(name string, interval time.Duration, job CronJob) + func (a *App[T]) Listen() error + func (a *App[T]) Router() *Router[T] + type CacheStore interface + Clear func(ctx context.Context) error + Delete func(ctx context.Context, key string) error + Get func(ctx context.Context, key string) (any, bool) + Set func(ctx context.Context, key string, value any) error + type Config struct + Cache CacheStore + ErrorHandler CustomErrorHandler[T] + Global T + Host string + JSON JSONEngine + Logger Logger + MaxBodyBytes int64 + Port int + ShutdownTimeout int + Template TemplateEngine + Timeout int + XML XMLEngine + type Context struct + Global T + func (c *Context[T]) Attachment(filepath, filename string) + func (c *Context[T]) Bind(v any) error + func (c *Context[T]) Cache() CacheStore + func (c *Context[T]) ClearCookie(name string) + func (c *Context[T]) Cookie(name string) (*http.Cookie, error) + func (c *Context[T]) File(filepath string) + func (c *Context[T]) GetBody() ([]byte, error) + func (c *Context[T]) Hijack() (net.Conn, *bufio.ReadWriter, error) + func (c *Context[T]) JSON(status int, data any) error + func (c *Context[T]) Log() Logger + func (c *Context[T]) Next() + func (c *Context[T]) Param(key string) string + func (c *Context[T]) Query(key string) string + func (c *Context[T]) Render(status int, name string, data any) error + func (c *Context[T]) Req() *http.Request + func (c *Context[T]) Res() http.ResponseWriter + func (c *Context[T]) Reset(w http.ResponseWriter, req *http.Request, handlers []HandlerFunc[T], ...) + func (c *Context[T]) SSE() (*http.ResponseController, error) + func (c *Context[T]) SaveFile(file *multipart.FileHeader, dst string) error + func (c *Context[T]) SetCookie(cookie *http.Cookie) + func (c *Context[T]) SetReq(req *http.Request) + func (c *Context[T]) Start() time.Time + func (c *Context[T]) String(status int, text string, args ...any) error + func (c *Context[T]) XML(status int, data any) error + type CronJob func(ctx context.Context, log Logger) + type CronManager struct + func (c *CronManager) Add(name string, interval time.Duration, job CronJob) + func (c *CronManager) Start() + func (c *CronManager) Stop() + type CustomContext struct + Data L + type CustomErrorHandler func(c *Context[T], err any) + type HandlerFunc func(c *Context[T]) + func LoggerMiddleware[T any]() HandlerFunc[T] + func RecoveryMiddleware[T any](customHandler CustomErrorHandler[T]) HandlerFunc[T] + func WithCustomContext[T, L any](initialData L, handler func(c *CustomContext[T, L])) HandlerFunc[T] + func WrapMiddleware[T any](mw func(http.Handler) http.Handler) HandlerFunc[T] + type HandlerWithBody func(c *Context[T], body B) + type JSONEngine interface + Decode func(r io.Reader, v any) error + Encode func(w io.Writer, v any) error + type LogConfig struct + FilePaths []string + Level slog.Level + Stdout bool + type Logger interface + Debug func(args ...any) + Debugf func(format string, args ...any) + Error func(args ...any) + Errorf func(format string, args ...any) + Fatal func(args ...any) + Fatalf func(format string, args ...any) + Info func(args ...any) + Infof func(format string, args ...any) + Panic func(args ...any) + Panicf func(format string, args ...any) + Sync func() + Warn func(args ...any) + Warnf func(format string, args ...any) + func NewLogger(cfg LogConfig) Logger + type OtterStore struct + func NewOtterStore(maxSize int) (*OtterStore, error) + func (o *OtterStore) Clear(_ context.Context) error + func (o *OtterStore) Delete(_ context.Context, key string) error + func (o *OtterStore) Get(_ context.Context, key string) (any, bool) + func (o *OtterStore) Set(_ context.Context, key string, value any) error + type ResponseWriter interface + Size func() int + Status func() int + Unwrap func() http.ResponseWriter + type Router struct + func NewGroup[T any](prefix string, router *Router[T]) *Router[T] + func NewRouter[T any](jsonEngine JSONEngine, xmlEngine XMLEngine, templateEngine TemplateEngine, ...) *Router[T] + func (r *Router[T]) ServeHTTP(w http.ResponseWriter, req *http.Request) + func (r *Router[T]) Use(middlewares ...HandlerFunc[T]) + type TemplateEngine interface + Render func(w io.Writer, name string, data any) error + type XMLEngine interface + Decode func(r io.Reader, v any) error + Encode func(w io.Writer, v any) error