Versions in this module Expand all Collapse all v2 v2.3.1 Jan 29, 2026 Changes in this version + const Version + var HttpMethodList = []string + type Config struct + AdditionalSettings map[uint64]uint64 + Addr string + Compression middleware.CompressionConfig + DisableGeneralOptionsHandler bool + EnableDatagrams bool + EnableQuickH3 bool + IdleTimeout time.Duration + Logger zaploger.Config + MaxHeaderBytes int + Port int + QUICConfig QUICConfig + ReadHeaderTimeout time.Duration + ReadTimeout time.Duration + Route route.Config + Security SecurityConfig + ServerName []string + TLS tlsconfig.TLSConfig + WriteTimeout time.Duration + type Description struct + Code string + CodeKey string + Metadata *T + Method string + Name string + Path string + Version string + func NewDesc[T any](key, code string, meta *T) Description[T] + type Group struct + func (g *Group[T]) Any(p string, handler http.HandlerFunc, descriptions ...Description[T]) + func (g *Group[T]) AnyWithHandler(p string, handler http.Handler, descriptions ...Description[T]) + func (g *Group[T]) Connect(p string, handler http.HandlerFunc, descriptions ...Description[T]) + func (g *Group[T]) ConnectWithHandler(p string, handler http.Handler, descriptions ...Description[T]) + func (g *Group[T]) Delete(p string, handler http.HandlerFunc, descriptions ...Description[T]) + func (g *Group[T]) DeleteWithHandler(p string, handler http.Handler, descriptions ...Description[T]) + func (g *Group[T]) Get(p string, handler http.HandlerFunc, descriptions ...Description[T]) + func (g *Group[T]) GetWithHandler(p string, handler http.Handler, descriptions ...Description[T]) + func (g *Group[T]) Group(groupName string) *Group[T] + func (g *Group[T]) Head(p string, handler http.HandlerFunc, descriptions ...Description[T]) + func (g *Group[T]) HeadWithHandler(p string, handler http.Handler, descriptions ...Description[T]) + func (g *Group[T]) Options(p string, handler http.HandlerFunc, descriptions ...Description[T]) + func (g *Group[T]) OptionsWithHandler(p string, handler http.Handler, descriptions ...Description[T]) + func (g *Group[T]) Patch(p string, handler http.HandlerFunc, descriptions ...Description[T]) + func (g *Group[T]) PatchWithHandler(p string, handler http.Handler, descriptions ...Description[T]) + func (g *Group[T]) Post(p string, handler http.HandlerFunc, descriptions ...Description[T]) + func (g *Group[T]) PostWithHandler(p string, handler http.Handler, descriptions ...Description[T]) + func (g *Group[T]) Put(p string, handler http.HandlerFunc, descriptions ...Description[T]) + func (g *Group[T]) PutWithHandler(p string, handler http.Handler, descriptions ...Description[T]) + func (g *Group[T]) Trace(p string, handler http.HandlerFunc, descriptions ...Description[T]) + func (g *Group[T]) TraceWithHandler(p string, handler http.Handler, descriptions ...Description[T]) + func (g *Group[T]) Use(middleware ...Middleware) *Group[T] + func (g *Group[T]) WS(p string, handler func(ws *websocket.Conn)) + func (g *Group[T]) WSWithDescription(p string, handler func(ws *websocket.Conn), description Description[T]) + type IPAccessConfig struct + Allow *ipmatch.Config + Debug *ipmatch.Config + Deny *ipmatch.Config + Enable bool + type Middleware func(next http.Handler) http.Handler + func Chain(middlewares ...Middleware) Middleware + type QUICConfig struct + Allow0RTT bool + DisablePathMTUDiscovery bool + EnableDatagrams bool + EnableStreamResetPartialDelivery bool + HandshakeIdleTimeout time.Duration + InitialConnectionReceiveWindow uint64 + InitialPacketSize uint16 + InitialStreamReceiveWindow uint64 + KeepAlivePeriod time.Duration + MaxConnectionReceiveWindow uint64 + MaxIdleTimeout time.Duration + MaxIncomingStreams int64 + MaxIncomingUniStreams int64 + MaxStreamReceiveWindow uint64 + type RouteType int + const RouteTypeHTTP + const RouteTypeWebSocket + type SecurityConfig struct + CORS cors.Config + DebugPath string + IPAccess IPAccessConfig + type Server struct + func New(ctx context.Context, cfg *Config) (*Server[any], error) + func NewGeneric[T any](ctx context.Context, cfg *Config) (*Server[T], error) + func (s *Server[T]) AddLogHandler(le ...middleware.Logger) + func (s *Server[T]) AddRoute(method, path string, handle http.Handler, cb ...Middleware) + func (s *Server[T]) AddRouteFunc(method, path string, handle http.HandlerFunc, cb ...Middleware) + func (s *Server[T]) AddRouteFuncWithDescription(method, path string, handle http.HandlerFunc, description Description[T], ...) + func (s *Server[T]) AddRouteWithDescription(method, path string, handle http.Handler, description Description[T], ...) + func (s *Server[T]) AddWebsocketRoute(path string, handle websocket.Handler) + func (s *Server[T]) AddWebsocketRouteWithDescription(path string, handle websocket.Handler, description Description[T]) + func (s *Server[T]) GetRoute() *route.Route + func (s *Server[T]) GetRouteDescriptions() []Description[T] + func (s *Server[T]) Group(groupName string) *Group[T] + func (s *Server[T]) Run(ctx context.Context) error + func (s *Server[T]) TLS() *tls.Config v2.3.0 Dec 9, 2025