Documentation
¶
Index ¶
- Constants
- func ApplyCORSMiddleware(handler http.Handler) http.Handler
- func AuthMiddleware(next http.Handler) http.Handler
- func GetClaimsFromContext(ctx context.Context) (jwt.MapClaims, bool)
- func LimiterMiddleware(next http.Handler) http.Handler
- func LoggingMiddleware(next http.Handler) http.Handler
- func PrometheusMiddleware(next http.Handler, requestsTotal *prometheus.CounterVec, ...) http.Handler
Constants ¶
View Source
const (
ClaimsKey key = iota
)
Variables ¶
This section is empty.
Functions ¶
func ApplyCORSMiddleware ¶
CORSMiddleware is a middleware function that adds CORS headers to HTTP responses.
func AuthMiddleware ¶
AuthMiddleware validates JWT tokens and protects routes
func GetClaimsFromContext ¶
GetClaimsFromContext retrieves claims from request context
func PrometheusMiddleware ¶
func PrometheusMiddleware(next http.Handler, requestsTotal *prometheus.CounterVec, requestDuration *prometheus.HistogramVec) http.Handler
PrometheusMiddleware is a middleware for recording Prometheus metrics.
Types ¶
This section is empty.
Click to show internal directories.
Click to hide internal directories.