Documentation ¶
Index ¶
- type FakeOrgService
- func (f *FakeOrgService) AddOrgUser(ctx context.Context, cmd *org.AddOrgUserCommand) error
- func (f *FakeOrgService) CreateWithMember(ctx context.Context, cmd *org.CreateOrgCommand) (*org.Org, error)
- func (f *FakeOrgService) Delete(ctx context.Context, cmd *org.DeleteOrgCommand) error
- func (f *FakeOrgService) DeleteUserFromAll(ctx context.Context, userID int64) error
- func (f *FakeOrgService) GetByID(ctx context.Context, query *org.GetOrgByIDQuery) (*org.Org, error)
- func (f *FakeOrgService) GetByName(ctx context.Context, query *org.GetOrgByNameQuery) (*org.Org, error)
- func (f *FakeOrgService) GetIDForNewUser(ctx context.Context, cmd org.GetOrgIDForNewUserCommand) (int64, error)
- func (f *FakeOrgService) GetOrCreate(ctx context.Context, orgName string) (int64, error)
- func (f *FakeOrgService) GetOrgUsers(ctx context.Context, query *org.GetOrgUsersQuery) ([]*org.OrgUserDTO, error)
- func (f *FakeOrgService) GetUserOrgList(ctx context.Context, query *org.GetUserOrgListQuery) ([]*org.UserOrgDTO, error)
- func (f *FakeOrgService) Insert(ctx context.Context, cmd *org.OrgUser) (int64, error)
- func (f *FakeOrgService) InsertOrgUser(ctx context.Context, cmd *org.OrgUser) (int64, error)
- func (f *FakeOrgService) RegisterDelete(query string)
- func (f *FakeOrgService) RemoveOrgUser(ctx context.Context, cmd *org.RemoveOrgUserCommand) error
- func (f *FakeOrgService) Search(ctx context.Context, query *org.SearchOrgsQuery) ([]*org.OrgDTO, error)
- func (f *FakeOrgService) SearchOrgUsers(ctx context.Context, query *org.SearchOrgUsersQuery) (*org.SearchOrgUsersQueryResult, error)
- func (f *FakeOrgService) UpdateAddress(ctx context.Context, cmd *org.UpdateOrgAddressCommand) error
- func (f *FakeOrgService) UpdateOrg(ctx context.Context, cmd *org.UpdateOrgCommand) error
- func (f *FakeOrgService) UpdateOrgUser(ctx context.Context, cmd *org.UpdateOrgUserCommand) error
- type MockService
- func (_m *MockService) AddOrgUser(_a0 context.Context, _a1 *org.AddOrgUserCommand) error
- func (_m *MockService) CreateWithMember(_a0 context.Context, _a1 *org.CreateOrgCommand) (*org.Org, error)
- func (_m *MockService) Delete(_a0 context.Context, _a1 *org.DeleteOrgCommand) error
- func (_m *MockService) DeleteUserFromAll(_a0 context.Context, _a1 int64) error
- func (_m *MockService) GetByID(_a0 context.Context, _a1 *org.GetOrgByIDQuery) (*org.Org, error)
- func (_m *MockService) GetByName(_a0 context.Context, _a1 *org.GetOrgByNameQuery) (*org.Org, error)
- func (_m *MockService) GetIDForNewUser(_a0 context.Context, _a1 org.GetOrgIDForNewUserCommand) (int64, error)
- func (_m *MockService) GetOrCreate(_a0 context.Context, _a1 string) (int64, error)
- func (_m *MockService) GetOrgUsers(_a0 context.Context, _a1 *org.GetOrgUsersQuery) ([]*org.OrgUserDTO, error)
- func (_m *MockService) GetUserOrgList(_a0 context.Context, _a1 *org.GetUserOrgListQuery) ([]*org.UserOrgDTO, error)
- func (_m *MockService) InsertOrgUser(_a0 context.Context, _a1 *org.OrgUser) (int64, error)
- func (_m *MockService) RegisterDelete(query string)
- func (_m *MockService) RemoveOrgUser(_a0 context.Context, _a1 *org.RemoveOrgUserCommand) error
- func (_m *MockService) Search(_a0 context.Context, _a1 *org.SearchOrgsQuery) ([]*org.OrgDTO, error)
- func (_m *MockService) SearchOrgUsers(_a0 context.Context, _a1 *org.SearchOrgUsersQuery) (*org.SearchOrgUsersQueryResult, error)
- func (_m *MockService) UpdateAddress(_a0 context.Context, _a1 *org.UpdateOrgAddressCommand) error
- func (_m *MockService) UpdateOrg(_a0 context.Context, _a1 *org.UpdateOrgCommand) error
- func (_m *MockService) UpdateOrgUser(_a0 context.Context, _a1 *org.UpdateOrgUserCommand) error
- type OrgListResponse
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type FakeOrgService ¶
type FakeOrgService struct { ExpectedOrgUserID int64 ExpectedError error ExpectedUserOrgDTO []*org.UserOrgDTO ExpectedOrgs []*org.OrgDTO ExpectedOrg *org.Org ExpectedOrgUsers []*org.OrgUserDTO ExpectedSearchOrgUsersResult *org.SearchOrgUsersQueryResult ExpectedOrgListResponse OrgListResponse }
func NewOrgServiceFake ¶
func NewOrgServiceFake() *FakeOrgService
func (*FakeOrgService) AddOrgUser ¶
func (f *FakeOrgService) AddOrgUser(ctx context.Context, cmd *org.AddOrgUserCommand) error
func (*FakeOrgService) CreateWithMember ¶
func (f *FakeOrgService) CreateWithMember(ctx context.Context, cmd *org.CreateOrgCommand) (*org.Org, error)
func (*FakeOrgService) Delete ¶
func (f *FakeOrgService) Delete(ctx context.Context, cmd *org.DeleteOrgCommand) error
func (*FakeOrgService) DeleteUserFromAll ¶
func (f *FakeOrgService) DeleteUserFromAll(ctx context.Context, userID int64) error
func (*FakeOrgService) GetByID ¶
func (f *FakeOrgService) GetByID(ctx context.Context, query *org.GetOrgByIDQuery) (*org.Org, error)
func (*FakeOrgService) GetByName ¶
func (f *FakeOrgService) GetByName(ctx context.Context, query *org.GetOrgByNameQuery) (*org.Org, error)
func (*FakeOrgService) GetIDForNewUser ¶
func (f *FakeOrgService) GetIDForNewUser(ctx context.Context, cmd org.GetOrgIDForNewUserCommand) (int64, error)
func (*FakeOrgService) GetOrCreate ¶
func (*FakeOrgService) GetOrgUsers ¶
func (f *FakeOrgService) GetOrgUsers(ctx context.Context, query *org.GetOrgUsersQuery) ([]*org.OrgUserDTO, error)
func (*FakeOrgService) GetUserOrgList ¶
func (f *FakeOrgService) GetUserOrgList(ctx context.Context, query *org.GetUserOrgListQuery) ([]*org.UserOrgDTO, error)
func (*FakeOrgService) InsertOrgUser ¶
func (*FakeOrgService) RegisterDelete ¶
func (f *FakeOrgService) RegisterDelete(query string)
func (*FakeOrgService) RemoveOrgUser ¶
func (f *FakeOrgService) RemoveOrgUser(ctx context.Context, cmd *org.RemoveOrgUserCommand) error
func (*FakeOrgService) Search ¶
func (f *FakeOrgService) Search(ctx context.Context, query *org.SearchOrgsQuery) ([]*org.OrgDTO, error)
func (*FakeOrgService) SearchOrgUsers ¶
func (f *FakeOrgService) SearchOrgUsers(ctx context.Context, query *org.SearchOrgUsersQuery) (*org.SearchOrgUsersQueryResult, error)
func (*FakeOrgService) UpdateAddress ¶
func (f *FakeOrgService) UpdateAddress(ctx context.Context, cmd *org.UpdateOrgAddressCommand) error
func (*FakeOrgService) UpdateOrg ¶
func (f *FakeOrgService) UpdateOrg(ctx context.Context, cmd *org.UpdateOrgCommand) error
func (*FakeOrgService) UpdateOrgUser ¶
func (f *FakeOrgService) UpdateOrgUser(ctx context.Context, cmd *org.UpdateOrgUserCommand) error
type MockService ¶
MockService is an autogenerated mock type for the Service type
func NewMockService ¶
func NewMockService(t interface { mock.TestingT Cleanup(func()) }) *MockService
NewMockService creates a new instance of MockService. 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 (*MockService) AddOrgUser ¶
func (_m *MockService) AddOrgUser(_a0 context.Context, _a1 *org.AddOrgUserCommand) error
AddOrgUser provides a mock function with given fields: _a0, _a1
func (*MockService) CreateWithMember ¶
func (_m *MockService) CreateWithMember(_a0 context.Context, _a1 *org.CreateOrgCommand) (*org.Org, error)
CreateWithMember provides a mock function with given fields: _a0, _a1
func (*MockService) Delete ¶
func (_m *MockService) Delete(_a0 context.Context, _a1 *org.DeleteOrgCommand) error
Delete provides a mock function with given fields: _a0, _a1
func (*MockService) DeleteUserFromAll ¶
func (_m *MockService) DeleteUserFromAll(_a0 context.Context, _a1 int64) error
DeleteUserFromAll provides a mock function with given fields: _a0, _a1
func (*MockService) GetByID ¶
func (_m *MockService) GetByID(_a0 context.Context, _a1 *org.GetOrgByIDQuery) (*org.Org, error)
GetByID provides a mock function with given fields: _a0, _a1
func (*MockService) GetByName ¶
func (_m *MockService) GetByName(_a0 context.Context, _a1 *org.GetOrgByNameQuery) (*org.Org, error)
GetByName provides a mock function with given fields: _a0, _a1
func (*MockService) GetIDForNewUser ¶
func (_m *MockService) GetIDForNewUser(_a0 context.Context, _a1 org.GetOrgIDForNewUserCommand) (int64, error)
GetIDForNewUser provides a mock function with given fields: _a0, _a1
func (*MockService) GetOrCreate ¶
GetOrCreate provides a mock function with given fields: _a0, _a1
func (*MockService) GetOrgUsers ¶
func (_m *MockService) GetOrgUsers(_a0 context.Context, _a1 *org.GetOrgUsersQuery) ([]*org.OrgUserDTO, error)
GetOrgUsers provides a mock function with given fields: _a0, _a1
func (*MockService) GetUserOrgList ¶
func (_m *MockService) GetUserOrgList(_a0 context.Context, _a1 *org.GetUserOrgListQuery) ([]*org.UserOrgDTO, error)
GetUserOrgList provides a mock function with given fields: _a0, _a1
func (*MockService) InsertOrgUser ¶
InsertOrgUser provides a mock function with given fields: _a0, _a1
func (*MockService) RegisterDelete ¶
func (_m *MockService) RegisterDelete(query string)
RegisterDelete provides a mock function with given fields: query
func (*MockService) RemoveOrgUser ¶
func (_m *MockService) RemoveOrgUser(_a0 context.Context, _a1 *org.RemoveOrgUserCommand) error
RemoveOrgUser provides a mock function with given fields: _a0, _a1
func (*MockService) Search ¶
func (_m *MockService) Search(_a0 context.Context, _a1 *org.SearchOrgsQuery) ([]*org.OrgDTO, error)
Search provides a mock function with given fields: _a0, _a1
func (*MockService) SearchOrgUsers ¶
func (_m *MockService) SearchOrgUsers(_a0 context.Context, _a1 *org.SearchOrgUsersQuery) (*org.SearchOrgUsersQueryResult, error)
SearchOrgUsers provides a mock function with given fields: _a0, _a1
func (*MockService) UpdateAddress ¶
func (_m *MockService) UpdateAddress(_a0 context.Context, _a1 *org.UpdateOrgAddressCommand) error
UpdateAddress provides a mock function with given fields: _a0, _a1
func (*MockService) UpdateOrg ¶
func (_m *MockService) UpdateOrg(_a0 context.Context, _a1 *org.UpdateOrgCommand) error
UpdateOrg provides a mock function with given fields: _a0, _a1
func (*MockService) UpdateOrgUser ¶
func (_m *MockService) UpdateOrgUser(_a0 context.Context, _a1 *org.UpdateOrgUserCommand) error
UpdateOrgUser provides a mock function with given fields: _a0, _a1