Documentation ¶
Index ¶
- type PermissionEngine
- func (pe *PermissionEngine) RegisterPermission(ctx context.Context, key string, component string, description string) (*ent.Permission, error)
- func (pe *PermissionEngine) RequestPermission(ctx context.Context, entUser *ent.User, permissionKey string) (bool, error)
- func (pe *PermissionEngine) SetPermissionPolicy(ctx context.Context, policyType permissionpolicy.Type, ...) (*ent.PermissionPolicy, error)
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type PermissionEngine ¶
type PermissionEngine struct {
// contains filtered or unexported fields
}
func (*PermissionEngine) RegisterPermission ¶
func (pe *PermissionEngine) RegisterPermission(ctx context.Context, key string, component string, description string) (*ent.Permission, error)
func (*PermissionEngine) RequestPermission ¶
func (*PermissionEngine) SetPermissionPolicy ¶
func (pe *PermissionEngine) SetPermissionPolicy(ctx context.Context, policyType permissionpolicy.Type, entPermission *ent.Permission, entGroup *ent.Group) (*ent.PermissionPolicy, error)
Click to show internal directories.
Click to hide internal directories.