Documentation ¶
Index ¶
- func JSON(next http.Handler) http.Handler
- func Panic(next http.Handler) http.Handler
- func PanicReportTimeoutHandler(h http.Handler, dt time.Duration, msg string) http.Handler
- func RequestID() func(next http.Handler) http.Handler
- func RequestIP() func(next http.Handler) http.Handler
- func Timeout(dt time.Duration) func(next http.Handler) http.Handler
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func PanicReportTimeoutHandler ¶
PanicReportTimeoutHandler replaces http.TimeoutHandler with PanicReportTimeoutHandler
func RequestID ¶
RequestID takes X-Request-Id header value and puts it in the outgoing context. This middleware must be executed after Auth middleware as it requires a set user id field in the context.
If the request context stores a user structure, the function puts the user id before the request id to avoid collisions of the same requests id between different users.
Types ¶
This section is empty.
Click to show internal directories.
Click to hide internal directories.