Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func CORSMiddleware ¶
func CORSMiddleware(conf CORSConfig) func(c CtrlFunc) CtrlFunc
CORSMiddleware setting Cross-Origin Resource Sharing (CORS)
func RecoveryMiddleware ¶
RecoveryMiddleware recovery go panic and write to log
func ThrottlingMiddleware ¶
Throttling limits active requests
Types ¶
type CORSConfig ¶
CORSConfig model
type CtrlFunc ¶
type CtrlFunc func(http.ResponseWriter, *http.Request)
CtrlFunc interface of controller
type Handler ¶
type Handler struct {
// contains filtered or unexported fields
}
Handler model
func (*Handler) Match ¶
func (h *Handler) Match(uris []string, pos int, method string) (code int, ctrl CtrlFunc, midd []MiddlFunc)
Match find route in tree
func (*Handler) Middlewares ¶
Middlewares add middleware to route
Click to show internal directories.
Click to hide internal directories.