Documentation
¶
Index ¶
- func ExpandAsyncjob(main interface{}, at AsyncjobType) interface{}
- func ExpandMiddleware(main interface{}, mt MiddlewareType) interface{}
- func ExpandRoute(main *web.Route, rt RouteType)
- func RegisterAsyncjob(at AsyncjobType, handler interface{})
- func RegisterMiddleware(mt MiddlewareType, handler interface{})
- func RegisterRoute(rt RouteType, f func() *web.Route)
- func WrapEx(handlers ...interface{}) http.HandlerFunc
- type AsyncjobType
- type MiddlewareType
- type RouteType
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func ExpandAsyncjob ¶
func ExpandAsyncjob(main interface{}, at AsyncjobType) interface{}
ExpandAsyncjob wrap the async job handler to the main handler
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 RegisterAsyncjob ¶
func RegisterAsyncjob(at AsyncjobType, handler interface{})
RegisterAsyncjob register an asynchronous job that to be attached to the specific main handler. the job will be executed asynchronously when the main handler is done. this function should be called in plugins' init() function
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 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