Documentation ¶
Index ¶
- Variables
- type EnforcerProvider
- type 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
Constants ¶
This section is empty.
Variables ¶
View Source
var PermissionProviderSet = wire.NewSet( NewPermissionService, wire.Bind(new(authz.PermissionManagementService), new(*PermissionService)), wire.Bind(new(authz.PermissionChecker), new(*PermissionService)), )
Functions ¶
This section is empty.
Types ¶
type EnforcerProvider ¶
type EnforcerProvider struct {
// contains filtered or unexported fields
}
func NewEnforcerProvider ¶
func NewEnforcerProvider(logger klog.Logger, dbProvider sgorm.DbProvider, dbKey string) (*EnforcerProvider, error)
type PermissionService ¶
type PermissionService struct {
// contains filtered or unexported fields
}
func NewPermissionService ¶
func NewPermissionService(enforcer *EnforcerProvider) *PermissionService
func (*PermissionService) IsGrantTenant ¶
func (*PermissionService) ListAcl ¶
func (p *PermissionService) ListAcl(ctx context.Context, subjects ...authz.Subject) ([]authz.PermissionBean, error)
func (*PermissionService) RemoveGrant ¶
func (p *PermissionService) RemoveGrant(ctx context.Context, subject authz.Subject, filter ...authz.FilterFunc) error
func (*PermissionService) UpdateGrant ¶
func (p *PermissionService) UpdateGrant(ctx context.Context, subject authz.Subject, acl []authz.UpdateSubjectPermission) error
Click to show internal directories.
Click to hide internal directories.