Documentation ¶
Index ¶
- type CasbinService
- func (c *CasbinService) Casbin() *casbin.SyncedEnforcer
- func (c *CasbinService) ClearCasbin(v int, p ...string) bool
- func (c *CasbinService) GetPolicyPathByAuthorityId(authorityId string) (pathMaps []structs.CasbinInfo)
- func (c *CasbinService) UpdateCasbin(authorityId string, casbinInfos []structs.CasbinInfo) error
- func (c *CasbinService) UpdateCasbinApi(oldPath string, newPath string, oldMethod string, newMethod string) error
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type CasbinService ¶
type CasbinService struct {
// contains filtered or unexported fields
}
func NewCasbinRepository ¶
func NewCasbinRepository(db *gorm.DB, modelPath string) *CasbinService
func (*CasbinService) Casbin ¶
func (c *CasbinService) Casbin() *casbin.SyncedEnforcer
func (*CasbinService) ClearCasbin ¶
func (c *CasbinService) ClearCasbin(v int, p ...string) bool
ClearCasbin 清除匹配的权限
func (*CasbinService) GetPolicyPathByAuthorityId ¶
func (c *CasbinService) GetPolicyPathByAuthorityId(authorityId string) (pathMaps []structs.CasbinInfo)
GetPolicyPathByAuthorityId 获取权限列表
func (*CasbinService) UpdateCasbin ¶
func (c *CasbinService) UpdateCasbin(authorityId string, casbinInfos []structs.CasbinInfo) error
UpdateCasbin 更新casbin权限
func (*CasbinService) UpdateCasbinApi ¶
func (c *CasbinService) UpdateCasbinApi(oldPath string, newPath string, oldMethod string, newMethod string) error
UpdateCasbinApi API更新
Click to show internal directories.
Click to hide internal directories.