Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
View Source
var AnnotationControllers = []*framework.ControllerEntry{ { Controller: &a0.HomeController{}, Prefix: "/", Middlewares: []string{ "example", }, }, { Controller: &a1.UserController{}, Prefix: "/user", }, }
AnnotationControllers is a controller list, You can load it in your main() like follow code.
func main(){ ... component := framework.New() component.Application.AddAnnotationControllers(annotations.AnnotationControllers...) ... }
View Source
var AnnotationCrontabs = []*crontab.Worker{ crontab.NewWorker("0 0 0 * * * *", &a0.ExampleCrontab{}). SetGloballyUnique(false). SetNodeUnique(true). SetRunOnStartup(true), }
AnnotationCrontabs is a crontab list, You can load it in your main() like follow code.
func main(){ ... component := framework.New() component.Application.AddAnnotationCrontabs(annotations.AnnotationCrontabs...) ... }
View Source
var AnnotationHandlers = []*framework.HandlerEntry{ { Handler: a0.PingHandler, Method: "GET", Path: "/ping", Middlewares: []string{ "example", "example2", }, }, }
AnnotationHandlers is a handler list, You can load it in your main() like follow code.
func main(){ ... component := framework.New() component.Application.AddAnnotationHandlers(annotations.AnnotationHandlers...) ... }
View Source
var AnnotationMiddlewares = map[string]iris.Handler{ "example": a0.ExampleMiddleware, }
AnnotationMiddlewares is a middleware mapping, You can load it in your main() like follow code.
func main(){ ... component := framework.New() component.Application.AddAnnotationMiddlewares(annotations.AnnotationMiddlewares) ... }
Functions ¶
This section is empty.
Types ¶
This section is empty.
Click to show internal directories.
Click to hide internal directories.