mocks

package
v1.3.0 Latest Latest
Warning

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

Go to latest
Published: Aug 21, 2025 License: MIT Imports: 8 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type AccountRepository

type AccountRepository struct {
	mock.Mock
}

AccountRepository is an autogenerated mock type for the Repository type

func NewAccountRepository

func NewAccountRepository(t interface {
	mock.TestingT
	Cleanup(func())
}) *AccountRepository

NewAccountRepository creates a new instance of AccountRepository. 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 (*AccountRepository) Create

func (_mock *AccountRepository) Create(ctx context.Context, create dto.AccountCreate) error

Create provides a mock function for the type AccountRepository

func (*AccountRepository) EXPECT

func (*AccountRepository) Get

func (_mock *AccountRepository) Get(ctx context.Context, id uuid.UUID) (*dto.AccountRead, error)

Get provides a mock function for the type AccountRepository

func (*AccountRepository) ListByUser

func (_mock *AccountRepository) ListByUser(ctx context.Context, userID uuid.UUID) ([]*dto.AccountRead, error)

ListByUser provides a mock function for the type AccountRepository

func (*AccountRepository) Update

func (_mock *AccountRepository) Update(ctx context.Context, id uuid.UUID, update dto.AccountUpdate) error

Update provides a mock function for the type AccountRepository

type AccountRepository_Create_Call

type AccountRepository_Create_Call struct {
	*mock.Call
}

AccountRepository_Create_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'Create'

func (*AccountRepository_Create_Call) Return

func (*AccountRepository_Create_Call) Run

func (*AccountRepository_Create_Call) RunAndReturn

type AccountRepository_Expecter

type AccountRepository_Expecter struct {
	// contains filtered or unexported fields
}

func (*AccountRepository_Expecter) Create

func (_e *AccountRepository_Expecter) Create(ctx interface{}, create interface{}) *AccountRepository_Create_Call

Create is a helper method to define mock.On call

  • ctx context.Context
  • create dto.AccountCreate

func (*AccountRepository_Expecter) Get

func (_e *AccountRepository_Expecter) Get(ctx interface{}, id interface{}) *AccountRepository_Get_Call

Get is a helper method to define mock.On call

  • ctx context.Context
  • id uuid.UUID

func (*AccountRepository_Expecter) ListByUser

func (_e *AccountRepository_Expecter) ListByUser(ctx interface{}, userID interface{}) *AccountRepository_ListByUser_Call

ListByUser is a helper method to define mock.On call

  • ctx context.Context
  • userID uuid.UUID

func (*AccountRepository_Expecter) Update

func (_e *AccountRepository_Expecter) Update(ctx interface{}, id interface{}, update interface{}) *AccountRepository_Update_Call

Update is a helper method to define mock.On call

  • ctx context.Context
  • id uuid.UUID
  • update dto.AccountUpdate

type AccountRepository_Get_Call

type AccountRepository_Get_Call struct {
	*mock.Call
}

AccountRepository_Get_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'Get'

func (*AccountRepository_Get_Call) Return

func (*AccountRepository_Get_Call) Run

func (*AccountRepository_Get_Call) RunAndReturn

type AccountRepository_ListByUser_Call

type AccountRepository_ListByUser_Call struct {
	*mock.Call
}

AccountRepository_ListByUser_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'ListByUser'

func (*AccountRepository_ListByUser_Call) Return

func (*AccountRepository_ListByUser_Call) Run

func (*AccountRepository_ListByUser_Call) RunAndReturn

type AccountRepository_Update_Call

type AccountRepository_Update_Call struct {
	*mock.Call
}

AccountRepository_Update_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'Update'

func (*AccountRepository_Update_Call) Return

func (*AccountRepository_Update_Call) Run

func (*AccountRepository_Update_Call) RunAndReturn

type Bus

type Bus struct {
	mock.Mock
}

Bus is an autogenerated mock type for the Bus type

func NewBus

func NewBus(t interface {
	mock.TestingT
	Cleanup(func())
}) *Bus

NewBus creates a new instance of Bus. 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 (*Bus) EXPECT

func (_m *Bus) EXPECT() *Bus_Expecter

func (*Bus) Emit

func (_mock *Bus) Emit(ctx context.Context, event events.Event) error

Emit provides a mock function for the type Bus

func (*Bus) Register

func (_mock *Bus) Register(eventType events.EventType, handler eventbus.HandlerFunc)

Register provides a mock function for the type Bus

type Bus_Emit_Call

type Bus_Emit_Call struct {
	*mock.Call
}

Bus_Emit_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'Emit'

func (*Bus_Emit_Call) Return

func (_c *Bus_Emit_Call) Return(err error) *Bus_Emit_Call

func (*Bus_Emit_Call) Run

func (_c *Bus_Emit_Call) Run(run func(ctx context.Context, event events.Event)) *Bus_Emit_Call

func (*Bus_Emit_Call) RunAndReturn

func (_c *Bus_Emit_Call) RunAndReturn(run func(ctx context.Context, event events.Event) error) *Bus_Emit_Call

type Bus_Expecter

type Bus_Expecter struct {
	// contains filtered or unexported fields
}

func (*Bus_Expecter) Emit

func (_e *Bus_Expecter) Emit(ctx interface{}, event interface{}) *Bus_Emit_Call

Emit is a helper method to define mock.On call

  • ctx context.Context
  • event events.Event

func (*Bus_Expecter) Register

func (_e *Bus_Expecter) Register(eventType interface{}, handler interface{}) *Bus_Register_Call

Register is a helper method to define mock.On call

  • eventType events.EventType
  • handler eventbus.HandlerFunc

type Bus_Register_Call

type Bus_Register_Call struct {
	*mock.Call
}

Bus_Register_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'Register'

func (*Bus_Register_Call) Return

func (_c *Bus_Register_Call) Return() *Bus_Register_Call

func (*Bus_Register_Call) Run

func (_c *Bus_Register_Call) Run(run func(eventType events.EventType, handler eventbus.HandlerFunc)) *Bus_Register_Call

func (*Bus_Register_Call) RunAndReturn

func (_c *Bus_Register_Call) RunAndReturn(run func(eventType events.EventType, handler eventbus.HandlerFunc)) *Bus_Register_Call

type ExchangeRateProvider

type ExchangeRateProvider struct {
	mock.Mock
}

ExchangeRateProvider is an autogenerated mock type for the ExchangeRateProvider type

func NewExchangeRateProvider

func NewExchangeRateProvider(t interface {
	mock.TestingT
	Cleanup(func())
}) *ExchangeRateProvider

NewExchangeRateProvider creates a new instance of ExchangeRateProvider. 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 (*ExchangeRateProvider) EXPECT

func (*ExchangeRateProvider) GetRate

func (_mock *ExchangeRateProvider) GetRate(from string, to string) (*domain.ExchangeRate, error)

GetRate provides a mock function for the type ExchangeRateProvider

func (*ExchangeRateProvider) GetRates

func (_mock *ExchangeRateProvider) GetRates(from string, to []string) (map[string]*domain.ExchangeRate, error)

GetRates provides a mock function for the type ExchangeRateProvider

func (*ExchangeRateProvider) IsHealthy

func (_mock *ExchangeRateProvider) IsHealthy() bool

IsHealthy provides a mock function for the type ExchangeRateProvider

func (*ExchangeRateProvider) Name

func (_mock *ExchangeRateProvider) Name() string

Name provides a mock function for the type ExchangeRateProvider

type ExchangeRateProvider_Expecter

type ExchangeRateProvider_Expecter struct {
	// contains filtered or unexported fields
}

func (*ExchangeRateProvider_Expecter) GetRate

func (_e *ExchangeRateProvider_Expecter) GetRate(from interface{}, to interface{}) *ExchangeRateProvider_GetRate_Call

GetRate is a helper method to define mock.On call

  • from string
  • to string

func (*ExchangeRateProvider_Expecter) GetRates

func (_e *ExchangeRateProvider_Expecter) GetRates(from interface{}, to interface{}) *ExchangeRateProvider_GetRates_Call

GetRates is a helper method to define mock.On call

  • from string
  • to []string

func (*ExchangeRateProvider_Expecter) IsHealthy

IsHealthy is a helper method to define mock.On call

func (*ExchangeRateProvider_Expecter) Name

Name is a helper method to define mock.On call

type ExchangeRateProvider_GetRate_Call

type ExchangeRateProvider_GetRate_Call struct {
	*mock.Call
}

ExchangeRateProvider_GetRate_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'GetRate'

func (*ExchangeRateProvider_GetRate_Call) Return

func (*ExchangeRateProvider_GetRate_Call) Run

func (*ExchangeRateProvider_GetRate_Call) RunAndReturn

type ExchangeRateProvider_GetRates_Call

type ExchangeRateProvider_GetRates_Call struct {
	*mock.Call
}

ExchangeRateProvider_GetRates_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'GetRates'

func (*ExchangeRateProvider_GetRates_Call) Return

func (*ExchangeRateProvider_GetRates_Call) Run

func (*ExchangeRateProvider_GetRates_Call) RunAndReturn

type ExchangeRateProvider_IsHealthy_Call

type ExchangeRateProvider_IsHealthy_Call struct {
	*mock.Call
}

ExchangeRateProvider_IsHealthy_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'IsHealthy'

func (*ExchangeRateProvider_IsHealthy_Call) Return

func (*ExchangeRateProvider_IsHealthy_Call) Run

func (*ExchangeRateProvider_IsHealthy_Call) RunAndReturn

type ExchangeRateProvider_Name_Call

type ExchangeRateProvider_Name_Call struct {
	*mock.Call
}

ExchangeRateProvider_Name_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'Name'

func (*ExchangeRateProvider_Name_Call) Return

func (*ExchangeRateProvider_Name_Call) Run

func (*ExchangeRateProvider_Name_Call) RunAndReturn

type Strategy

type Strategy struct {
	mock.Mock
}

Strategy is an autogenerated mock type for the Strategy type

func NewStrategy

func NewStrategy(t interface {
	mock.TestingT
	Cleanup(func())
}) *Strategy

NewStrategy creates a new instance of Strategy. 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 (*Strategy) EXPECT

func (_m *Strategy) EXPECT() *Strategy_Expecter

func (*Strategy) GenerateToken

func (_mock *Strategy) GenerateToken(ctx context.Context, u *dto.UserRead) (string, error)

GenerateToken provides a mock function for the type Strategy

func (*Strategy) GetCurrentUserID

func (_mock *Strategy) GetCurrentUserID(ctx context.Context) (uuid.UUID, error)

GetCurrentUserID provides a mock function for the type Strategy

func (*Strategy) Login

func (_mock *Strategy) Login(ctx context.Context, identity string, password string) (*dto.UserRead, error)

Login provides a mock function for the type Strategy

type Strategy_Expecter

type Strategy_Expecter struct {
	// contains filtered or unexported fields
}

func (*Strategy_Expecter) GenerateToken

func (_e *Strategy_Expecter) GenerateToken(ctx interface{}, u interface{}) *Strategy_GenerateToken_Call

GenerateToken is a helper method to define mock.On call

  • ctx context.Context
  • u *dto.UserRead

func (*Strategy_Expecter) GetCurrentUserID

func (_e *Strategy_Expecter) GetCurrentUserID(ctx interface{}) *Strategy_GetCurrentUserID_Call

GetCurrentUserID is a helper method to define mock.On call

  • ctx context.Context

func (*Strategy_Expecter) Login

func (_e *Strategy_Expecter) Login(ctx interface{}, identity interface{}, password interface{}) *Strategy_Login_Call

Login is a helper method to define mock.On call

  • ctx context.Context
  • identity string
  • password string

type Strategy_GenerateToken_Call

type Strategy_GenerateToken_Call struct {
	*mock.Call
}

Strategy_GenerateToken_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'GenerateToken'

func (*Strategy_GenerateToken_Call) Return

func (*Strategy_GenerateToken_Call) Run

func (*Strategy_GenerateToken_Call) RunAndReturn

type Strategy_GetCurrentUserID_Call

type Strategy_GetCurrentUserID_Call struct {
	*mock.Call
}

Strategy_GetCurrentUserID_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'GetCurrentUserID'

func (*Strategy_GetCurrentUserID_Call) Return

func (*Strategy_GetCurrentUserID_Call) Run

func (*Strategy_GetCurrentUserID_Call) RunAndReturn

type Strategy_Login_Call

type Strategy_Login_Call struct {
	*mock.Call
}

Strategy_Login_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'Login'

func (*Strategy_Login_Call) Return

func (_c *Strategy_Login_Call) Return(userRead *dto.UserRead, err error) *Strategy_Login_Call

func (*Strategy_Login_Call) Run

func (_c *Strategy_Login_Call) Run(run func(ctx context.Context, identity string, password string)) *Strategy_Login_Call

func (*Strategy_Login_Call) RunAndReturn

func (_c *Strategy_Login_Call) RunAndReturn(run func(ctx context.Context, identity string, password string) (*dto.UserRead, error)) *Strategy_Login_Call

type TransactionRepository

type TransactionRepository struct {
	mock.Mock
}

TransactionRepository is an autogenerated mock type for the Repository type

func NewTransactionRepository

func NewTransactionRepository(t interface {
	mock.TestingT
	Cleanup(func())
}) *TransactionRepository

NewTransactionRepository creates a new instance of TransactionRepository. 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 (*TransactionRepository) Create

func (_mock *TransactionRepository) Create(ctx context.Context, create dto.TransactionCreate) error

Create provides a mock function for the type TransactionRepository

func (*TransactionRepository) EXPECT

func (*TransactionRepository) Get

Get provides a mock function for the type TransactionRepository

func (*TransactionRepository) GetByPaymentID

func (_mock *TransactionRepository) GetByPaymentID(ctx context.Context, paymentID string) (*dto.TransactionRead, error)

GetByPaymentID provides a mock function for the type TransactionRepository

func (*TransactionRepository) ListByAccount

func (_mock *TransactionRepository) ListByAccount(ctx context.Context, accountID uuid.UUID) ([]*dto.TransactionRead, error)

ListByAccount provides a mock function for the type TransactionRepository

func (*TransactionRepository) ListByUser

func (_mock *TransactionRepository) ListByUser(ctx context.Context, userID uuid.UUID) ([]*dto.TransactionRead, error)

ListByUser provides a mock function for the type TransactionRepository

func (*TransactionRepository) PartialUpdate

func (_mock *TransactionRepository) PartialUpdate(ctx context.Context, id uuid.UUID, update dto.TransactionUpdate) error

PartialUpdate provides a mock function for the type TransactionRepository

func (*TransactionRepository) Update

func (_mock *TransactionRepository) Update(ctx context.Context, id uuid.UUID, update dto.TransactionUpdate) error

Update provides a mock function for the type TransactionRepository

func (*TransactionRepository) UpsertByPaymentID

func (_mock *TransactionRepository) UpsertByPaymentID(ctx context.Context, paymentID string, create dto.TransactionCreate) error

UpsertByPaymentID provides a mock function for the type TransactionRepository

type TransactionRepository_Create_Call

type TransactionRepository_Create_Call struct {
	*mock.Call
}

TransactionRepository_Create_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'Create'

func (*TransactionRepository_Create_Call) Return

func (*TransactionRepository_Create_Call) Run

func (*TransactionRepository_Create_Call) RunAndReturn

type TransactionRepository_Expecter

type TransactionRepository_Expecter struct {
	// contains filtered or unexported fields
}

func (*TransactionRepository_Expecter) Create

func (_e *TransactionRepository_Expecter) Create(ctx interface{}, create interface{}) *TransactionRepository_Create_Call

Create is a helper method to define mock.On call

  • ctx context.Context
  • create dto.TransactionCreate

func (*TransactionRepository_Expecter) Get

func (_e *TransactionRepository_Expecter) Get(ctx interface{}, id interface{}) *TransactionRepository_Get_Call

Get is a helper method to define mock.On call

  • ctx context.Context
  • id uuid.UUID

func (*TransactionRepository_Expecter) GetByPaymentID

func (_e *TransactionRepository_Expecter) GetByPaymentID(ctx interface{}, paymentID interface{}) *TransactionRepository_GetByPaymentID_Call

GetByPaymentID is a helper method to define mock.On call

  • ctx context.Context
  • paymentID string

func (*TransactionRepository_Expecter) ListByAccount

func (_e *TransactionRepository_Expecter) ListByAccount(ctx interface{}, accountID interface{}) *TransactionRepository_ListByAccount_Call

ListByAccount is a helper method to define mock.On call

  • ctx context.Context
  • accountID uuid.UUID

func (*TransactionRepository_Expecter) ListByUser

func (_e *TransactionRepository_Expecter) ListByUser(ctx interface{}, userID interface{}) *TransactionRepository_ListByUser_Call

ListByUser is a helper method to define mock.On call

  • ctx context.Context
  • userID uuid.UUID

func (*TransactionRepository_Expecter) PartialUpdate

func (_e *TransactionRepository_Expecter) PartialUpdate(ctx interface{}, id interface{}, update interface{}) *TransactionRepository_PartialUpdate_Call

PartialUpdate is a helper method to define mock.On call

  • ctx context.Context
  • id uuid.UUID
  • update dto.TransactionUpdate

func (*TransactionRepository_Expecter) Update

func (_e *TransactionRepository_Expecter) Update(ctx interface{}, id interface{}, update interface{}) *TransactionRepository_Update_Call

Update is a helper method to define mock.On call

  • ctx context.Context
  • id uuid.UUID
  • update dto.TransactionUpdate

func (*TransactionRepository_Expecter) UpsertByPaymentID

func (_e *TransactionRepository_Expecter) UpsertByPaymentID(ctx interface{}, paymentID interface{}, create interface{}) *TransactionRepository_UpsertByPaymentID_Call

UpsertByPaymentID is a helper method to define mock.On call

  • ctx context.Context
  • paymentID string
  • create dto.TransactionCreate

type TransactionRepository_GetByPaymentID_Call

type TransactionRepository_GetByPaymentID_Call struct {
	*mock.Call
}

TransactionRepository_GetByPaymentID_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'GetByPaymentID'

func (*TransactionRepository_GetByPaymentID_Call) Return

func (*TransactionRepository_GetByPaymentID_Call) Run

func (*TransactionRepository_GetByPaymentID_Call) RunAndReturn

type TransactionRepository_Get_Call

type TransactionRepository_Get_Call struct {
	*mock.Call
}

TransactionRepository_Get_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'Get'

func (*TransactionRepository_Get_Call) Return

func (*TransactionRepository_Get_Call) Run

func (*TransactionRepository_Get_Call) RunAndReturn

type TransactionRepository_ListByAccount_Call

type TransactionRepository_ListByAccount_Call struct {
	*mock.Call
}

TransactionRepository_ListByAccount_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'ListByAccount'

func (*TransactionRepository_ListByAccount_Call) Return

func (*TransactionRepository_ListByAccount_Call) Run

func (*TransactionRepository_ListByAccount_Call) RunAndReturn

type TransactionRepository_ListByUser_Call

type TransactionRepository_ListByUser_Call struct {
	*mock.Call
}

TransactionRepository_ListByUser_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'ListByUser'

func (*TransactionRepository_ListByUser_Call) Return

func (*TransactionRepository_ListByUser_Call) Run

func (*TransactionRepository_ListByUser_Call) RunAndReturn

type TransactionRepository_PartialUpdate_Call

type TransactionRepository_PartialUpdate_Call struct {
	*mock.Call
}

TransactionRepository_PartialUpdate_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'PartialUpdate'

func (*TransactionRepository_PartialUpdate_Call) Return

func (*TransactionRepository_PartialUpdate_Call) Run

func (*TransactionRepository_PartialUpdate_Call) RunAndReturn

type TransactionRepository_Update_Call

type TransactionRepository_Update_Call struct {
	*mock.Call
}

TransactionRepository_Update_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'Update'

func (*TransactionRepository_Update_Call) Return

func (*TransactionRepository_Update_Call) Run

func (*TransactionRepository_Update_Call) RunAndReturn

type TransactionRepository_UpsertByPaymentID_Call

type TransactionRepository_UpsertByPaymentID_Call struct {
	*mock.Call
}

TransactionRepository_UpsertByPaymentID_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'UpsertByPaymentID'

func (*TransactionRepository_UpsertByPaymentID_Call) Return

func (*TransactionRepository_UpsertByPaymentID_Call) Run

func (*TransactionRepository_UpsertByPaymentID_Call) RunAndReturn

type UnitOfWork

type UnitOfWork struct {
	mock.Mock
}

UnitOfWork is an autogenerated mock type for the UnitOfWork type

func NewUnitOfWork

func NewUnitOfWork(t interface {
	mock.TestingT
	Cleanup(func())
}) *UnitOfWork

NewUnitOfWork creates a new instance of UnitOfWork. 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 (*UnitOfWork) Do

func (_mock *UnitOfWork) Do(ctx context.Context, fn func(uow repository.UnitOfWork) error) error

Do provides a mock function for the type UnitOfWork

func (*UnitOfWork) EXPECT

func (_m *UnitOfWork) EXPECT() *UnitOfWork_Expecter

func (*UnitOfWork) GetRepository

func (_mock *UnitOfWork) GetRepository(repoType any) (any, error)

GetRepository provides a mock function for the type UnitOfWork

type UnitOfWork_Do_Call

type UnitOfWork_Do_Call struct {
	*mock.Call
}

UnitOfWork_Do_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'Do'

func (*UnitOfWork_Do_Call) Return

func (_c *UnitOfWork_Do_Call) Return(err error) *UnitOfWork_Do_Call

func (*UnitOfWork_Do_Call) Run

func (_c *UnitOfWork_Do_Call) Run(run func(ctx context.Context, fn func(uow repository.UnitOfWork) error)) *UnitOfWork_Do_Call

func (*UnitOfWork_Do_Call) RunAndReturn

func (_c *UnitOfWork_Do_Call) RunAndReturn(run func(ctx context.Context, fn func(uow repository.UnitOfWork) error) error) *UnitOfWork_Do_Call

type UnitOfWork_Expecter

type UnitOfWork_Expecter struct {
	// contains filtered or unexported fields
}

func (*UnitOfWork_Expecter) Do

func (_e *UnitOfWork_Expecter) Do(ctx interface{}, fn interface{}) *UnitOfWork_Do_Call

Do is a helper method to define mock.On call

  • ctx context.Context
  • fn func(uow repository.UnitOfWork) error

func (*UnitOfWork_Expecter) GetRepository

func (_e *UnitOfWork_Expecter) GetRepository(repoType interface{}) *UnitOfWork_GetRepository_Call

GetRepository is a helper method to define mock.On call

  • repoType any

type UnitOfWork_GetRepository_Call

type UnitOfWork_GetRepository_Call struct {
	*mock.Call
}

UnitOfWork_GetRepository_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'GetRepository'

func (*UnitOfWork_GetRepository_Call) Return

func (*UnitOfWork_GetRepository_Call) Run

func (*UnitOfWork_GetRepository_Call) RunAndReturn

func (_c *UnitOfWork_GetRepository_Call) RunAndReturn(run func(repoType any) (any, error)) *UnitOfWork_GetRepository_Call

type UserRepository

type UserRepository struct {
	mock.Mock
}

UserRepository is an autogenerated mock type for the Repository type

func NewUserRepository

func NewUserRepository(t interface {
	mock.TestingT
	Cleanup(func())
}) *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. The first argument is typically a *testing.T value.

func (*UserRepository) Create

func (_mock *UserRepository) Create(ctx context.Context, create *dto.UserCreate) error

Create provides a mock function for the type UserRepository

func (*UserRepository) Delete

func (_mock *UserRepository) Delete(ctx context.Context, id uuid.UUID) error

Delete provides a mock function for the type UserRepository

func (*UserRepository) EXPECT

func (*UserRepository) Exists

func (_mock *UserRepository) Exists(ctx context.Context, id uuid.UUID) (bool, error)

Exists provides a mock function for the type UserRepository

func (*UserRepository) ExistsByEmail

func (_mock *UserRepository) ExistsByEmail(ctx context.Context, email string) (bool, error)

ExistsByEmail provides a mock function for the type UserRepository

func (*UserRepository) ExistsByUsername

func (_mock *UserRepository) ExistsByUsername(ctx context.Context, username string) (bool, error)

ExistsByUsername provides a mock function for the type UserRepository

func (*UserRepository) Get

func (_mock *UserRepository) Get(ctx context.Context, id uuid.UUID) (*dto.UserRead, error)

Get provides a mock function for the type UserRepository

func (*UserRepository) GetByEmail

func (_mock *UserRepository) GetByEmail(ctx context.Context, email string) (*dto.UserRead, error)

GetByEmail provides a mock function for the type UserRepository

func (*UserRepository) GetByUsername

func (_mock *UserRepository) GetByUsername(ctx context.Context, username string) (*dto.UserRead, error)

GetByUsername provides a mock function for the type UserRepository

func (*UserRepository) List

func (_mock *UserRepository) List(ctx context.Context, page int, pageSize int) ([]*dto.UserRead, error)

List provides a mock function for the type UserRepository

func (*UserRepository) Update

func (_mock *UserRepository) Update(ctx context.Context, id uuid.UUID, update *dto.UserUpdate) error

Update provides a mock function for the type UserRepository

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

func (*UserRepository_Create_Call) RunAndReturn

func (_c *UserRepository_Create_Call) RunAndReturn(run func(ctx context.Context, create *dto.UserCreate) error) *UserRepository_Create_Call

type UserRepository_Delete_Call

type UserRepository_Delete_Call struct {
	*mock.Call
}

UserRepository_Delete_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'Delete'

func (*UserRepository_Delete_Call) Return

func (*UserRepository_Delete_Call) Run

func (*UserRepository_Delete_Call) RunAndReturn

type UserRepository_ExistsByEmail_Call

type UserRepository_ExistsByEmail_Call struct {
	*mock.Call
}

UserRepository_ExistsByEmail_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'ExistsByEmail'

func (*UserRepository_ExistsByEmail_Call) Return

func (*UserRepository_ExistsByEmail_Call) Run

func (*UserRepository_ExistsByEmail_Call) RunAndReturn

type UserRepository_ExistsByUsername_Call

type UserRepository_ExistsByUsername_Call struct {
	*mock.Call
}

UserRepository_ExistsByUsername_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'ExistsByUsername'

func (*UserRepository_ExistsByUsername_Call) Return

func (*UserRepository_ExistsByUsername_Call) Run

func (*UserRepository_ExistsByUsername_Call) RunAndReturn

type UserRepository_Exists_Call

type UserRepository_Exists_Call struct {
	*mock.Call
}

UserRepository_Exists_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'Exists'

func (*UserRepository_Exists_Call) Return

func (*UserRepository_Exists_Call) Run

func (*UserRepository_Exists_Call) RunAndReturn

func (_c *UserRepository_Exists_Call) RunAndReturn(run func(ctx context.Context, id uuid.UUID) (bool, error)) *UserRepository_Exists_Call

type UserRepository_Expecter

type UserRepository_Expecter struct {
	// contains filtered or unexported fields
}

func (*UserRepository_Expecter) Create

func (_e *UserRepository_Expecter) Create(ctx interface{}, create interface{}) *UserRepository_Create_Call

Create is a helper method to define mock.On call

  • ctx context.Context
  • create *dto.UserCreate

func (*UserRepository_Expecter) Delete

func (_e *UserRepository_Expecter) Delete(ctx interface{}, id interface{}) *UserRepository_Delete_Call

Delete is a helper method to define mock.On call

  • ctx context.Context
  • id uuid.UUID

func (*UserRepository_Expecter) Exists

func (_e *UserRepository_Expecter) Exists(ctx interface{}, id interface{}) *UserRepository_Exists_Call

Exists is a helper method to define mock.On call

  • ctx context.Context
  • id uuid.UUID

func (*UserRepository_Expecter) ExistsByEmail

func (_e *UserRepository_Expecter) ExistsByEmail(ctx interface{}, email interface{}) *UserRepository_ExistsByEmail_Call

ExistsByEmail is a helper method to define mock.On call

  • ctx context.Context
  • email string

func (*UserRepository_Expecter) ExistsByUsername

func (_e *UserRepository_Expecter) ExistsByUsername(ctx interface{}, username interface{}) *UserRepository_ExistsByUsername_Call

ExistsByUsername is a helper method to define mock.On call

  • ctx context.Context
  • username string

func (*UserRepository_Expecter) Get

func (_e *UserRepository_Expecter) Get(ctx interface{}, id interface{}) *UserRepository_Get_Call

Get is a helper method to define mock.On call

  • ctx context.Context
  • id uuid.UUID

func (*UserRepository_Expecter) GetByEmail

func (_e *UserRepository_Expecter) GetByEmail(ctx interface{}, email interface{}) *UserRepository_GetByEmail_Call

GetByEmail is a helper method to define mock.On call

  • ctx context.Context
  • email string

func (*UserRepository_Expecter) GetByUsername

func (_e *UserRepository_Expecter) GetByUsername(ctx interface{}, username interface{}) *UserRepository_GetByUsername_Call

GetByUsername is a helper method to define mock.On call

  • ctx context.Context
  • username string

func (*UserRepository_Expecter) List

func (_e *UserRepository_Expecter) List(ctx interface{}, page interface{}, pageSize interface{}) *UserRepository_List_Call

List is a helper method to define mock.On call

  • ctx context.Context
  • page int
  • pageSize int

func (*UserRepository_Expecter) Update

func (_e *UserRepository_Expecter) Update(ctx interface{}, id interface{}, update interface{}) *UserRepository_Update_Call

Update is a helper method to define mock.On call

  • ctx context.Context
  • id uuid.UUID
  • update *dto.UserUpdate

type UserRepository_GetByEmail_Call

type UserRepository_GetByEmail_Call struct {
	*mock.Call
}

UserRepository_GetByEmail_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'GetByEmail'

func (*UserRepository_GetByEmail_Call) Return

func (*UserRepository_GetByEmail_Call) Run

func (*UserRepository_GetByEmail_Call) RunAndReturn

type UserRepository_GetByUsername_Call

type UserRepository_GetByUsername_Call struct {
	*mock.Call
}

UserRepository_GetByUsername_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'GetByUsername'

func (*UserRepository_GetByUsername_Call) Return

func (*UserRepository_GetByUsername_Call) Run

func (*UserRepository_GetByUsername_Call) RunAndReturn

type UserRepository_Get_Call

type UserRepository_Get_Call struct {
	*mock.Call
}

UserRepository_Get_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'Get'

func (*UserRepository_Get_Call) Return

func (*UserRepository_Get_Call) Run

func (*UserRepository_Get_Call) RunAndReturn

func (_c *UserRepository_Get_Call) RunAndReturn(run func(ctx context.Context, id uuid.UUID) (*dto.UserRead, error)) *UserRepository_Get_Call

type UserRepository_List_Call

type UserRepository_List_Call struct {
	*mock.Call
}

UserRepository_List_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'List'

func (*UserRepository_List_Call) Return

func (_c *UserRepository_List_Call) Return(userReads []*dto.UserRead, err error) *UserRepository_List_Call

func (*UserRepository_List_Call) Run

func (_c *UserRepository_List_Call) Run(run func(ctx context.Context, page int, pageSize int)) *UserRepository_List_Call

func (*UserRepository_List_Call) RunAndReturn

func (_c *UserRepository_List_Call) RunAndReturn(run func(ctx context.Context, page int, pageSize int) ([]*dto.UserRead, error)) *UserRepository_List_Call

type UserRepository_Update_Call

type UserRepository_Update_Call struct {
	*mock.Call
}

UserRepository_Update_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'Update'

func (*UserRepository_Update_Call) Return

func (*UserRepository_Update_Call) Run

func (*UserRepository_Update_Call) RunAndReturn

func (_c *UserRepository_Update_Call) RunAndReturn(run func(ctx context.Context, id uuid.UUID, update *dto.UserUpdate) error) *UserRepository_Update_Call

Jump to

Keyboard shortcuts

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