Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
Types ¶
type Middleware ¶
type Middleware struct {
// contains filtered or unexported fields
}
Middleware represents middleware handlers.
func (*Middleware) HandleCors ¶
func (m *Middleware) HandleCors(next http.Handler) http.Handler
HandleCors handles cors policy
func (*Middleware) Instrument ¶
func (m *Middleware) Instrument(next http.Handler) http.Handler
Instrument is a middleware that wraps the provided http.Handler to observe the request result.
func (*Middleware) Logging ¶
func (m *Middleware) Logging(next http.Handler) http.Handler
Logging logs all requests with its information and the time it took to process
func (*Middleware) RestrictDomain ¶
func (m *Middleware) RestrictDomain(next http.Handler) http.Handler
RestrictDomain checks whether request's remote address was matched a defined host pattern or not.
Click to show internal directories.
Click to hide internal directories.