Documentation ¶
Index ¶
- type UserRepository
- func (_m *UserRepository) Count(ctx context.Context) (int64, error)
- func (_m *UserRepository) Create(ctx context.Context, user *entities.User) (*entities.User, error)
- func (_m *UserRepository) DeleteByID(ctx context.Context, id uint) error
- func (_m *UserRepository) EXPECT() *UserRepository_Expecter
- func (_m *UserRepository) FindAll(ctx context.Context, pagination *models.Pagination) (*models.Page[*entities.User], error)
- func (_m *UserRepository) FindAllByCriteria(ctx context.Context, ...) (*models.Page[*entities.User], error)
- func (_m *UserRepository) FindOneByEmailWithExclusiveLock(ctx context.Context, email string) (*entities.User, error)
- func (_m *UserRepository) FindOneByID(ctx context.Context, id uint) (*entities.User, error)
- func (_m *UserRepository) FindOneByIDForUpdate(ctx context.Context, id uint) (*entities.User, error)
- func (_m *UserRepository) Overview(ctx context.Context, ...) (*models.Page[*usersmodels.SenderOverview], error)
- func (_m *UserRepository) Save(ctx context.Context, user *entities.User) (*entities.User, error)
- func (_m *UserRepository) TransactWithDefaultRetry(ctx context.Context, operation func(*gorm.DB) error) error
- func (_m *UserRepository) WithTx(tx *gorm.DB) users.UserRepository
- type UserRepository_Count_Call
- type UserRepository_Create_Call
- type UserRepository_DeleteByID_Call
- type UserRepository_Expecter
- func (_e *UserRepository_Expecter) Count(ctx interface{}) *UserRepository_Count_Call
- func (_e *UserRepository_Expecter) Create(ctx interface{}, user interface{}) *UserRepository_Create_Call
- func (_e *UserRepository_Expecter) DeleteByID(ctx interface{}, id interface{}) *UserRepository_DeleteByID_Call
- func (_e *UserRepository_Expecter) FindAll(ctx interface{}, pagination interface{}) *UserRepository_FindAll_Call
- func (_e *UserRepository_Expecter) FindAllByCriteria(ctx interface{}, criteriaAndPagination interface{}) *UserRepository_FindAllByCriteria_Call
- func (_e *UserRepository_Expecter) FindOneByEmailWithExclusiveLock(ctx interface{}, email interface{}) *UserRepository_FindOneByEmailWithExclusiveLock_Call
- func (_e *UserRepository_Expecter) FindOneByID(ctx interface{}, id interface{}) *UserRepository_FindOneByID_Call
- func (_e *UserRepository_Expecter) FindOneByIDForUpdate(ctx interface{}, id interface{}) *UserRepository_FindOneByIDForUpdate_Call
- func (_e *UserRepository_Expecter) Overview(ctx interface{}, criteriaAndPagination interface{}) *UserRepository_Overview_Call
- func (_e *UserRepository_Expecter) Save(ctx interface{}, user interface{}) *UserRepository_Save_Call
- func (_e *UserRepository_Expecter) TransactWithDefaultRetry(ctx interface{}, operation interface{}) *UserRepository_TransactWithDefaultRetry_Call
- func (_e *UserRepository_Expecter) WithTx(tx interface{}) *UserRepository_WithTx_Call
- type UserRepository_FindAllByCriteria_Call
- type UserRepository_FindAll_Call
- type UserRepository_FindOneByEmailWithExclusiveLock_Call
- func (_c *UserRepository_FindOneByEmailWithExclusiveLock_Call) Return(_a0 *entities.User, _a1 error) *UserRepository_FindOneByEmailWithExclusiveLock_Call
- func (_c *UserRepository_FindOneByEmailWithExclusiveLock_Call) Run(run func(ctx context.Context, email string)) *UserRepository_FindOneByEmailWithExclusiveLock_Call
- type UserRepository_FindOneByIDForUpdate_Call
- type UserRepository_FindOneByID_Call
- type UserRepository_Overview_Call
- type UserRepository_Save_Call
- type UserRepository_TransactWithDefaultRetry_Call
- type UserRepository_WithTx_Call
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type UserRepository ¶
UserRepository is an autogenerated mock type for the UserRepository type
func NewUserRepository ¶
func NewUserRepository(t mockConstructorTestingTNewUserRepository) *UserRepository
NewUserRepository creates a new instance of UserRepository. It also registers a testing interface on the mock and a cleanup function to assert the mocks expectations.
func (*UserRepository) Count ¶
func (_m *UserRepository) Count(ctx context.Context) (int64, error)
Count provides a mock function with given fields: ctx
func (*UserRepository) DeleteByID ¶
func (_m *UserRepository) DeleteByID(ctx context.Context, id uint) error
DeleteByID provides a mock function with given fields: ctx, id
func (*UserRepository) EXPECT ¶
func (_m *UserRepository) EXPECT() *UserRepository_Expecter
func (*UserRepository) FindAll ¶
func (_m *UserRepository) FindAll(ctx context.Context, pagination *models.Pagination) (*models.Page[*entities.User], error)
FindAll provides a mock function with given fields: ctx, pagination
func (*UserRepository) FindAllByCriteria ¶
func (_m *UserRepository) FindAllByCriteria(ctx context.Context, criteriaAndPagination *models.CriteriaAndPagination[users.FindAllCriteria]) (*models.Page[*entities.User], error)
FindAllByCriteria provides a mock function with given fields: ctx, criteriaAndPagination
func (*UserRepository) FindOneByEmailWithExclusiveLock ¶
func (_m *UserRepository) FindOneByEmailWithExclusiveLock(ctx context.Context, email string) (*entities.User, error)
FindOneByEmailWithExclusiveLock provides a mock function with given fields: ctx, email
func (*UserRepository) FindOneByID ¶
FindOneByID provides a mock function with given fields: ctx, id
func (*UserRepository) FindOneByIDForUpdate ¶
func (_m *UserRepository) FindOneByIDForUpdate(ctx context.Context, id uint) (*entities.User, error)
FindOneByIDForUpdate provides a mock function with given fields: ctx, id
func (*UserRepository) Overview ¶
func (_m *UserRepository) Overview(ctx context.Context, criteriaAndPagination *models.CriteriaAndPagination[users.OverviewCriteria]) (*models.Page[*usersmodels.SenderOverview], error)
Overview provides a mock function with given fields: ctx, criteriaAndPagination
func (*UserRepository) TransactWithDefaultRetry ¶
func (_m *UserRepository) TransactWithDefaultRetry(ctx context.Context, operation func(*gorm.DB) error) error
TransactWithDefaultRetry provides a mock function with given fields: ctx, operation
func (*UserRepository) WithTx ¶
func (_m *UserRepository) WithTx(tx *gorm.DB) users.UserRepository
WithTx provides a mock function with given fields: tx
type UserRepository_Count_Call ¶
UserRepository_Count_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'Count'
func (*UserRepository_Count_Call) Return ¶
func (_c *UserRepository_Count_Call) Return(_a0 int64, _a1 error) *UserRepository_Count_Call
func (*UserRepository_Count_Call) Run ¶
func (_c *UserRepository_Count_Call) Run(run func(ctx context.Context)) *UserRepository_Count_Call
type UserRepository_Create_Call ¶
UserRepository_Create_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'Create'
func (*UserRepository_Create_Call) Return ¶
func (_c *UserRepository_Create_Call) Return(_a0 *entities.User, _a1 error) *UserRepository_Create_Call
func (*UserRepository_Create_Call) Run ¶
func (_c *UserRepository_Create_Call) Run(run func(ctx context.Context, user *entities.User)) *UserRepository_Create_Call
type UserRepository_DeleteByID_Call ¶
UserRepository_DeleteByID_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'DeleteByID'
func (*UserRepository_DeleteByID_Call) Return ¶
func (_c *UserRepository_DeleteByID_Call) Return(_a0 error) *UserRepository_DeleteByID_Call
func (*UserRepository_DeleteByID_Call) Run ¶
func (_c *UserRepository_DeleteByID_Call) Run(run func(ctx context.Context, id uint)) *UserRepository_DeleteByID_Call
type UserRepository_Expecter ¶
type UserRepository_Expecter struct {
// contains filtered or unexported fields
}
func (*UserRepository_Expecter) Count ¶
func (_e *UserRepository_Expecter) Count(ctx interface{}) *UserRepository_Count_Call
Count is a helper method to define mock.On call
- ctx context.Context
func (*UserRepository_Expecter) Create ¶
func (_e *UserRepository_Expecter) Create(ctx interface{}, user interface{}) *UserRepository_Create_Call
Create is a helper method to define mock.On call
- ctx context.Context
- user *entities.User
func (*UserRepository_Expecter) DeleteByID ¶
func (_e *UserRepository_Expecter) DeleteByID(ctx interface{}, id interface{}) *UserRepository_DeleteByID_Call
DeleteByID is a helper method to define mock.On call
- ctx context.Context
- id uint
func (*UserRepository_Expecter) FindAll ¶
func (_e *UserRepository_Expecter) FindAll(ctx interface{}, pagination interface{}) *UserRepository_FindAll_Call
FindAll is a helper method to define mock.On call
- ctx context.Context
- pagination *models.Pagination
func (*UserRepository_Expecter) FindAllByCriteria ¶
func (_e *UserRepository_Expecter) FindAllByCriteria(ctx interface{}, criteriaAndPagination interface{}) *UserRepository_FindAllByCriteria_Call
FindAllByCriteria is a helper method to define mock.On call
- ctx context.Context
- criteriaAndPagination *models.CriteriaAndPagination[users.FindAllCriteria]
func (*UserRepository_Expecter) FindOneByEmailWithExclusiveLock ¶
func (_e *UserRepository_Expecter) FindOneByEmailWithExclusiveLock(ctx interface{}, email interface{}) *UserRepository_FindOneByEmailWithExclusiveLock_Call
FindOneByEmailWithExclusiveLock is a helper method to define mock.On call
- ctx context.Context
- email string
func (*UserRepository_Expecter) FindOneByID ¶
func (_e *UserRepository_Expecter) FindOneByID(ctx interface{}, id interface{}) *UserRepository_FindOneByID_Call
FindOneByID is a helper method to define mock.On call
- ctx context.Context
- id uint
func (*UserRepository_Expecter) FindOneByIDForUpdate ¶
func (_e *UserRepository_Expecter) FindOneByIDForUpdate(ctx interface{}, id interface{}) *UserRepository_FindOneByIDForUpdate_Call
FindOneByIDForUpdate is a helper method to define mock.On call
- ctx context.Context
- id uint
func (*UserRepository_Expecter) Overview ¶
func (_e *UserRepository_Expecter) Overview(ctx interface{}, criteriaAndPagination interface{}) *UserRepository_Overview_Call
Overview is a helper method to define mock.On call
- ctx context.Context
- criteriaAndPagination *models.CriteriaAndPagination[users.OverviewCriteria]
func (*UserRepository_Expecter) Save ¶
func (_e *UserRepository_Expecter) Save(ctx interface{}, user interface{}) *UserRepository_Save_Call
Save is a helper method to define mock.On call
- ctx context.Context
- user *entities.User
func (*UserRepository_Expecter) TransactWithDefaultRetry ¶
func (_e *UserRepository_Expecter) TransactWithDefaultRetry(ctx interface{}, operation interface{}) *UserRepository_TransactWithDefaultRetry_Call
TransactWithDefaultRetry is a helper method to define mock.On call
- ctx context.Context
- operation func(*gorm.DB) error
func (*UserRepository_Expecter) WithTx ¶
func (_e *UserRepository_Expecter) WithTx(tx interface{}) *UserRepository_WithTx_Call
WithTx is a helper method to define mock.On call
- tx *gorm.DB
type UserRepository_FindAllByCriteria_Call ¶
UserRepository_FindAllByCriteria_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'FindAllByCriteria'
func (*UserRepository_FindAllByCriteria_Call) Return ¶
func (_c *UserRepository_FindAllByCriteria_Call) Return(page *models.Page[*entities.User], err error) *UserRepository_FindAllByCriteria_Call
func (*UserRepository_FindAllByCriteria_Call) Run ¶
func (_c *UserRepository_FindAllByCriteria_Call) Run(run func(ctx context.Context, criteriaAndPagination *models.CriteriaAndPagination[users.FindAllCriteria])) *UserRepository_FindAllByCriteria_Call
type UserRepository_FindAll_Call ¶
UserRepository_FindAll_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'FindAll'
func (*UserRepository_FindAll_Call) Return ¶
func (_c *UserRepository_FindAll_Call) Return(page *models.Page[*entities.User], err error) *UserRepository_FindAll_Call
func (*UserRepository_FindAll_Call) Run ¶
func (_c *UserRepository_FindAll_Call) Run(run func(ctx context.Context, pagination *models.Pagination)) *UserRepository_FindAll_Call
type UserRepository_FindOneByEmailWithExclusiveLock_Call ¶
UserRepository_FindOneByEmailWithExclusiveLock_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'FindOneByEmailWithExclusiveLock'
func (*UserRepository_FindOneByEmailWithExclusiveLock_Call) Return ¶
func (_c *UserRepository_FindOneByEmailWithExclusiveLock_Call) Return(_a0 *entities.User, _a1 error) *UserRepository_FindOneByEmailWithExclusiveLock_Call
func (*UserRepository_FindOneByEmailWithExclusiveLock_Call) Run ¶
func (_c *UserRepository_FindOneByEmailWithExclusiveLock_Call) Run(run func(ctx context.Context, email string)) *UserRepository_FindOneByEmailWithExclusiveLock_Call
type UserRepository_FindOneByIDForUpdate_Call ¶
UserRepository_FindOneByIDForUpdate_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'FindOneByIDForUpdate'
func (*UserRepository_FindOneByIDForUpdate_Call) Return ¶
func (_c *UserRepository_FindOneByIDForUpdate_Call) Return(_a0 *entities.User, _a1 error) *UserRepository_FindOneByIDForUpdate_Call
func (*UserRepository_FindOneByIDForUpdate_Call) Run ¶
func (_c *UserRepository_FindOneByIDForUpdate_Call) Run(run func(ctx context.Context, id uint)) *UserRepository_FindOneByIDForUpdate_Call
type UserRepository_FindOneByID_Call ¶
UserRepository_FindOneByID_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'FindOneByID'
func (*UserRepository_FindOneByID_Call) Return ¶
func (_c *UserRepository_FindOneByID_Call) Return(user *entities.User, err error) *UserRepository_FindOneByID_Call
func (*UserRepository_FindOneByID_Call) Run ¶
func (_c *UserRepository_FindOneByID_Call) Run(run func(ctx context.Context, id uint)) *UserRepository_FindOneByID_Call
type UserRepository_Overview_Call ¶
UserRepository_Overview_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'Overview'
func (*UserRepository_Overview_Call) Return ¶
func (_c *UserRepository_Overview_Call) Return(page *models.Page[*usersmodels.SenderOverview], err error) *UserRepository_Overview_Call
func (*UserRepository_Overview_Call) Run ¶
func (_c *UserRepository_Overview_Call) Run(run func(ctx context.Context, criteriaAndPagination *models.CriteriaAndPagination[users.OverviewCriteria])) *UserRepository_Overview_Call
type UserRepository_Save_Call ¶
UserRepository_Save_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'Save'
func (*UserRepository_Save_Call) Return ¶
func (_c *UserRepository_Save_Call) Return(_a0 *entities.User, _a1 error) *UserRepository_Save_Call
func (*UserRepository_Save_Call) Run ¶
func (_c *UserRepository_Save_Call) Run(run func(ctx context.Context, user *entities.User)) *UserRepository_Save_Call
type UserRepository_TransactWithDefaultRetry_Call ¶
UserRepository_TransactWithDefaultRetry_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'TransactWithDefaultRetry'
func (*UserRepository_TransactWithDefaultRetry_Call) Return ¶
func (_c *UserRepository_TransactWithDefaultRetry_Call) Return(_a0 error) *UserRepository_TransactWithDefaultRetry_Call
func (*UserRepository_TransactWithDefaultRetry_Call) Run ¶
func (_c *UserRepository_TransactWithDefaultRetry_Call) Run(run func(ctx context.Context, operation func(*gorm.DB) error)) *UserRepository_TransactWithDefaultRetry_Call
type UserRepository_WithTx_Call ¶
UserRepository_WithTx_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'WithTx'
func (*UserRepository_WithTx_Call) Return ¶
func (_c *UserRepository_WithTx_Call) Return(_a0 users.UserRepository) *UserRepository_WithTx_Call
func (*UserRepository_WithTx_Call) Run ¶
func (_c *UserRepository_WithTx_Call) Run(run func(tx *gorm.DB)) *UserRepository_WithTx_Call