Documentation ¶
Index ¶
- type TransactionRepository
- func (_m *TransactionRepository) CreateEntry(ctx context.Context, debit credit.Transaction, _a2 credit.Transaction) ([]credit.Transaction, error)
- func (_m *TransactionRepository) EXPECT() *TransactionRepository_Expecter
- func (_m *TransactionRepository) GetBalance(ctx context.Context, id string) (int64, error)
- func (_m *TransactionRepository) GetByID(ctx context.Context, id string) (credit.Transaction, error)
- func (_m *TransactionRepository) List(ctx context.Context, flt credit.Filter) ([]credit.Transaction, error)
- type TransactionRepository_CreateEntry_Call
- func (_c *TransactionRepository_CreateEntry_Call) Return(_a0 []credit.Transaction, _a1 error) *TransactionRepository_CreateEntry_Call
- func (_c *TransactionRepository_CreateEntry_Call) Run(...) *TransactionRepository_CreateEntry_Call
- func (_c *TransactionRepository_CreateEntry_Call) RunAndReturn(...) *TransactionRepository_CreateEntry_Call
- type TransactionRepository_Expecter
- func (_e *TransactionRepository_Expecter) CreateEntry(ctx interface{}, debit interface{}, _a2 interface{}) *TransactionRepository_CreateEntry_Call
- func (_e *TransactionRepository_Expecter) GetBalance(ctx interface{}, id interface{}) *TransactionRepository_GetBalance_Call
- func (_e *TransactionRepository_Expecter) GetByID(ctx interface{}, id interface{}) *TransactionRepository_GetByID_Call
- func (_e *TransactionRepository_Expecter) List(ctx interface{}, flt interface{}) *TransactionRepository_List_Call
- type TransactionRepository_GetBalance_Call
- func (_c *TransactionRepository_GetBalance_Call) Return(_a0 int64, _a1 error) *TransactionRepository_GetBalance_Call
- func (_c *TransactionRepository_GetBalance_Call) Run(run func(ctx context.Context, id string)) *TransactionRepository_GetBalance_Call
- func (_c *TransactionRepository_GetBalance_Call) RunAndReturn(run func(context.Context, string) (int64, error)) *TransactionRepository_GetBalance_Call
- type TransactionRepository_GetByID_Call
- func (_c *TransactionRepository_GetByID_Call) Return(_a0 credit.Transaction, _a1 error) *TransactionRepository_GetByID_Call
- func (_c *TransactionRepository_GetByID_Call) Run(run func(ctx context.Context, id string)) *TransactionRepository_GetByID_Call
- func (_c *TransactionRepository_GetByID_Call) RunAndReturn(run func(context.Context, string) (credit.Transaction, error)) *TransactionRepository_GetByID_Call
- type TransactionRepository_List_Call
- func (_c *TransactionRepository_List_Call) Return(_a0 []credit.Transaction, _a1 error) *TransactionRepository_List_Call
- func (_c *TransactionRepository_List_Call) Run(run func(ctx context.Context, flt credit.Filter)) *TransactionRepository_List_Call
- func (_c *TransactionRepository_List_Call) RunAndReturn(run func(context.Context, credit.Filter) ([]credit.Transaction, error)) *TransactionRepository_List_Call
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type TransactionRepository ¶
TransactionRepository is an autogenerated mock type for the TransactionRepository 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) CreateEntry ¶
func (_m *TransactionRepository) CreateEntry(ctx context.Context, debit credit.Transaction, _a2 credit.Transaction) ([]credit.Transaction, error)
CreateEntry provides a mock function with given fields: ctx, debit, _a2
func (*TransactionRepository) EXPECT ¶
func (_m *TransactionRepository) EXPECT() *TransactionRepository_Expecter
func (*TransactionRepository) GetBalance ¶
GetBalance provides a mock function with given fields: ctx, id
func (*TransactionRepository) GetByID ¶
func (_m *TransactionRepository) GetByID(ctx context.Context, id string) (credit.Transaction, error)
GetByID provides a mock function with given fields: ctx, id
func (*TransactionRepository) List ¶
func (_m *TransactionRepository) List(ctx context.Context, flt credit.Filter) ([]credit.Transaction, error)
List provides a mock function with given fields: ctx, flt
type TransactionRepository_CreateEntry_Call ¶
TransactionRepository_CreateEntry_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'CreateEntry'
func (*TransactionRepository_CreateEntry_Call) Return ¶
func (_c *TransactionRepository_CreateEntry_Call) Return(_a0 []credit.Transaction, _a1 error) *TransactionRepository_CreateEntry_Call
func (*TransactionRepository_CreateEntry_Call) Run ¶
func (_c *TransactionRepository_CreateEntry_Call) Run(run func(ctx context.Context, debit credit.Transaction, _a2 credit.Transaction)) *TransactionRepository_CreateEntry_Call
func (*TransactionRepository_CreateEntry_Call) RunAndReturn ¶
func (_c *TransactionRepository_CreateEntry_Call) RunAndReturn(run func(context.Context, credit.Transaction, credit.Transaction) ([]credit.Transaction, error)) *TransactionRepository_CreateEntry_Call
type TransactionRepository_Expecter ¶
type TransactionRepository_Expecter struct {
// contains filtered or unexported fields
}
func (*TransactionRepository_Expecter) CreateEntry ¶
func (_e *TransactionRepository_Expecter) CreateEntry(ctx interface{}, debit interface{}, _a2 interface{}) *TransactionRepository_CreateEntry_Call
CreateEntry is a helper method to define mock.On call
- ctx context.Context
- debit credit.Transaction
- _a2 credit.Transaction
func (*TransactionRepository_Expecter) GetBalance ¶
func (_e *TransactionRepository_Expecter) GetBalance(ctx interface{}, id interface{}) *TransactionRepository_GetBalance_Call
GetBalance is a helper method to define mock.On call
- ctx context.Context
- id string
func (*TransactionRepository_Expecter) GetByID ¶
func (_e *TransactionRepository_Expecter) GetByID(ctx interface{}, id interface{}) *TransactionRepository_GetByID_Call
GetByID is a helper method to define mock.On call
- ctx context.Context
- id string
func (*TransactionRepository_Expecter) List ¶
func (_e *TransactionRepository_Expecter) List(ctx interface{}, flt interface{}) *TransactionRepository_List_Call
List is a helper method to define mock.On call
- ctx context.Context
- flt credit.Filter
type TransactionRepository_GetBalance_Call ¶
TransactionRepository_GetBalance_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'GetBalance'
func (*TransactionRepository_GetBalance_Call) Return ¶
func (_c *TransactionRepository_GetBalance_Call) Return(_a0 int64, _a1 error) *TransactionRepository_GetBalance_Call
func (*TransactionRepository_GetBalance_Call) Run ¶
func (_c *TransactionRepository_GetBalance_Call) Run(run func(ctx context.Context, id string)) *TransactionRepository_GetBalance_Call
func (*TransactionRepository_GetBalance_Call) RunAndReturn ¶
func (_c *TransactionRepository_GetBalance_Call) RunAndReturn(run func(context.Context, string) (int64, error)) *TransactionRepository_GetBalance_Call
type TransactionRepository_GetByID_Call ¶
TransactionRepository_GetByID_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'GetByID'
func (*TransactionRepository_GetByID_Call) Return ¶
func (_c *TransactionRepository_GetByID_Call) Return(_a0 credit.Transaction, _a1 error) *TransactionRepository_GetByID_Call
func (*TransactionRepository_GetByID_Call) Run ¶
func (_c *TransactionRepository_GetByID_Call) Run(run func(ctx context.Context, id string)) *TransactionRepository_GetByID_Call
func (*TransactionRepository_GetByID_Call) RunAndReturn ¶
func (_c *TransactionRepository_GetByID_Call) RunAndReturn(run func(context.Context, string) (credit.Transaction, error)) *TransactionRepository_GetByID_Call
type TransactionRepository_List_Call ¶
TransactionRepository_List_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'List'
func (*TransactionRepository_List_Call) Return ¶
func (_c *TransactionRepository_List_Call) Return(_a0 []credit.Transaction, _a1 error) *TransactionRepository_List_Call
func (*TransactionRepository_List_Call) Run ¶
func (_c *TransactionRepository_List_Call) Run(run func(ctx context.Context, flt credit.Filter)) *TransactionRepository_List_Call
func (*TransactionRepository_List_Call) RunAndReturn ¶
func (_c *TransactionRepository_List_Call) RunAndReturn(run func(context.Context, credit.Filter) ([]credit.Transaction, error)) *TransactionRepository_List_Call