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