Documentation ¶
Index ¶
- Variables
- type Auth
- type JWT
- type RBAC
- func (a *RBAC) EnforceRole(c context.Context, role model.AccessRole) bool
- func (a *RBAC) EnforceTenant(c context.Context, id int32) bool
- func (a *RBAC) EnforceTenantAdmin(c context.Context, id int32) bool
- func (a *RBAC) EnforceTenantAndRole(c context.Context, role model.AccessRole, id int32) bool
- func (a *RBAC) EnforceUser(c context.Context, id int64) bool
- func (a *RBAC) IsLowerRole(c context.Context, role model.AccessRole) bool
- type Secure
Constants ¶
This section is empty.
Variables ¶
View Source
var ( // ErrGeneric used for testing purposes ErrGeneric = errors.New("generic error used for testing purposes") )
Functions ¶
This section is empty.
Types ¶
type RBAC ¶
type RBAC struct { EnforceRoleFn func(context.Context, model.AccessRole) bool EnforceUserFn func(context.Context, int64) bool EnforceTenantFn func(context.Context, int32) bool EnforceTenantAdminFn func(context.Context, int32) bool IsLowerRoleFn func(context.Context, model.AccessRole) bool EnforceTenantAndRoleFn func(context.Context, model.AccessRole, int32) bool }
RBAC Mock
func (*RBAC) EnforceRole ¶
EnforceRole mock
func (*RBAC) EnforceTenant ¶
EnforceTenant mock
func (*RBAC) EnforceTenantAdmin ¶
EnforceTenantAdmin mock
func (*RBAC) EnforceTenantAndRole ¶
EnforceTenantAndRole mock
func (*RBAC) EnforceUser ¶
EnforceUser mock
func (*RBAC) IsLowerRole ¶
IsLowerRole mock
Click to show internal directories.
Click to hide internal directories.