Versions in this module Expand all Collapse all v0 v0.0.4 Jul 9, 2022 Changes in this version + var PermissionProviderSet = wire.NewSet(NewPermissionService, ...) + type EnforcerProvider struct + func NewEnforcerProvider(logger klog.Logger, dbProvider sgorm.DbProvider, dbKey string) (*EnforcerProvider, error) + func (p *EnforcerProvider) Get(ctx context.Context) (*casbin.SyncedEnforcer, error) + type PermissionService struct + func NewPermissionService(enforcer *EnforcerProvider) *PermissionService + func (p *PermissionService) AddGrant(ctx context.Context, resource authz.Resource, action authz.Action, ...) error + func (p *PermissionService) IsGrantTenant(ctx context.Context, requirements authz.RequirementList, tenantID string, ...) ([]authz.Effect, error) + func (p *PermissionService) ListAcl(ctx context.Context, subjects ...authz.Subject) ([]authz.PermissionBean, error) + func (p *PermissionService) RemoveGrant(ctx context.Context, subject authz.Subject, filter ...authz.FilterFunc) error + func (p *PermissionService) UpdateGrant(ctx context.Context, subject authz.Subject, ...) error