Versions in this module Expand all Collapse all v0 v0.0.1 Sep 17, 2025 Changes in this version + func CORS(opts CORSOptions) endpoint.Middleware + func ReqHandler(opts *ReqHandlerOptions) endpoint.Middleware + type CORSOptions struct + AllowCredentials bool + AllowedHeaders []string + AllowedMethods []string + AllowedOrigins []string + type PanicHandler interface + HandlePanic func(w http.ResponseWriter, r *http.Request, err any) + type ReqHandlerOptions struct + CtxLoggerFactoryFn logging.CtxLoggerFactoryFn + PanicHandler PanicHandler + ReqWrapFactoryFn func(r *http.Request) (ReqWrap, error) + ResWrapFactoryFn func(w http.ResponseWriter) ResWrap + SpanIDFactoryFn func(r *http.Request) string + TraceIDFactoryFn func(r *http.Request) string + type ReqWrap interface + GetBody func() []byte + GetRequest func() *http.Request + type RequestLog struct + HTTPMethod string + Protocol string + RemoteAddress string + StartTime time.Time + URL string + type RequestMetadata struct + HTTPMethod string + Protocol string + RemoteAddress string + SpanID string + TimeStart time.Time + TraceID string + URL string + func GetRequestMetadata(ctx context.Context) *RequestMetadata + type ResWrap interface + Body func() []byte + Flush func() + Header func() http.Header + Hijack func() (net.Conn, *bufio.ReadWriter, error) + StatusCode func() int + Write func(data []byte) (int, error) + WriteHeader func(statusCode int) + func GetResponseWrapper(r *http.Request) ResWrap