Documentation
¶
Index ¶
Constants ¶
View Source
const ( RequestIDKey contextKey = "requestId" RequestIDHeader string = "X-Request-Id" )
Variables ¶
This section is empty.
Functions ¶
Types ¶
type RequestIdConfig ¶
type RequestIdConfig struct {
AcceptFromHeader bool
}
RequestIdConfig is the configuration for the request ID middleware
type RequestLoggerConfig ¶
type RequestLoggerConfig struct {
LogRequestBody bool
}
RequestLoggerConfig is a middleware that logs the incoming requests.
func (*RequestLoggerConfig) LogRequests ¶
func (rl *RequestLoggerConfig) LogRequests(next http.Handler) http.Handler
LogRequests logs the incoming requests.
Click to show internal directories.
Click to hide internal directories.