Documentation
¶
Index ¶
- Variables
- func NewAccessLogger(log *logger.AccessLogger) func(next http.Handler) http.Handler
- type HttpStatusResponseWriter
- func (w *HttpStatusResponseWriter) Flush()
- func (w *HttpStatusResponseWriter) Hijack() (net.Conn, *bufio.ReadWriter, error)
- func (w *HttpStatusResponseWriter) Push(target string, opts *http.PushOptions) error
- func (w *HttpStatusResponseWriter) Write(b []byte) (int, error)
- func (w *HttpStatusResponseWriter) WriteHeader(code int)
Constants ¶
This section is empty.
Variables ¶
View Source
var RequestMethod = map[string]uint32{
"GET": 1,
"POST": 2,
"PUT": 3,
"DELETE": 4,
}
Functions ¶
func NewAccessLogger ¶
NewAccessLogger 访问日志中间件
Types ¶
type HttpStatusResponseWriter ¶
type HttpStatusResponseWriter struct {
http.ResponseWriter
// contains filtered or unexported fields
}
HttpStatusResponseWriter 它主要由中间件(例如访问日志记录器)使用
func (*HttpStatusResponseWriter) Flush ¶ added in v1.1.8
func (w *HttpStatusResponseWriter) Flush()
func (*HttpStatusResponseWriter) Hijack ¶ added in v1.1.8
func (w *HttpStatusResponseWriter) Hijack() (net.Conn, *bufio.ReadWriter, error)
func (*HttpStatusResponseWriter) Push ¶ added in v1.1.8
func (w *HttpStatusResponseWriter) Push(target string, opts *http.PushOptions) error
func (*HttpStatusResponseWriter) Write ¶
func (w *HttpStatusResponseWriter) Write(b []byte) (int, error)
func (*HttpStatusResponseWriter) WriteHeader ¶
func (w *HttpStatusResponseWriter) WriteHeader(code int)
Click to show internal directories.
Click to hide internal directories.