Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
View Source
var AnnotationControllers = []*framework.ControllerEntry{ { Controller: &controllers.Controller{}, Middlewares: []string{"Example"}, Prefix: "/", }, }
View Source
var AnnotationCrontab = []*crontab.Worker{ crontab.NewWorker("0 0 0 * * * *", &a0.ExampleCrontab{}).SetGloballyUnique(false).SetNodeUnique(true).SetRunOnStartup(true), }
AnnotationCrontab is a crontab list, You can load it in your main() like follow code.
func main(){ ... component := framework.New() component.Application.AddAnnotationCrontabs(annotations.AnnotationCrontab...) ... }
View Source
var AnnotationHandlers = []*framework.HandlerEntry{ { Handler: a0.PingHandler, Method: "", Middlewares: []string{"example"}, Path: "/ping", }, }
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.