Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
Types ¶
type CloseNotify ¶
type CloseNotify struct { }
func NewCloseNotify ¶
func NewCloseNotify() *CloseNotify
NewCloseNotify returns a new CloseNotify instance
func (*CloseNotify) ServeHTTP ¶
func (c *CloseNotify) ServeHTTP(rw http.ResponseWriter, r *http.Request, next http.HandlerFunc)
type Logger ¶
func (*Logger) ServeHTTP ¶
func (m *Logger) ServeHTTP(rw http.ResponseWriter, r *http.Request, next http.HandlerFunc)
type ParseForm ¶
type ParseForm struct { }
func (*ParseForm) ServeHTTP ¶
func (m *ParseForm) ServeHTTP(rw http.ResponseWriter, r *http.Request, next http.HandlerFunc)
ParseForm is a doggy middleware that call ParseForm for every http request.
type Prometheus ¶
type Prometheus struct { }
func NewPrometheus ¶
func NewPrometheus() *Prometheus
NewPrometheus returns a new Prometheus instance
func (*Prometheus) ServeHTTP ¶
func (p *Prometheus) ServeHTTP(rw http.ResponseWriter, r *http.Request, next http.HandlerFunc)
type RateLimit ¶
func NewRateLimit ¶
NewRateLimit returns a new RateLimit instance
func (*RateLimit) ServerHTTP ¶
func (m *RateLimit) ServerHTTP(rw http.ResponseWriter, r *http.Request, next http.HandlerFunc)
RateLimit is an Middleware that acts as a request throttler based on a token-bucket algorithm. Requests that would exceed the maximum request rate are delayed via the parameterized sleep function.
type RealIP ¶
type RealIP struct { }
func (*RealIP) ServeHTTP ¶
func (m *RealIP) ServeHTTP(rw http.ResponseWriter, r *http.Request, next http.HandlerFunc)
type Recovery ¶
type Recovery struct { }
func (*Recovery) ServeHTTP ¶
func (m *Recovery) ServeHTTP(rw http.ResponseWriter, r *http.Request, next http.HandlerFunc)
Recovery is a doggy middleware that recovers from any panics and writes a 500.
type Timeout ¶
func NewTimeout ¶
NewTimeout returns a new Timeout instance
func (*Timeout) ServeHTTP ¶
func (m *Timeout) ServeHTTP(rw http.ResponseWriter, r *http.Request, next http.HandlerFunc)
Click to show internal directories.
Click to hide internal directories.