Documentation ¶
Index ¶
- type FakeUserService
- func (f *FakeUserService) BatchDisableUsers(ctx context.Context, cmd *user.BatchDisableUsersCommand) error
- func (f *FakeUserService) Create(ctx context.Context, cmd *user.CreateUserCommand) (*user.User, error)
- func (f *FakeUserService) CreateServiceAccount(ctx context.Context, cmd *user.CreateUserCommand) (*user.User, error)
- func (f *FakeUserService) Delete(ctx context.Context, cmd *user.DeleteUserCommand) error
- func (f *FakeUserService) GetByEmail(ctx context.Context, query *user.GetUserByEmailQuery) (*user.User, error)
- func (f *FakeUserService) GetByID(ctx context.Context, query *user.GetUserByIDQuery) (*user.User, error)
- func (f *FakeUserService) GetByLogin(ctx context.Context, query *user.GetUserByLoginQuery) (*user.User, error)
- func (f *FakeUserService) GetProfile(ctx context.Context, query *user.GetUserProfileQuery) (*user.UserProfileDTO, error)
- func (f *FakeUserService) GetSignedInUser(ctx context.Context, query *user.GetSignedInUserQuery) (*user.SignedInUser, error)
- func (f FakeUserService) GetUsageStats(ctx context.Context) map[string]any
- func (f *FakeUserService) NewAnonymousSignedInUser(ctx context.Context) (*user.SignedInUser, error)
- func (f *FakeUserService) Search(ctx context.Context, query *user.SearchUsersQuery) (*user.SearchUserQueryResult, error)
- func (f *FakeUserService) Update(ctx context.Context, cmd *user.UpdateUserCommand) error
- func (f *FakeUserService) UpdateLastSeenAt(ctx context.Context, cmd *user.UpdateUserLastSeenAtCommand) error
- type MockService
- func (_m *MockService) BatchDisableUsers(_a0 context.Context, _a1 *user.BatchDisableUsersCommand) error
- func (_m *MockService) Create(_a0 context.Context, _a1 *user.CreateUserCommand) (*user.User, error)
- func (_m *MockService) CreateServiceAccount(_a0 context.Context, _a1 *user.CreateUserCommand) (*user.User, error)
- func (_m *MockService) Delete(_a0 context.Context, _a1 *user.DeleteUserCommand) error
- func (_m *MockService) GetByEmail(_a0 context.Context, _a1 *user.GetUserByEmailQuery) (*user.User, error)
- func (_m *MockService) GetByID(_a0 context.Context, _a1 *user.GetUserByIDQuery) (*user.User, error)
- func (_m *MockService) GetByLogin(_a0 context.Context, _a1 *user.GetUserByLoginQuery) (*user.User, error)
- func (_m *MockService) GetProfile(_a0 context.Context, _a1 *user.GetUserProfileQuery) (*user.UserProfileDTO, error)
- func (_m *MockService) GetSignedInUser(_a0 context.Context, _a1 *user.GetSignedInUserQuery) (*user.SignedInUser, error)
- func (_m *MockService) GetSignedInUserWithCacheCtx(_a0 context.Context, _a1 *user.GetSignedInUserQuery) (*user.SignedInUser, error)
- func (_m *MockService) GetUsageStats(ctx context.Context) map[string]interface{}
- func (_m *MockService) Search(_a0 context.Context, _a1 *user.SearchUsersQuery) (*user.SearchUserQueryResult, error)
- func (_m *MockService) Update(_a0 context.Context, _a1 *user.UpdateUserCommand) error
- func (_m *MockService) UpdateLastSeenAt(_a0 context.Context, _a1 *user.UpdateUserLastSeenAtCommand) error
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type FakeUserService ¶
type FakeUserService struct { ExpectedUser *user.User ExpectedSignedInUser *user.SignedInUser ExpectedError error ExpectedSetUsingOrgError error ExpectedSearchUsers user.SearchUserQueryResult ExpectedUserProfileDTO *user.UserProfileDTO ExpectedUserProfileDTOs []*user.UserProfileDTO ExpectedUsageStats map[string]any UpdateFn func(ctx context.Context, cmd *user.UpdateUserCommand) error GetSignedInUserFn func(ctx context.Context, query *user.GetSignedInUserQuery) (*user.SignedInUser, error) CreateFn func(ctx context.Context, cmd *user.CreateUserCommand) (*user.User, error) BatchDisableUsersFn func(ctx context.Context, cmd *user.BatchDisableUsersCommand) error GetByEmailFn func(ctx context.Context, query *user.GetUserByEmailQuery) (*user.User, error) // contains filtered or unexported fields }
func NewUserServiceFake ¶
func NewUserServiceFake() *FakeUserService
func (*FakeUserService) BatchDisableUsers ¶
func (f *FakeUserService) BatchDisableUsers(ctx context.Context, cmd *user.BatchDisableUsersCommand) error
func (*FakeUserService) Create ¶
func (f *FakeUserService) Create(ctx context.Context, cmd *user.CreateUserCommand) (*user.User, error)
func (*FakeUserService) CreateServiceAccount ¶
func (f *FakeUserService) CreateServiceAccount(ctx context.Context, cmd *user.CreateUserCommand) (*user.User, error)
func (*FakeUserService) Delete ¶
func (f *FakeUserService) Delete(ctx context.Context, cmd *user.DeleteUserCommand) error
func (*FakeUserService) GetByEmail ¶
func (f *FakeUserService) GetByEmail(ctx context.Context, query *user.GetUserByEmailQuery) (*user.User, error)
func (*FakeUserService) GetByID ¶
func (f *FakeUserService) GetByID(ctx context.Context, query *user.GetUserByIDQuery) (*user.User, error)
func (*FakeUserService) GetByLogin ¶
func (f *FakeUserService) GetByLogin(ctx context.Context, query *user.GetUserByLoginQuery) (*user.User, error)
func (*FakeUserService) GetProfile ¶
func (f *FakeUserService) GetProfile(ctx context.Context, query *user.GetUserProfileQuery) (*user.UserProfileDTO, error)
func (*FakeUserService) GetSignedInUser ¶
func (f *FakeUserService) GetSignedInUser(ctx context.Context, query *user.GetSignedInUserQuery) (*user.SignedInUser, error)
func (FakeUserService) GetUsageStats ¶
func (f FakeUserService) GetUsageStats(ctx context.Context) map[string]any
func (*FakeUserService) NewAnonymousSignedInUser ¶
func (f *FakeUserService) NewAnonymousSignedInUser(ctx context.Context) (*user.SignedInUser, error)
func (*FakeUserService) Search ¶
func (f *FakeUserService) Search(ctx context.Context, query *user.SearchUsersQuery) (*user.SearchUserQueryResult, error)
func (*FakeUserService) Update ¶
func (f *FakeUserService) Update(ctx context.Context, cmd *user.UpdateUserCommand) error
func (*FakeUserService) UpdateLastSeenAt ¶
func (f *FakeUserService) UpdateLastSeenAt(ctx context.Context, cmd *user.UpdateUserLastSeenAtCommand) 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) BatchDisableUsers ¶
func (_m *MockService) BatchDisableUsers(_a0 context.Context, _a1 *user.BatchDisableUsersCommand) error
BatchDisableUsers provides a mock function with given fields: _a0, _a1
func (*MockService) Create ¶
func (_m *MockService) Create(_a0 context.Context, _a1 *user.CreateUserCommand) (*user.User, error)
Create provides a mock function with given fields: _a0, _a1
func (*MockService) CreateServiceAccount ¶
func (_m *MockService) CreateServiceAccount(_a0 context.Context, _a1 *user.CreateUserCommand) (*user.User, error)
CreateServiceAccount provides a mock function with given fields: _a0, _a1
func (*MockService) Delete ¶
func (_m *MockService) Delete(_a0 context.Context, _a1 *user.DeleteUserCommand) error
Delete provides a mock function with given fields: _a0, _a1
func (*MockService) GetByEmail ¶
func (_m *MockService) GetByEmail(_a0 context.Context, _a1 *user.GetUserByEmailQuery) (*user.User, error)
GetByEmail provides a mock function with given fields: _a0, _a1
func (*MockService) GetByID ¶
func (_m *MockService) GetByID(_a0 context.Context, _a1 *user.GetUserByIDQuery) (*user.User, error)
GetByID provides a mock function with given fields: _a0, _a1
func (*MockService) GetByLogin ¶
func (_m *MockService) GetByLogin(_a0 context.Context, _a1 *user.GetUserByLoginQuery) (*user.User, error)
GetByLogin provides a mock function with given fields: _a0, _a1
func (*MockService) GetProfile ¶
func (_m *MockService) GetProfile(_a0 context.Context, _a1 *user.GetUserProfileQuery) (*user.UserProfileDTO, error)
GetProfile provides a mock function with given fields: _a0, _a1
func (*MockService) GetSignedInUser ¶
func (_m *MockService) GetSignedInUser(_a0 context.Context, _a1 *user.GetSignedInUserQuery) (*user.SignedInUser, error)
GetSignedInUser provides a mock function with given fields: _a0, _a1
func (*MockService) GetSignedInUserWithCacheCtx ¶
func (_m *MockService) GetSignedInUserWithCacheCtx(_a0 context.Context, _a1 *user.GetSignedInUserQuery) (*user.SignedInUser, error)
GetSignedInUserWithCacheCtx provides a mock function with given fields: _a0, _a1
func (*MockService) GetUsageStats ¶
func (_m *MockService) GetUsageStats(ctx context.Context) map[string]interface{}
GetUsageStats provides a mock function with given fields: ctx
func (*MockService) Search ¶
func (_m *MockService) Search(_a0 context.Context, _a1 *user.SearchUsersQuery) (*user.SearchUserQueryResult, error)
Search provides a mock function with given fields: _a0, _a1
func (*MockService) Update ¶
func (_m *MockService) Update(_a0 context.Context, _a1 *user.UpdateUserCommand) error
Update provides a mock function with given fields: _a0, _a1
func (*MockService) UpdateLastSeenAt ¶
func (_m *MockService) UpdateLastSeenAt(_a0 context.Context, _a1 *user.UpdateUserLastSeenAtCommand) error
UpdateLastSeenAt provides a mock function with given fields: _a0, _a1