Documentation ¶
Overview ¶
Package mocks contains mocks for testing purposes.
Index ¶
- type Repository
- func (_m *Repository) AssignParentGroup(ctx context.Context, parentGroupID string, groupIDs ...string) error
- func (_m *Repository) ChangeStatus(ctx context.Context, group groups.Group) (groups.Group, error)
- func (_m *Repository) Delete(ctx context.Context, groupID string) error
- func (_m *Repository) RetrieveAll(ctx context.Context, gm groups.Page) (groups.Page, error)
- func (_m *Repository) RetrieveByID(ctx context.Context, id string) (groups.Group, error)
- func (_m *Repository) RetrieveByIDs(ctx context.Context, gm groups.Page, ids ...string) (groups.Page, error)
- func (_m *Repository) Save(ctx context.Context, g groups.Group) (groups.Group, error)
- func (_m *Repository) UnassignParentGroup(ctx context.Context, parentGroupID string, groupIDs ...string) error
- func (_m *Repository) Update(ctx context.Context, g groups.Group) (groups.Group, error)
- type Service
- func (_m *Service) Assign(ctx context.Context, token string, groupID string, relation string, ...) error
- func (_m *Service) CreateGroup(ctx context.Context, token string, kind string, g groups.Group) (groups.Group, error)
- func (_m *Service) DeleteGroup(ctx context.Context, token string, id string) error
- func (_m *Service) DisableGroup(ctx context.Context, token string, id string) (groups.Group, error)
- func (_m *Service) EnableGroup(ctx context.Context, token string, id string) (groups.Group, error)
- func (_m *Service) ListGroups(ctx context.Context, token string, memberKind string, memberID string, ...) (groups.Page, error)
- func (_m *Service) ListMembers(ctx context.Context, token string, groupID string, permission string, ...) (groups.MembersPage, error)
- func (_m *Service) Unassign(ctx context.Context, token string, groupID string, relation string, ...) error
- func (_m *Service) UpdateGroup(ctx context.Context, token string, g groups.Group) (groups.Group, error)
- func (_m *Service) ViewGroup(ctx context.Context, token string, id string) (groups.Group, error)
- func (_m *Service) ViewGroupPerms(ctx context.Context, token string, id string) ([]string, error)
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Repository ¶
Repository is an autogenerated mock type for the Repository type
func NewRepository ¶
func NewRepository(t interface { mock.TestingT Cleanup(func()) }) *Repository
NewRepository creates a new instance of Repository. 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 (*Repository) AssignParentGroup ¶
func (_m *Repository) AssignParentGroup(ctx context.Context, parentGroupID string, groupIDs ...string) error
AssignParentGroup provides a mock function with given fields: ctx, parentGroupID, groupIDs
func (*Repository) ChangeStatus ¶
ChangeStatus provides a mock function with given fields: ctx, group
func (*Repository) Delete ¶
func (_m *Repository) Delete(ctx context.Context, groupID string) error
Delete provides a mock function with given fields: ctx, groupID
func (*Repository) RetrieveAll ¶
RetrieveAll provides a mock function with given fields: ctx, gm
func (*Repository) RetrieveByID ¶
RetrieveByID provides a mock function with given fields: ctx, id
func (*Repository) RetrieveByIDs ¶
func (_m *Repository) RetrieveByIDs(ctx context.Context, gm groups.Page, ids ...string) (groups.Page, error)
RetrieveByIDs provides a mock function with given fields: ctx, gm, ids
func (*Repository) UnassignParentGroup ¶
func (_m *Repository) UnassignParentGroup(ctx context.Context, parentGroupID string, groupIDs ...string) error
UnassignParentGroup provides a mock function with given fields: ctx, parentGroupID, groupIDs
type Service ¶
Service is an autogenerated mock type for the Service type
func NewService ¶
NewService creates a new instance of Service. 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 (*Service) Assign ¶
func (_m *Service) Assign(ctx context.Context, token string, groupID string, relation string, memberKind string, memberIDs ...string) error
Assign provides a mock function with given fields: ctx, token, groupID, relation, memberKind, memberIDs
func (*Service) CreateGroup ¶
func (_m *Service) CreateGroup(ctx context.Context, token string, kind string, g groups.Group) (groups.Group, error)
CreateGroup provides a mock function with given fields: ctx, token, kind, g
func (*Service) DeleteGroup ¶
DeleteGroup provides a mock function with given fields: ctx, token, id
func (*Service) DisableGroup ¶
DisableGroup provides a mock function with given fields: ctx, token, id
func (*Service) EnableGroup ¶
EnableGroup provides a mock function with given fields: ctx, token, id
func (*Service) ListGroups ¶
func (_m *Service) ListGroups(ctx context.Context, token string, memberKind string, memberID string, gm groups.Page) (groups.Page, error)
ListGroups provides a mock function with given fields: ctx, token, memberKind, memberID, gm
func (*Service) ListMembers ¶
func (_m *Service) ListMembers(ctx context.Context, token string, groupID string, permission string, memberKind string) (groups.MembersPage, error)
ListMembers provides a mock function with given fields: ctx, token, groupID, permission, memberKind
func (*Service) Unassign ¶
func (_m *Service) Unassign(ctx context.Context, token string, groupID string, relation string, memberKind string, memberIDs ...string) error
Unassign provides a mock function with given fields: ctx, token, groupID, relation, memberKind, memberIDs
func (*Service) UpdateGroup ¶
func (_m *Service) UpdateGroup(ctx context.Context, token string, g groups.Group) (groups.Group, error)
UpdateGroup provides a mock function with given fields: ctx, token, g