Documentation ¶
Index ¶
- type CreditService
- type CreditService_Expecter
- type CreditService_GetBalance_Call
- func (_c *CreditService_GetBalance_Call) Return(_a0 int64, _a1 error) *CreditService_GetBalance_Call
- func (_c *CreditService_GetBalance_Call) Run(run func(ctx context.Context, id string)) *CreditService_GetBalance_Call
- func (_c *CreditService_GetBalance_Call) RunAndReturn(run func(context.Context, string) (int64, error)) *CreditService_GetBalance_Call
- type Repository
- func (_m *Repository) Create(ctx context.Context, _a1 customer.Customer) (customer.Customer, error)
- func (_m *Repository) Delete(ctx context.Context, id string) error
- func (_m *Repository) EXPECT() *Repository_Expecter
- func (_m *Repository) GetByID(ctx context.Context, id string) (customer.Customer, error)
- func (_m *Repository) List(ctx context.Context, filter customer.Filter) ([]customer.Customer, error)
- func (_m *Repository) UpdateByID(ctx context.Context, _a1 customer.Customer) (customer.Customer, error)
- func (_m *Repository) UpdateCreditMinByID(ctx context.Context, customerID string, limit int64) (customer.Customer, error)
- type Repository_Create_Call
- func (_c *Repository_Create_Call) Return(_a0 customer.Customer, _a1 error) *Repository_Create_Call
- func (_c *Repository_Create_Call) Run(run func(ctx context.Context, _a1 customer.Customer)) *Repository_Create_Call
- func (_c *Repository_Create_Call) RunAndReturn(run func(context.Context, customer.Customer) (customer.Customer, error)) *Repository_Create_Call
- type Repository_Delete_Call
- type Repository_Expecter
- func (_e *Repository_Expecter) Create(ctx interface{}, _a1 interface{}) *Repository_Create_Call
- func (_e *Repository_Expecter) Delete(ctx interface{}, id interface{}) *Repository_Delete_Call
- func (_e *Repository_Expecter) GetByID(ctx interface{}, id interface{}) *Repository_GetByID_Call
- func (_e *Repository_Expecter) List(ctx interface{}, filter interface{}) *Repository_List_Call
- func (_e *Repository_Expecter) UpdateByID(ctx interface{}, _a1 interface{}) *Repository_UpdateByID_Call
- func (_e *Repository_Expecter) UpdateCreditMinByID(ctx interface{}, customerID interface{}, limit interface{}) *Repository_UpdateCreditMinByID_Call
- type Repository_GetByID_Call
- func (_c *Repository_GetByID_Call) Return(_a0 customer.Customer, _a1 error) *Repository_GetByID_Call
- func (_c *Repository_GetByID_Call) Run(run func(ctx context.Context, id string)) *Repository_GetByID_Call
- func (_c *Repository_GetByID_Call) RunAndReturn(run func(context.Context, string) (customer.Customer, error)) *Repository_GetByID_Call
- type Repository_List_Call
- func (_c *Repository_List_Call) Return(_a0 []customer.Customer, _a1 error) *Repository_List_Call
- func (_c *Repository_List_Call) Run(run func(ctx context.Context, filter customer.Filter)) *Repository_List_Call
- func (_c *Repository_List_Call) RunAndReturn(run func(context.Context, customer.Filter) ([]customer.Customer, error)) *Repository_List_Call
- type Repository_UpdateByID_Call
- func (_c *Repository_UpdateByID_Call) Return(_a0 customer.Customer, _a1 error) *Repository_UpdateByID_Call
- func (_c *Repository_UpdateByID_Call) Run(run func(ctx context.Context, _a1 customer.Customer)) *Repository_UpdateByID_Call
- func (_c *Repository_UpdateByID_Call) RunAndReturn(run func(context.Context, customer.Customer) (customer.Customer, error)) *Repository_UpdateByID_Call
- type Repository_UpdateCreditMinByID_Call
- func (_c *Repository_UpdateCreditMinByID_Call) Return(_a0 customer.Customer, _a1 error) *Repository_UpdateCreditMinByID_Call
- func (_c *Repository_UpdateCreditMinByID_Call) Run(run func(ctx context.Context, customerID string, limit int64)) *Repository_UpdateCreditMinByID_Call
- func (_c *Repository_UpdateCreditMinByID_Call) RunAndReturn(run func(context.Context, string, int64) (customer.Customer, error)) *Repository_UpdateCreditMinByID_Call
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type CreditService ¶ added in v0.34.0
CreditService is an autogenerated mock type for the CreditService type
func NewCreditService ¶ added in v0.34.0
func NewCreditService(t interface { mock.TestingT Cleanup(func()) }) *CreditService
NewCreditService creates a new instance of CreditService. 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 (*CreditService) EXPECT ¶ added in v0.34.0
func (_m *CreditService) EXPECT() *CreditService_Expecter
func (*CreditService) GetBalance ¶ added in v0.34.0
GetBalance provides a mock function with given fields: ctx, id
type CreditService_Expecter ¶ added in v0.34.0
type CreditService_Expecter struct {
// contains filtered or unexported fields
}
func (*CreditService_Expecter) GetBalance ¶ added in v0.34.0
func (_e *CreditService_Expecter) GetBalance(ctx interface{}, id interface{}) *CreditService_GetBalance_Call
GetBalance is a helper method to define mock.On call
- ctx context.Context
- id string
type CreditService_GetBalance_Call ¶ added in v0.34.0
CreditService_GetBalance_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'GetBalance'
func (*CreditService_GetBalance_Call) Return ¶ added in v0.34.0
func (_c *CreditService_GetBalance_Call) Return(_a0 int64, _a1 error) *CreditService_GetBalance_Call
func (*CreditService_GetBalance_Call) Run ¶ added in v0.34.0
func (_c *CreditService_GetBalance_Call) Run(run func(ctx context.Context, id string)) *CreditService_GetBalance_Call
func (*CreditService_GetBalance_Call) RunAndReturn ¶ added in v0.34.0
func (_c *CreditService_GetBalance_Call) RunAndReturn(run func(context.Context, string) (int64, error)) *CreditService_GetBalance_Call
type Repository ¶
Repository is an autogenerated mock type for the Repository type
func NewRepository ¶
func NewRepository(t interface { mock.TestingT Cleanup(func()) }) *Repository
NewRepository creates a new instance of Repository. 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 (*Repository) Delete ¶
func (_m *Repository) Delete(ctx context.Context, id string) error
Delete provides a mock function with given fields: ctx, id
func (*Repository) EXPECT ¶
func (_m *Repository) EXPECT() *Repository_Expecter
func (*Repository) List ¶
func (_m *Repository) List(ctx context.Context, filter customer.Filter) ([]customer.Customer, error)
List provides a mock function with given fields: ctx, filter
func (*Repository) UpdateByID ¶
func (_m *Repository) UpdateByID(ctx context.Context, _a1 customer.Customer) (customer.Customer, error)
UpdateByID provides a mock function with given fields: ctx, _a1
func (*Repository) UpdateCreditMinByID ¶ added in v0.34.0
func (_m *Repository) UpdateCreditMinByID(ctx context.Context, customerID string, limit int64) (customer.Customer, error)
UpdateCreditMinByID provides a mock function with given fields: ctx, customerID, limit
type Repository_Create_Call ¶
Repository_Create_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'Create'
func (*Repository_Create_Call) Return ¶
func (_c *Repository_Create_Call) Return(_a0 customer.Customer, _a1 error) *Repository_Create_Call
func (*Repository_Create_Call) Run ¶
func (_c *Repository_Create_Call) Run(run func(ctx context.Context, _a1 customer.Customer)) *Repository_Create_Call
func (*Repository_Create_Call) RunAndReturn ¶
func (_c *Repository_Create_Call) RunAndReturn(run func(context.Context, customer.Customer) (customer.Customer, error)) *Repository_Create_Call
type Repository_Delete_Call ¶
Repository_Delete_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'Delete'
func (*Repository_Delete_Call) Return ¶
func (_c *Repository_Delete_Call) Return(_a0 error) *Repository_Delete_Call
func (*Repository_Delete_Call) Run ¶
func (_c *Repository_Delete_Call) Run(run func(ctx context.Context, id string)) *Repository_Delete_Call
func (*Repository_Delete_Call) RunAndReturn ¶
func (_c *Repository_Delete_Call) RunAndReturn(run func(context.Context, string) error) *Repository_Delete_Call
type Repository_Expecter ¶
type Repository_Expecter struct {
// contains filtered or unexported fields
}
func (*Repository_Expecter) Create ¶
func (_e *Repository_Expecter) Create(ctx interface{}, _a1 interface{}) *Repository_Create_Call
Create is a helper method to define mock.On call
- ctx context.Context
- _a1 customer.Customer
func (*Repository_Expecter) Delete ¶
func (_e *Repository_Expecter) Delete(ctx interface{}, id interface{}) *Repository_Delete_Call
Delete is a helper method to define mock.On call
- ctx context.Context
- id string
func (*Repository_Expecter) GetByID ¶
func (_e *Repository_Expecter) GetByID(ctx interface{}, id interface{}) *Repository_GetByID_Call
GetByID is a helper method to define mock.On call
- ctx context.Context
- id string
func (*Repository_Expecter) List ¶
func (_e *Repository_Expecter) List(ctx interface{}, filter interface{}) *Repository_List_Call
List is a helper method to define mock.On call
- ctx context.Context
- filter customer.Filter
func (*Repository_Expecter) UpdateByID ¶
func (_e *Repository_Expecter) UpdateByID(ctx interface{}, _a1 interface{}) *Repository_UpdateByID_Call
UpdateByID is a helper method to define mock.On call
- ctx context.Context
- _a1 customer.Customer
func (*Repository_Expecter) UpdateCreditMinByID ¶ added in v0.34.0
func (_e *Repository_Expecter) UpdateCreditMinByID(ctx interface{}, customerID interface{}, limit interface{}) *Repository_UpdateCreditMinByID_Call
UpdateCreditMinByID is a helper method to define mock.On call
- ctx context.Context
- customerID string
- limit int64
type Repository_GetByID_Call ¶
Repository_GetByID_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'GetByID'
func (*Repository_GetByID_Call) Return ¶
func (_c *Repository_GetByID_Call) Return(_a0 customer.Customer, _a1 error) *Repository_GetByID_Call
func (*Repository_GetByID_Call) Run ¶
func (_c *Repository_GetByID_Call) Run(run func(ctx context.Context, id string)) *Repository_GetByID_Call
func (*Repository_GetByID_Call) RunAndReturn ¶
func (_c *Repository_GetByID_Call) RunAndReturn(run func(context.Context, string) (customer.Customer, error)) *Repository_GetByID_Call
type Repository_List_Call ¶
Repository_List_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'List'
func (*Repository_List_Call) Return ¶
func (_c *Repository_List_Call) Return(_a0 []customer.Customer, _a1 error) *Repository_List_Call
func (*Repository_List_Call) Run ¶
func (_c *Repository_List_Call) Run(run func(ctx context.Context, filter customer.Filter)) *Repository_List_Call
func (*Repository_List_Call) RunAndReturn ¶
func (_c *Repository_List_Call) RunAndReturn(run func(context.Context, customer.Filter) ([]customer.Customer, error)) *Repository_List_Call
type Repository_UpdateByID_Call ¶
Repository_UpdateByID_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'UpdateByID'
func (*Repository_UpdateByID_Call) Return ¶
func (_c *Repository_UpdateByID_Call) Return(_a0 customer.Customer, _a1 error) *Repository_UpdateByID_Call
func (*Repository_UpdateByID_Call) Run ¶
func (_c *Repository_UpdateByID_Call) Run(run func(ctx context.Context, _a1 customer.Customer)) *Repository_UpdateByID_Call
func (*Repository_UpdateByID_Call) RunAndReturn ¶
func (_c *Repository_UpdateByID_Call) RunAndReturn(run func(context.Context, customer.Customer) (customer.Customer, error)) *Repository_UpdateByID_Call
type Repository_UpdateCreditMinByID_Call ¶ added in v0.34.0
Repository_UpdateCreditMinByID_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'UpdateCreditMinByID'
func (*Repository_UpdateCreditMinByID_Call) Return ¶ added in v0.34.0
func (_c *Repository_UpdateCreditMinByID_Call) Return(_a0 customer.Customer, _a1 error) *Repository_UpdateCreditMinByID_Call
func (*Repository_UpdateCreditMinByID_Call) Run ¶ added in v0.34.0
func (_c *Repository_UpdateCreditMinByID_Call) Run(run func(ctx context.Context, customerID string, limit int64)) *Repository_UpdateCreditMinByID_Call
func (*Repository_UpdateCreditMinByID_Call) RunAndReturn ¶ added in v0.34.0
func (_c *Repository_UpdateCreditMinByID_Call) RunAndReturn(run func(context.Context, string, int64) (customer.Customer, error)) *Repository_UpdateCreditMinByID_Call