Documentation
¶
Index ¶
- func BodyHandler(h http.Handler) http.Handler
- func FrameHandler(h http.Handler) http.Handler
- func HandleError(w http.ResponseWriter, r *http.Request, err error)
- func HandleResult(w http.ResponseWriter, r *http.Request, msg string)
- func RecoveryHandler(h http.Handler) http.Handler
- func RequestIDHandler(h http.Handler) http.Handler
- func RequestPathHandler(h http.Handler) http.Handler
- func ResponseHandler(handle respHandle) httprouter.Handle
- func WriteMessage(w http.ResponseWriter, r *http.Request, statusCode int, body string)
- type Response
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func FrameHandler ¶
FrameHandler creates a new request context. The new context contains an empty frame.
func HandleError ¶
func HandleError(w http.ResponseWriter, r *http.Request, err error)
func HandleResult ¶
func HandleResult(w http.ResponseWriter, r *http.Request, msg string)
func RecoveryHandler ¶
RecoveryHandler adds panic recovery and logs the stack trace
func RequestIDHandler ¶
RequestIDHandler assigns a UUID to the request
func RequestPathHandler ¶
RequestPathHandler adds the request path to the logging context
func ResponseHandler ¶
func ResponseHandler(handle respHandle) httprouter.Handle
func WriteMessage ¶
Types ¶
Click to show internal directories.
Click to hide internal directories.