Guard

Guard is a middleware only use for manage access in route. It is a function return bool value if true the route can be handler, else app will throw 403 error. Have two guard for each level. Guard for Controller and AppGuard for Module.

type Guard func(ctrl *DynamicController, ctx *Ctx) bool

type AppGuard func(module *DynamicModule, ctx Ctx) bool

Define guard and use in controller

Define guard and use in module

Last updated