Documentation
¶
Index ¶
- func ExpandMiddleware(main interface{}, mt MiddlewareType) interface{}
- func ExpandRoute(main *web.Route, rt RouteType)
- func ExpandTailware(main interface{}, at TailwareType) interface{}
- func RegisterMiddleware(mt MiddlewareType, handler interface{})
- func RegisterRoute(rt RouteType, f func() *web.Route)
- func RegisterTailware(at TailwareType, handler interface{})
- func WrapEx(handlers ...interface{}) http.HandlerFunc
- type MiddlewareType
- type RouteType
- type TailwareType
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func ExpandMiddleware ¶
func ExpandMiddleware(main interface{}, mt MiddlewareType) interface{}
ExpandMiddleware wrap the handlers to the main handler
func ExpandRoute ¶
ExpandRoute mount the extra routes to the main web router
func ExpandTailware ¶
func ExpandTailware(main interface{}, at TailwareType) interface{}
ExpandTailware wrap the tailwares to the main handler
func RegisterMiddleware ¶
func RegisterMiddleware(mt MiddlewareType, handler interface{})
RegisterMiddleware register a middleware that to be attached to the specific main handler. this function should be called in plugins' init() function
func RegisterRoute ¶
RegisterRoute register an extra route maker that will generate a web route to be attached to the specific main web router. this function should be called in plugins' init() function
func RegisterTailware ¶
func RegisterTailware(at TailwareType, handler interface{})
RegisterTailware register an tailware that to be attached to the specific main handler. the tailware will be executed asynchronously when the main handler is done. this function should be called in plugins' init() function
func WrapEx ¶
func WrapEx(handlers ...interface{}) http.HandlerFunc
WrapEx converts all kinds of routes to standard library one this is a version that can be extended backwards