Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func WithContext ¶
WithContext set the context on the request.
func WithRecovery ¶
WithRecovery recovers from panics and log the error.
func WithRequestStats ¶
WithRequestStats collects statistics about the request.
Types ¶
type Recovery ¶
type Recovery struct {
// contains filtered or unexported fields
}
Recovery is a middleware that will recover from panics and logs the error.
type ResponseWriter ¶
type ResponseWriter interface { http.ResponseWriter // Status returns the status code of the response or 0 if the response has // not be written. Status() int }
ResponseWriter is a wrapper around http.ResponseWriter that provides extra information about the response.
func NewResponseWriter ¶
func NewResponseWriter(rw http.ResponseWriter) ResponseWriter
NewResponseWriter create a new ResponseWriter.
Click to show internal directories.
Click to hide internal directories.