casbin

package
v0.0.4 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Aug 2, 2023 License: Apache-2.0 Imports: 6 Imported by: 0

Documentation

Index

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更新

Directories

Path Synopsis

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL