Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Controller ¶
type Controller struct {
// contains filtered or unexported fields
}
Controller external service interface
func (*Controller) CheckPermission ¶
func (c *Controller) CheckPermission() func(ctx *gin.Context)
CheckPermission middleware that checks the permission
func (*Controller) InitWithUserAPI ¶
func (c *Controller) InitWithUserAPI()
todo: add configuration on userAuth-defined API
func (*Controller) RegisterRouter ¶
func (c *Controller) RegisterRouter(r gin.IRouter)
RegisterRouter register router and from now on, every API would check if valid on current AdminID. Should init the permission to the API.
Click to show internal directories.
Click to hide internal directories.