Documentation
¶
Index ¶
- Constants
- func BasicAuth(username, password string) func(http.Handler) http.Handler
- func CORS(next http.Handler) http.Handler
- func GetRequestID(ctx context.Context) string
- func Logger(next http.Handler) http.Handler
- func PrometheusMiddleware(next http.Handler) http.Handler
- func RequestID(next http.Handler) http.Handler
Constants ¶
View Source
const RequestIDKey contextKey = "request_id"
RequestIDKey is the context key for storing request IDs
Variables ¶
This section is empty.
Functions ¶
func BasicAuth ¶
BasicAuth creates a basic authentication middleware This is used for metrics endpoint
func GetRequestID ¶
GetRequestID retrieves the request ID from the context
func PrometheusMiddleware ¶
PrometheusMiddleware creates a middleware for Prometheus metrics
Types ¶
This section is empty.
Click to show internal directories.
Click to hide internal directories.