Documentation
¶
Index ¶
- func ContextLogger(field string, original *zap.Logger) func(next http.Handler) http.Handler
- func LimitBodySize(maxBodySize int64, logger *zap.Logger) func(inner http.Handler) http.Handler
- func NoCache() func(inner http.Handler) http.Handler
- func OpenAPITracing(api OpenAPIWithContext) func(next http.Handler) http.Handler
- func Recovery(globalLogger *zap.Logger) func(inner http.Handler) http.Handler
- func RequestLogger() func(inner http.Handler) http.Handler
- func SecurityHeaders(globalLogger *zap.Logger) func(inner http.Handler) http.Handler
- func Trace(telemetryConfig *telemetry.Config) func(next http.Handler) http.Handler
- type OpenAPIWithContext
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func ContextLogger ¶
ContextLogger returns a handler that injects the logger into the request context.
func LimitBodySize ¶
LimitBodySize is a middleware
func OpenAPITracing ¶
func OpenAPITracing(api OpenAPIWithContext) func(next http.Handler) http.Handler
OpenAPITracing instruments a context with the path pattern for the request. This is useful for recording metrics
func RequestLogger ¶
RequestLogger returns a middleware that logs requests.
func SecurityHeaders ¶
SecurityHeaders adds a set of standard security headers.
Types ¶
type OpenAPIWithContext ¶
type OpenAPIWithContext interface {
Context() *middleware.Context
}
OpenAPIWithContext descripes an API that implements go-openapi Context method
Click to show internal directories.
Click to hide internal directories.