Documentation ¶
Index ¶
Constants ¶
View Source
const ( RootRole = "root" GuestRole = "guest" )
View Source
const ( AllAction = "*" ReadAction = "read" )
Variables ¶
This section is empty.
Functions ¶
func GetAPIGroupName ¶
func GetAPIGroupNames ¶
func HTTPMethodToAction ¶
func NewEnforcer ¶
Types ¶
type Permission ¶
type Permission struct { Object string `json:"object" binding:"required"` Action string `json:"action" binding:"required,oneof=read *"` }
func GetPermissions ¶
func GetPermissions(g *gin.Engine) []Permission
Click to show internal directories.
Click to hide internal directories.