Documentation ¶
Overview ¶
Package repo is a generated GoMock package.
Index ¶
- type IOrderRepo
- type ListCondition
- type MockIOrderRepo
- func (m *MockIOrderRepo) Create(ctx contextx.Contextx, order *model.Order) error
- func (m *MockIOrderRepo) EXPECT() *MockIOrderRepoMockRecorder
- func (m *MockIOrderRepo) GetByID(ctx contextx.Contextx, id string) (*model.Order, error)
- func (m *MockIOrderRepo) List(ctx contextx.Contextx, condition ListCondition) ([]*model.Order, int, error)
- func (m *MockIOrderRepo) Update(ctx contextx.Contextx, order *model.Order) error
- type MockIOrderRepoMockRecorder
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type IOrderRepo ¶
type IOrderRepo interface { Create(c context.Context, order *model.Order) error GetByID(c context.Context, id string) (item *model.Order, err error) List(c context.Context, condition ListCondition) (items []*model.Order, total int, err error) Update(c context.Context, order *model.Order) error }
IOrderRepo is an interface that defines the methods that the order repository should implement
type ListCondition ¶
ListCondition is a struct that defines the conditions for listing orders
type MockIOrderRepo ¶
type MockIOrderRepo struct {
// contains filtered or unexported fields
}
MockIOrderRepo is a mock of IOrderRepo interface.
func NewMockIOrderRepo ¶
func NewMockIOrderRepo(ctrl *gomock.Controller) *MockIOrderRepo
NewMockIOrderRepo creates a new mock instance.
func (*MockIOrderRepo) EXPECT ¶
func (m *MockIOrderRepo) EXPECT() *MockIOrderRepoMockRecorder
EXPECT returns an object that allows the caller to indicate expected use.
func (*MockIOrderRepo) List ¶
func (m *MockIOrderRepo) List(ctx contextx.Contextx, condition ListCondition) ([]*model.Order, int, error)
List mocks base method.
type MockIOrderRepoMockRecorder ¶
type MockIOrderRepoMockRecorder struct {
// contains filtered or unexported fields
}
MockIOrderRepoMockRecorder is the mock recorder for MockIOrderRepo.
func (*MockIOrderRepoMockRecorder) Create ¶
func (mr *MockIOrderRepoMockRecorder) Create(ctx, order any) *gomock.Call
Create indicates an expected call of Create.
func (*MockIOrderRepoMockRecorder) GetByID ¶
func (mr *MockIOrderRepoMockRecorder) GetByID(ctx, id any) *gomock.Call
GetByID indicates an expected call of GetByID.
Click to show internal directories.
Click to hide internal directories.