Documentation ¶
Index ¶
- func MakeGzipHandler(h http.Handler) http.Handler
- func MakeJsonErrorMiddleware(h http.Handler) http.Handler
- func MakeRecoverMiddleware(h http.Handler) http.Handler
- func NewRequestLogMiddleware(handler http.Handler, out io.Writer) http.Handler
- type JsonErrorMiddleware
- type RecoverMiddleware
- type RequestLogMiddleware
- type RequestLogRecord
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
Types ¶
type JsonErrorMiddleware ¶
type JsonErrorMiddleware struct {
// contains filtered or unexported fields
}
func (*JsonErrorMiddleware) ServeHTTP ¶
func (m *JsonErrorMiddleware) ServeHTTP(w http.ResponseWriter, r *http.Request)
type RecoverMiddleware ¶
type RecoverMiddleware struct {
// contains filtered or unexported fields
}
func (*RecoverMiddleware) ServeHTTP ¶
func (m *RecoverMiddleware) ServeHTTP(w http.ResponseWriter, r *http.Request)
https://github.com/go-martini/martini/blob/master/recovery.go
type RequestLogMiddleware ¶
type RequestLogMiddleware struct {
// contains filtered or unexported fields
}
func (*RequestLogMiddleware) ServeHTTP ¶
func (h *RequestLogMiddleware) ServeHTTP(rw http.ResponseWriter, r *http.Request)
type RequestLogRecord ¶
type RequestLogRecord struct { http.ResponseWriter // contains filtered or unexported fields }
https://gist.github.com/cespare/3985516
func (*RequestLogRecord) Log ¶
func (r *RequestLogRecord) Log(out io.Writer)
func (*RequestLogRecord) WriteHeader ¶
func (r *RequestLogRecord) WriteHeader(status int)
Click to show internal directories.
Click to hide internal directories.