mocks

package
v0.0.0-...-d389d3b Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Dec 14, 2022 License: MIT Imports: 7 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type UserRepository

type UserRepository struct {
	mock.Mock
}

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) Create

func (_m *UserRepository) Create(ctx context.Context, user *entities.User) (*entities.User, error)

Create provides a mock function with given fields: ctx, user

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 (*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

func (_m *UserRepository) FindOneByID(ctx context.Context, id uint) (*entities.User, error)

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

Overview provides a mock function with given fields: ctx, criteriaAndPagination

func (*UserRepository) Save

func (_m *UserRepository) Save(ctx context.Context, user *entities.User) (*entities.User, error)

Save provides a mock function with given fields: ctx, user

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

type UserRepository_Count_Call struct {
	*mock.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 (*UserRepository_Count_Call) Run

type UserRepository_Create_Call

type UserRepository_Create_Call struct {
	*mock.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 (*UserRepository_Create_Call) Run

type UserRepository_DeleteByID_Call

type UserRepository_DeleteByID_Call struct {
	*mock.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 (*UserRepository_DeleteByID_Call) Run

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

type UserRepository_FindAllByCriteria_Call struct {
	*mock.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 (*UserRepository_FindAllByCriteria_Call) Run

type UserRepository_FindAll_Call

type UserRepository_FindAll_Call struct {
	*mock.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 (*UserRepository_FindAll_Call) Run

type UserRepository_FindOneByEmailWithExclusiveLock_Call

type UserRepository_FindOneByEmailWithExclusiveLock_Call struct {
	*mock.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 (*UserRepository_FindOneByEmailWithExclusiveLock_Call) Run

type UserRepository_FindOneByIDForUpdate_Call

type UserRepository_FindOneByIDForUpdate_Call struct {
	*mock.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 (*UserRepository_FindOneByIDForUpdate_Call) Run

type UserRepository_FindOneByID_Call

type UserRepository_FindOneByID_Call struct {
	*mock.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 (*UserRepository_FindOneByID_Call) Run

type UserRepository_Overview_Call

type UserRepository_Overview_Call struct {
	*mock.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 (*UserRepository_Overview_Call) Run

type UserRepository_Save_Call

type UserRepository_Save_Call struct {
	*mock.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 (*UserRepository_Save_Call) Run

type UserRepository_TransactWithDefaultRetry_Call

type UserRepository_TransactWithDefaultRetry_Call struct {
	*mock.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 (*UserRepository_TransactWithDefaultRetry_Call) Run

type UserRepository_WithTx_Call

type UserRepository_WithTx_Call struct {
	*mock.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 (*UserRepository_WithTx_Call) Run

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL