Documentation ¶
Index ¶
- type UserService
- func (_m *UserService) CreateUser(ctx context.Context, toBeCreated entities.User) (*entities.User, error)
- func (_m *UserService) DeleteUserByID(ctx context.Context, id uint) error
- func (_m *UserService) EXPECT() *UserService_Expecter
- func (_m *UserService) FindAllUsers(ctx context.Context, pagination *models.Pagination) (*models.Page[*entities.User], error)
- func (_m *UserService) FindAllUsersByCriteria(ctx context.Context, ...) (*models.Page[*entities.User], error)
- func (_m *UserService) FindOneUserByID(ctx context.Context, id uint) (*entities.User, error)
- func (_m *UserService) FindOneUserByIDForUpdate(ctx context.Context, id uint) (*entities.User, error)
- func (_m *UserService) Overview(ctx context.Context, ...) (*models.Page[*usersmodels.SenderOverview], error)
- func (_m *UserService) UpdateUser(ctx context.Context, updated *entities.User) (*entities.User, error)
- func (_m *UserService) WithTx(tx *gorm.DB) users.UserService
- type UserService_CreateUser_Call
- type UserService_DeleteUserByID_Call
- type UserService_Expecter
- func (_e *UserService_Expecter) CreateUser(ctx interface{}, toBeCreated interface{}) *UserService_CreateUser_Call
- func (_e *UserService_Expecter) DeleteUserByID(ctx interface{}, id interface{}) *UserService_DeleteUserByID_Call
- func (_e *UserService_Expecter) FindAllUsers(ctx interface{}, pagination interface{}) *UserService_FindAllUsers_Call
- func (_e *UserService_Expecter) FindAllUsersByCriteria(ctx interface{}, criteriaAndPagination interface{}) *UserService_FindAllUsersByCriteria_Call
- func (_e *UserService_Expecter) FindOneUserByID(ctx interface{}, id interface{}) *UserService_FindOneUserByID_Call
- func (_e *UserService_Expecter) FindOneUserByIDForUpdate(ctx interface{}, id interface{}) *UserService_FindOneUserByIDForUpdate_Call
- func (_e *UserService_Expecter) Overview(ctx interface{}, criteriaAndPagination interface{}) *UserService_Overview_Call
- func (_e *UserService_Expecter) UpdateUser(ctx interface{}, updated interface{}) *UserService_UpdateUser_Call
- func (_e *UserService_Expecter) WithTx(tx interface{}) *UserService_WithTx_Call
- type UserService_FindAllUsersByCriteria_Call
- type UserService_FindAllUsers_Call
- type UserService_FindOneUserByIDForUpdate_Call
- type UserService_FindOneUserByID_Call
- type UserService_Overview_Call
- type UserService_UpdateUser_Call
- type UserService_WithTx_Call
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type UserService ¶
UserService is an autogenerated mock type for the UserService type
func NewUserService ¶
func NewUserService(t mockConstructorTestingTNewUserService) *UserService
NewUserService creates a new instance of UserService. It also registers a testing interface on the mock and a cleanup function to assert the mocks expectations.
func (*UserService) CreateUser ¶
func (_m *UserService) CreateUser(ctx context.Context, toBeCreated entities.User) (*entities.User, error)
CreateUser provides a mock function with given fields: ctx, toBeCreated
func (*UserService) DeleteUserByID ¶
func (_m *UserService) DeleteUserByID(ctx context.Context, id uint) error
DeleteUserByID provides a mock function with given fields: ctx, id
func (*UserService) EXPECT ¶
func (_m *UserService) EXPECT() *UserService_Expecter
func (*UserService) FindAllUsers ¶
func (_m *UserService) FindAllUsers(ctx context.Context, pagination *models.Pagination) (*models.Page[*entities.User], error)
FindAllUsers provides a mock function with given fields: ctx, pagination
func (*UserService) FindAllUsersByCriteria ¶
func (_m *UserService) FindAllUsersByCriteria(ctx context.Context, criteriaAndPagination *models.CriteriaAndPagination[persistenceusers.FindAllCriteria]) (*models.Page[*entities.User], error)
FindAllUsersByCriteria provides a mock function with given fields: ctx, criteriaAndPagination
func (*UserService) FindOneUserByID ¶
FindOneUserByID provides a mock function with given fields: ctx, id
func (*UserService) FindOneUserByIDForUpdate ¶
func (_m *UserService) FindOneUserByIDForUpdate(ctx context.Context, id uint) (*entities.User, error)
FindOneUserByIDForUpdate provides a mock function with given fields: ctx, id
func (*UserService) Overview ¶
func (_m *UserService) Overview(ctx context.Context, criteriaAndPagination *models.CriteriaAndPagination[persistenceusers.OverviewCriteria]) (*models.Page[*usersmodels.SenderOverview], error)
Overview provides a mock function with given fields: ctx, criteriaAndPagination
func (*UserService) UpdateUser ¶
func (_m *UserService) UpdateUser(ctx context.Context, updated *entities.User) (*entities.User, error)
UpdateUser provides a mock function with given fields: ctx, updated
func (*UserService) WithTx ¶
func (_m *UserService) WithTx(tx *gorm.DB) users.UserService
WithTx provides a mock function with given fields: tx
type UserService_CreateUser_Call ¶
UserService_CreateUser_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'CreateUser'
func (*UserService_CreateUser_Call) Return ¶
func (_c *UserService_CreateUser_Call) Return(user *entities.User, err error) *UserService_CreateUser_Call
func (*UserService_CreateUser_Call) Run ¶
func (_c *UserService_CreateUser_Call) Run(run func(ctx context.Context, toBeCreated entities.User)) *UserService_CreateUser_Call
type UserService_DeleteUserByID_Call ¶
UserService_DeleteUserByID_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'DeleteUserByID'
func (*UserService_DeleteUserByID_Call) Return ¶
func (_c *UserService_DeleteUserByID_Call) Return(_a0 error) *UserService_DeleteUserByID_Call
func (*UserService_DeleteUserByID_Call) Run ¶
func (_c *UserService_DeleteUserByID_Call) Run(run func(ctx context.Context, id uint)) *UserService_DeleteUserByID_Call
type UserService_Expecter ¶
type UserService_Expecter struct {
// contains filtered or unexported fields
}
func (*UserService_Expecter) CreateUser ¶
func (_e *UserService_Expecter) CreateUser(ctx interface{}, toBeCreated interface{}) *UserService_CreateUser_Call
CreateUser is a helper method to define mock.On call
- ctx context.Context
- toBeCreated entities.User
func (*UserService_Expecter) DeleteUserByID ¶
func (_e *UserService_Expecter) DeleteUserByID(ctx interface{}, id interface{}) *UserService_DeleteUserByID_Call
DeleteUserByID is a helper method to define mock.On call
- ctx context.Context
- id uint
func (*UserService_Expecter) FindAllUsers ¶
func (_e *UserService_Expecter) FindAllUsers(ctx interface{}, pagination interface{}) *UserService_FindAllUsers_Call
FindAllUsers is a helper method to define mock.On call
- ctx context.Context
- pagination *models.Pagination
func (*UserService_Expecter) FindAllUsersByCriteria ¶
func (_e *UserService_Expecter) FindAllUsersByCriteria(ctx interface{}, criteriaAndPagination interface{}) *UserService_FindAllUsersByCriteria_Call
FindAllUsersByCriteria is a helper method to define mock.On call
- ctx context.Context
- criteriaAndPagination *models.CriteriaAndPagination[persistenceusers.FindAllCriteria]
func (*UserService_Expecter) FindOneUserByID ¶
func (_e *UserService_Expecter) FindOneUserByID(ctx interface{}, id interface{}) *UserService_FindOneUserByID_Call
FindOneUserByID is a helper method to define mock.On call
- ctx context.Context
- id uint
func (*UserService_Expecter) FindOneUserByIDForUpdate ¶
func (_e *UserService_Expecter) FindOneUserByIDForUpdate(ctx interface{}, id interface{}) *UserService_FindOneUserByIDForUpdate_Call
FindOneUserByIDForUpdate is a helper method to define mock.On call
- ctx context.Context
- id uint
func (*UserService_Expecter) Overview ¶
func (_e *UserService_Expecter) Overview(ctx interface{}, criteriaAndPagination interface{}) *UserService_Overview_Call
Overview is a helper method to define mock.On call
- ctx context.Context
- criteriaAndPagination *models.CriteriaAndPagination[persistenceusers.OverviewCriteria]
func (*UserService_Expecter) UpdateUser ¶
func (_e *UserService_Expecter) UpdateUser(ctx interface{}, updated interface{}) *UserService_UpdateUser_Call
UpdateUser is a helper method to define mock.On call
- ctx context.Context
- updated *entities.User
func (*UserService_Expecter) WithTx ¶
func (_e *UserService_Expecter) WithTx(tx interface{}) *UserService_WithTx_Call
WithTx is a helper method to define mock.On call
- tx *gorm.DB
type UserService_FindAllUsersByCriteria_Call ¶
UserService_FindAllUsersByCriteria_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'FindAllUsersByCriteria'
func (*UserService_FindAllUsersByCriteria_Call) Return ¶
func (_c *UserService_FindAllUsersByCriteria_Call) Return(_a0 *models.Page[*entities.User], err error) *UserService_FindAllUsersByCriteria_Call
func (*UserService_FindAllUsersByCriteria_Call) Run ¶
func (_c *UserService_FindAllUsersByCriteria_Call) Run(run func(ctx context.Context, criteriaAndPagination *models.CriteriaAndPagination[persistenceusers.FindAllCriteria])) *UserService_FindAllUsersByCriteria_Call
type UserService_FindAllUsers_Call ¶
UserService_FindAllUsers_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'FindAllUsers'
func (*UserService_FindAllUsers_Call) Return ¶
func (_c *UserService_FindAllUsers_Call) Return(_a0 *models.Page[*entities.User], err error) *UserService_FindAllUsers_Call
func (*UserService_FindAllUsers_Call) Run ¶
func (_c *UserService_FindAllUsers_Call) Run(run func(ctx context.Context, pagination *models.Pagination)) *UserService_FindAllUsers_Call
type UserService_FindOneUserByIDForUpdate_Call ¶
UserService_FindOneUserByIDForUpdate_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'FindOneUserByIDForUpdate'
func (*UserService_FindOneUserByIDForUpdate_Call) Return ¶
func (_c *UserService_FindOneUserByIDForUpdate_Call) Return(_a0 *entities.User, _a1 error) *UserService_FindOneUserByIDForUpdate_Call
func (*UserService_FindOneUserByIDForUpdate_Call) Run ¶
func (_c *UserService_FindOneUserByIDForUpdate_Call) Run(run func(ctx context.Context, id uint)) *UserService_FindOneUserByIDForUpdate_Call
type UserService_FindOneUserByID_Call ¶
UserService_FindOneUserByID_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'FindOneUserByID'
func (*UserService_FindOneUserByID_Call) Return ¶
func (_c *UserService_FindOneUserByID_Call) Return(user *entities.User, err error) *UserService_FindOneUserByID_Call
func (*UserService_FindOneUserByID_Call) Run ¶
func (_c *UserService_FindOneUserByID_Call) Run(run func(ctx context.Context, id uint)) *UserService_FindOneUserByID_Call
type UserService_Overview_Call ¶
UserService_Overview_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'Overview'
func (*UserService_Overview_Call) Return ¶
func (_c *UserService_Overview_Call) Return(_a0 *models.Page[*usersmodels.SenderOverview], err error) *UserService_Overview_Call
func (*UserService_Overview_Call) Run ¶
func (_c *UserService_Overview_Call) Run(run func(ctx context.Context, criteriaAndPagination *models.CriteriaAndPagination[persistenceusers.OverviewCriteria])) *UserService_Overview_Call
type UserService_UpdateUser_Call ¶
UserService_UpdateUser_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'UpdateUser'
func (*UserService_UpdateUser_Call) Return ¶
func (_c *UserService_UpdateUser_Call) Return(user *entities.User, err error) *UserService_UpdateUser_Call
func (*UserService_UpdateUser_Call) Run ¶
func (_c *UserService_UpdateUser_Call) Run(run func(ctx context.Context, updated *entities.User)) *UserService_UpdateUser_Call
type UserService_WithTx_Call ¶
UserService_WithTx_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'WithTx'
func (*UserService_WithTx_Call) Return ¶
func (_c *UserService_WithTx_Call) Return(_a0 users.UserService) *UserService_WithTx_Call
func (*UserService_WithTx_Call) Run ¶
func (_c *UserService_WithTx_Call) Run(run func(tx *gorm.DB)) *UserService_WithTx_Call