Documentation ¶
Index ¶
- type Manager
- func (_m *Manager) CreatePermission(ctx context.Context, rp *model.RolePermission) (int64, error)
- func (_m *Manager) CreateRbacPolicy(ctx context.Context, pp *model.PermissionPolicy) (int64, error)
- func (_m *Manager) DeletePermission(ctx context.Context, id int64) error
- func (_m *Manager) DeletePermissionsByRole(ctx context.Context, roleType string, roleID int64) error
- func (_m *Manager) DeleteRbacPolicy(ctx context.Context, id int64) error
- func (_m *Manager) GetPermissionsByRole(ctx context.Context, roleType string, roleID int64) ([]*model.UniversalRolePermission, error)
- func (_m *Manager) ListPermissions(ctx context.Context, query *q.Query) ([]*model.RolePermission, error)
- func (_m *Manager) ListRbacPolicies(ctx context.Context, query *q.Query) ([]*model.PermissionPolicy, error)
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Manager ¶
Manager is an autogenerated mock type for the Manager type
func NewManager ¶
NewManager creates a new instance of Manager. 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 (*Manager) CreatePermission ¶
CreatePermission provides a mock function with given fields: ctx, rp
func (*Manager) CreateRbacPolicy ¶
CreateRbacPolicy provides a mock function with given fields: ctx, pp
func (*Manager) DeletePermission ¶
DeletePermission provides a mock function with given fields: ctx, id
func (*Manager) DeletePermissionsByRole ¶
func (_m *Manager) DeletePermissionsByRole(ctx context.Context, roleType string, roleID int64) error
DeletePermissionsByRole provides a mock function with given fields: ctx, roleType, roleID
func (*Manager) DeleteRbacPolicy ¶
DeleteRbacPolicy provides a mock function with given fields: ctx, id
func (*Manager) GetPermissionsByRole ¶
func (_m *Manager) GetPermissionsByRole(ctx context.Context, roleType string, roleID int64) ([]*model.UniversalRolePermission, error)
GetPermissionsByRole provides a mock function with given fields: ctx, roleType, roleID
func (*Manager) ListPermissions ¶
func (_m *Manager) ListPermissions(ctx context.Context, query *q.Query) ([]*model.RolePermission, error)
ListPermissions provides a mock function with given fields: ctx, query
func (*Manager) ListRbacPolicies ¶
func (_m *Manager) ListRbacPolicies(ctx context.Context, query *q.Query) ([]*model.PermissionPolicy, error)
ListRbacPolicies provides a mock function with given fields: ctx, query