Documentation
¶
Overview ¶
Code generated by MockGen. DO NOT EDIT. Source: ./service.go
Generated by this command:
mockgen -source=./service.go -package=productmocks -destination=../../mocks/product.mock.go -typed Service
Package productmocks is a generated GoMock package.
Index ¶
- type MockService
- func (m *MockService) EXPECT() *MockServiceMockRecorder
- func (m *MockService) FindSKUBySN(ctx context.Context, sn string) (domain.SKU, error)
- func (m *MockService) FindSPUByID(ctx context.Context, id int64) (domain.SPU, error)
- func (m *MockService) FindSPUBySN(ctx context.Context, sn string) (domain.SPU, error)
- func (m *MockService) ProductList(ctx context.Context, offset, limit int) (int64, []domain.SPU, error)
- func (m *MockService) SaveProduct(ctx context.Context, spu domain.SPU) (string, error)
- type MockServiceMockRecorder
- func (mr *MockServiceMockRecorder) FindSKUBySN(ctx, sn any) *ServiceFindSKUBySNCall
- func (mr *MockServiceMockRecorder) FindSPUByID(ctx, id any) *ServiceFindSPUByIDCall
- func (mr *MockServiceMockRecorder) FindSPUBySN(ctx, sn any) *ServiceFindSPUBySNCall
- func (mr *MockServiceMockRecorder) ProductList(ctx, offset, limit any) *ServiceProductListCall
- func (mr *MockServiceMockRecorder) SaveProduct(ctx, spu any) *ServiceSaveProductCall
- type ServiceFindSKUBySNCall
- func (c *ServiceFindSKUBySNCall) Do(f func(context.Context, string) (domain.SKU, error)) *ServiceFindSKUBySNCall
- func (c *ServiceFindSKUBySNCall) DoAndReturn(f func(context.Context, string) (domain.SKU, error)) *ServiceFindSKUBySNCall
- func (c *ServiceFindSKUBySNCall) Return(arg0 domain.SKU, arg1 error) *ServiceFindSKUBySNCall
- type ServiceFindSPUByIDCall
- func (c *ServiceFindSPUByIDCall) Do(f func(context.Context, int64) (domain.SPU, error)) *ServiceFindSPUByIDCall
- func (c *ServiceFindSPUByIDCall) DoAndReturn(f func(context.Context, int64) (domain.SPU, error)) *ServiceFindSPUByIDCall
- func (c *ServiceFindSPUByIDCall) Return(arg0 domain.SPU, arg1 error) *ServiceFindSPUByIDCall
- type ServiceFindSPUBySNCall
- func (c *ServiceFindSPUBySNCall) Do(f func(context.Context, string) (domain.SPU, error)) *ServiceFindSPUBySNCall
- func (c *ServiceFindSPUBySNCall) DoAndReturn(f func(context.Context, string) (domain.SPU, error)) *ServiceFindSPUBySNCall
- func (c *ServiceFindSPUBySNCall) Return(arg0 domain.SPU, arg1 error) *ServiceFindSPUBySNCall
- type ServiceProductListCall
- func (c *ServiceProductListCall) Do(f func(context.Context, int, int) (int64, []domain.SPU, error)) *ServiceProductListCall
- func (c *ServiceProductListCall) DoAndReturn(f func(context.Context, int, int) (int64, []domain.SPU, error)) *ServiceProductListCall
- func (c *ServiceProductListCall) Return(arg0 int64, arg1 []domain.SPU, arg2 error) *ServiceProductListCall
- type ServiceSaveProductCall
- func (c *ServiceSaveProductCall) Do(f func(context.Context, domain.SPU) (string, error)) *ServiceSaveProductCall
- func (c *ServiceSaveProductCall) DoAndReturn(f func(context.Context, domain.SPU) (string, error)) *ServiceSaveProductCall
- func (c *ServiceSaveProductCall) Return(arg0 string, arg1 error) *ServiceSaveProductCall
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type MockService ¶
type MockService struct {
// contains filtered or unexported fields
}
MockService is a mock of Service interface.
func NewMockService ¶
func NewMockService(ctrl *gomock.Controller) *MockService
NewMockService creates a new mock instance.
func (*MockService) EXPECT ¶
func (m *MockService) EXPECT() *MockServiceMockRecorder
EXPECT returns an object that allows the caller to indicate expected use.
func (*MockService) FindSKUBySN ¶
FindSKUBySN mocks base method.
func (*MockService) FindSPUByID ¶
FindSPUByID mocks base method.
func (*MockService) FindSPUBySN ¶
FindSPUBySN mocks base method.
func (*MockService) ProductList ¶ added in v0.1.5
func (m *MockService) ProductList(ctx context.Context, offset, limit int) (int64, []domain.SPU, error)
ProductList mocks base method.
func (*MockService) SaveProduct ¶ added in v0.1.5
SaveProduct mocks base method.
type MockServiceMockRecorder ¶
type MockServiceMockRecorder struct {
// contains filtered or unexported fields
}
MockServiceMockRecorder is the mock recorder for MockService.
func (*MockServiceMockRecorder) FindSKUBySN ¶
func (mr *MockServiceMockRecorder) FindSKUBySN(ctx, sn any) *ServiceFindSKUBySNCall
FindSKUBySN indicates an expected call of FindSKUBySN.
func (*MockServiceMockRecorder) FindSPUByID ¶
func (mr *MockServiceMockRecorder) FindSPUByID(ctx, id any) *ServiceFindSPUByIDCall
FindSPUByID indicates an expected call of FindSPUByID.
func (*MockServiceMockRecorder) FindSPUBySN ¶
func (mr *MockServiceMockRecorder) FindSPUBySN(ctx, sn any) *ServiceFindSPUBySNCall
FindSPUBySN indicates an expected call of FindSPUBySN.
func (*MockServiceMockRecorder) ProductList ¶ added in v0.1.5
func (mr *MockServiceMockRecorder) ProductList(ctx, offset, limit any) *ServiceProductListCall
ProductList indicates an expected call of ProductList.
func (*MockServiceMockRecorder) SaveProduct ¶ added in v0.1.5
func (mr *MockServiceMockRecorder) SaveProduct(ctx, spu any) *ServiceSaveProductCall
SaveProduct indicates an expected call of SaveProduct.
type ServiceFindSKUBySNCall ¶
ServiceFindSKUBySNCall wrap *gomock.Call
func (*ServiceFindSKUBySNCall) Do ¶
func (c *ServiceFindSKUBySNCall) Do(f func(context.Context, string) (domain.SKU, error)) *ServiceFindSKUBySNCall
Do rewrite *gomock.Call.Do
func (*ServiceFindSKUBySNCall) DoAndReturn ¶
func (c *ServiceFindSKUBySNCall) DoAndReturn(f func(context.Context, string) (domain.SKU, error)) *ServiceFindSKUBySNCall
DoAndReturn rewrite *gomock.Call.DoAndReturn
func (*ServiceFindSKUBySNCall) Return ¶
func (c *ServiceFindSKUBySNCall) Return(arg0 domain.SKU, arg1 error) *ServiceFindSKUBySNCall
Return rewrite *gomock.Call.Return
type ServiceFindSPUByIDCall ¶
ServiceFindSPUByIDCall wrap *gomock.Call
func (*ServiceFindSPUByIDCall) Do ¶
func (c *ServiceFindSPUByIDCall) Do(f func(context.Context, int64) (domain.SPU, error)) *ServiceFindSPUByIDCall
Do rewrite *gomock.Call.Do
func (*ServiceFindSPUByIDCall) DoAndReturn ¶
func (c *ServiceFindSPUByIDCall) DoAndReturn(f func(context.Context, int64) (domain.SPU, error)) *ServiceFindSPUByIDCall
DoAndReturn rewrite *gomock.Call.DoAndReturn
func (*ServiceFindSPUByIDCall) Return ¶
func (c *ServiceFindSPUByIDCall) Return(arg0 domain.SPU, arg1 error) *ServiceFindSPUByIDCall
Return rewrite *gomock.Call.Return
type ServiceFindSPUBySNCall ¶
ServiceFindSPUBySNCall wrap *gomock.Call
func (*ServiceFindSPUBySNCall) Do ¶
func (c *ServiceFindSPUBySNCall) Do(f func(context.Context, string) (domain.SPU, error)) *ServiceFindSPUBySNCall
Do rewrite *gomock.Call.Do
func (*ServiceFindSPUBySNCall) DoAndReturn ¶
func (c *ServiceFindSPUBySNCall) DoAndReturn(f func(context.Context, string) (domain.SPU, error)) *ServiceFindSPUBySNCall
DoAndReturn rewrite *gomock.Call.DoAndReturn
func (*ServiceFindSPUBySNCall) Return ¶
func (c *ServiceFindSPUBySNCall) Return(arg0 domain.SPU, arg1 error) *ServiceFindSPUBySNCall
Return rewrite *gomock.Call.Return
type ServiceProductListCall ¶ added in v0.1.5
ServiceProductListCall wrap *gomock.Call
func (*ServiceProductListCall) Do ¶ added in v0.1.5
func (c *ServiceProductListCall) Do(f func(context.Context, int, int) (int64, []domain.SPU, error)) *ServiceProductListCall
Do rewrite *gomock.Call.Do
func (*ServiceProductListCall) DoAndReturn ¶ added in v0.1.5
func (c *ServiceProductListCall) DoAndReturn(f func(context.Context, int, int) (int64, []domain.SPU, error)) *ServiceProductListCall
DoAndReturn rewrite *gomock.Call.DoAndReturn
func (*ServiceProductListCall) Return ¶ added in v0.1.5
func (c *ServiceProductListCall) Return(arg0 int64, arg1 []domain.SPU, arg2 error) *ServiceProductListCall
Return rewrite *gomock.Call.Return
type ServiceSaveProductCall ¶ added in v0.1.5
ServiceSaveProductCall wrap *gomock.Call
func (*ServiceSaveProductCall) Do ¶ added in v0.1.5
func (c *ServiceSaveProductCall) Do(f func(context.Context, domain.SPU) (string, error)) *ServiceSaveProductCall
Do rewrite *gomock.Call.Do
func (*ServiceSaveProductCall) DoAndReturn ¶ added in v0.1.5
func (c *ServiceSaveProductCall) DoAndReturn(f func(context.Context, domain.SPU) (string, error)) *ServiceSaveProductCall
DoAndReturn rewrite *gomock.Call.DoAndReturn
func (*ServiceSaveProductCall) Return ¶ added in v0.1.5
func (c *ServiceSaveProductCall) Return(arg0 string, arg1 error) *ServiceSaveProductCall
Return rewrite *gomock.Call.Return