Documentation ¶
Index ¶
- type Enforcer
- func (_m *Enforcer) GetRoleMembers(ctx context.Context, role string) ([]string, error)
- func (_m *Enforcer) GetRolePermissions(ctx context.Context, role string) ([]string, error)
- func (_m *Enforcer) GetUserPermissions(ctx context.Context, user string) ([]string, error)
- func (_m *Enforcer) GetUserRoles(ctx context.Context, user string) ([]string, error)
- func (_m *Enforcer) IsUserGrantedPermission(ctx context.Context, user string, permission string) (bool, error)
- func (_m *Enforcer) UpdateAuthorization(ctx context.Context, updateRequest enforcer.AuthorizationUpdateRequest) error
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Enforcer ¶
Enforcer is an autogenerated mock type for the Enforcer type
func NewEnforcer ¶ added in v1.10.0
NewEnforcer creates a new instance of Enforcer. It also registers a testing interface on the mock and a cleanup function to assert the mocks expectations. The first argument is typically a *testing.T value.
func (*Enforcer) GetRoleMembers ¶ added in v1.10.0
GetRoleMembers provides a mock function with given fields: ctx, role
func (*Enforcer) GetRolePermissions ¶ added in v1.10.0
GetRolePermissions provides a mock function with given fields: ctx, role
func (*Enforcer) GetUserPermissions ¶ added in v1.10.0
GetUserPermissions provides a mock function with given fields: ctx, user
func (*Enforcer) GetUserRoles ¶ added in v1.10.0
GetUserRoles provides a mock function with given fields: ctx, user
func (*Enforcer) IsUserGrantedPermission ¶ added in v1.10.0
func (_m *Enforcer) IsUserGrantedPermission(ctx context.Context, user string, permission string) (bool, error)
IsUserGrantedPermission provides a mock function with given fields: ctx, user, permission
func (*Enforcer) UpdateAuthorization ¶ added in v1.10.0
func (_m *Enforcer) UpdateAuthorization(ctx context.Context, updateRequest enforcer.AuthorizationUpdateRequest) error
UpdateAuthorization provides a mock function with given fields: ctx, updateRequest