Documentation ¶
Index ¶
- 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)
- 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
- 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
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
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
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
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