Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type DRouter ¶
type DRouter struct { Host string Verbose bool InitWrapper *InitWrapper RouterNode }
func (*DRouter) InitRouter ¶
func (d *DRouter) InitRouter(router *httprouter.Router) error
type EndHandler ¶
type EndHandler func(userdata interface{}, rw http.ResponseWriter, r *http.Request, p RequestInfo)
type EndPoint ¶
type EndPoint struct { Method string Handler EndHandler }
type InitWrapper ¶
type InitWrapper func(rw http.ResponseWriter, r *http.Request, i RequestInfo) (userdata interface{}, ok bool)
type Middleware ¶
type Middleware func(userdataIn interface{}, rw http.ResponseWriter, r *http.Request, p RequestInfo) (userdataOut interface{}, ok bool)
type RequestInfo ¶
type RequestInfo struct { Params httprouter.Params Route string }
type RouterNode ¶
type RouterNode struct { PathPart string EndPoint *EndPoint Wrapper *Middleware NextNodes []RouterNode }
func (*RouterNode) CreateRoutes ¶
func (n *RouterNode) CreateRoutes(router *httprouter.Router, path string, wrapper *Middleware, verbose bool)
Click to show internal directories.
Click to hide internal directories.