Documentation ¶
Index ¶
- Constants
- type HttpContext
- type HttpHandler
- func (h *HttpHandler) DELETE(url string, handleFuncList ...handleFunc)
- func (h *HttpHandler) GET(url string, handleFuncList ...handleFunc)
- func (h *HttpHandler) HEAD(url string, handleFuncList ...handleFunc)
- func (h *HttpHandler) OPTIONS(url string, handleFuncList ...handleFunc)
- func (h *HttpHandler) PATCH(url string, handleFuncList ...handleFunc)
- func (h *HttpHandler) POST(url string, handleFuncList ...handleFunc)
- func (h *HttpHandler) PUT(url string, handleFuncList ...handleFunc)
- func (h *HttpHandler) ServeHTTP(w http.ResponseWriter, r *http.Request)
Constants ¶
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type HttpContext ¶
type HttpContext struct { ResponseWriter http.ResponseWriter Request *http.Request Stopped bool }
type HttpHandler ¶
type HttpHandler struct { RouteMap map[string]map[string]handleChain // URL Method handleChain HandleNotFound func(ctx *HttpContext) HandleMethodNotAllowed func(ctx *HttpContext) HandleError func(ctx *HttpContext) }
func New ¶
func New() *HttpHandler
func (*HttpHandler) DELETE ¶
func (h *HttpHandler) DELETE(url string, handleFuncList ...handleFunc)
func (*HttpHandler) GET ¶
func (h *HttpHandler) GET(url string, handleFuncList ...handleFunc)
func (*HttpHandler) HEAD ¶
func (h *HttpHandler) HEAD(url string, handleFuncList ...handleFunc)
func (*HttpHandler) OPTIONS ¶
func (h *HttpHandler) OPTIONS(url string, handleFuncList ...handleFunc)
func (*HttpHandler) PATCH ¶
func (h *HttpHandler) PATCH(url string, handleFuncList ...handleFunc)
func (*HttpHandler) POST ¶
func (h *HttpHandler) POST(url string, handleFuncList ...handleFunc)
func (*HttpHandler) PUT ¶
func (h *HttpHandler) PUT(url string, handleFuncList ...handleFunc)
func (*HttpHandler) ServeHTTP ¶
func (h *HttpHandler) ServeHTTP(w http.ResponseWriter, r *http.Request)
Click to show internal directories.
Click to hide internal directories.