226 lines
8.8 KiB
Go
226 lines
8.8 KiB
Go
|
// Code generated by MockGen. DO NOT EDIT.
|
||
|
// Source: ./pkg/domain/repository/product_statistics.go
|
||
|
//
|
||
|
// Generated by this command:
|
||
|
//
|
||
|
// mockgen -source=./pkg/domain/repository/product_statistics.go -destination=./pkg/mock/repository/product_statistics.go -package=mock
|
||
|
//
|
||
|
|
||
|
// Package mock is a generated GoMock package.
|
||
|
package mock
|
||
|
|
||
|
import (
|
||
|
context "context"
|
||
|
reflect "reflect"
|
||
|
|
||
|
entity "code.30cm.net/digimon/app-cloudep-product-service/pkg/domain/entity"
|
||
|
mongo "go.mongodb.org/mongo-driver/mongo"
|
||
|
gomock "go.uber.org/mock/gomock"
|
||
|
)
|
||
|
|
||
|
// MockProductStatisticsRepo is a mock of ProductStatisticsRepo interface.
|
||
|
type MockProductStatisticsRepo struct {
|
||
|
ctrl *gomock.Controller
|
||
|
recorder *MockProductStatisticsRepoMockRecorder
|
||
|
isgomock struct{}
|
||
|
}
|
||
|
|
||
|
// MockProductStatisticsRepoMockRecorder is the mock recorder for MockProductStatisticsRepo.
|
||
|
type MockProductStatisticsRepoMockRecorder struct {
|
||
|
mock *MockProductStatisticsRepo
|
||
|
}
|
||
|
|
||
|
// NewMockProductStatisticsRepo creates a new mock instance.
|
||
|
func NewMockProductStatisticsRepo(ctrl *gomock.Controller) *MockProductStatisticsRepo {
|
||
|
mock := &MockProductStatisticsRepo{ctrl: ctrl}
|
||
|
mock.recorder = &MockProductStatisticsRepoMockRecorder{mock}
|
||
|
return mock
|
||
|
}
|
||
|
|
||
|
// EXPECT returns an object that allows the caller to indicate expected use.
|
||
|
func (m *MockProductStatisticsRepo) EXPECT() *MockProductStatisticsRepoMockRecorder {
|
||
|
return m.recorder
|
||
|
}
|
||
|
|
||
|
// Create mocks base method.
|
||
|
func (m *MockProductStatisticsRepo) Create(ctx context.Context, stats *entity.ProductStatistics) error {
|
||
|
m.ctrl.T.Helper()
|
||
|
ret := m.ctrl.Call(m, "Create", ctx, stats)
|
||
|
ret0, _ := ret[0].(error)
|
||
|
return ret0
|
||
|
}
|
||
|
|
||
|
// Create indicates an expected call of Create.
|
||
|
func (mr *MockProductStatisticsRepoMockRecorder) Create(ctx, stats any) *gomock.Call {
|
||
|
mr.mock.ctrl.T.Helper()
|
||
|
return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Create", reflect.TypeOf((*MockProductStatisticsRepo)(nil).Create), ctx, stats)
|
||
|
}
|
||
|
|
||
|
// DecFansCount mocks base method.
|
||
|
func (m *MockProductStatisticsRepo) DecFansCount(ctx context.Context, productID string, fansCount uint64) error {
|
||
|
m.ctrl.T.Helper()
|
||
|
ret := m.ctrl.Call(m, "DecFansCount", ctx, productID, fansCount)
|
||
|
ret0, _ := ret[0].(error)
|
||
|
return ret0
|
||
|
}
|
||
|
|
||
|
// DecFansCount indicates an expected call of DecFansCount.
|
||
|
func (mr *MockProductStatisticsRepoMockRecorder) DecFansCount(ctx, productID, fansCount any) *gomock.Call {
|
||
|
mr.mock.ctrl.T.Helper()
|
||
|
return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "DecFansCount", reflect.TypeOf((*MockProductStatisticsRepo)(nil).DecFansCount), ctx, productID, fansCount)
|
||
|
}
|
||
|
|
||
|
// DecOrders mocks base method.
|
||
|
func (m *MockProductStatisticsRepo) DecOrders(ctx context.Context, productID string, count int64) error {
|
||
|
m.ctrl.T.Helper()
|
||
|
ret := m.ctrl.Call(m, "DecOrders", ctx, productID, count)
|
||
|
ret0, _ := ret[0].(error)
|
||
|
return ret0
|
||
|
}
|
||
|
|
||
|
// DecOrders indicates an expected call of DecOrders.
|
||
|
func (mr *MockProductStatisticsRepoMockRecorder) DecOrders(ctx, productID, count any) *gomock.Call {
|
||
|
mr.mock.ctrl.T.Helper()
|
||
|
return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "DecOrders", reflect.TypeOf((*MockProductStatisticsRepo)(nil).DecOrders), ctx, productID, count)
|
||
|
}
|
||
|
|
||
|
// Delete mocks base method.
|
||
|
func (m *MockProductStatisticsRepo) Delete(ctx context.Context, id string) error {
|
||
|
m.ctrl.T.Helper()
|
||
|
ret := m.ctrl.Call(m, "Delete", ctx, id)
|
||
|
ret0, _ := ret[0].(error)
|
||
|
return ret0
|
||
|
}
|
||
|
|
||
|
// Delete indicates an expected call of Delete.
|
||
|
func (mr *MockProductStatisticsRepoMockRecorder) Delete(ctx, id any) *gomock.Call {
|
||
|
mr.mock.ctrl.T.Helper()
|
||
|
return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Delete", reflect.TypeOf((*MockProductStatisticsRepo)(nil).Delete), ctx, id)
|
||
|
}
|
||
|
|
||
|
// GetByID mocks base method.
|
||
|
func (m *MockProductStatisticsRepo) GetByID(ctx context.Context, id string) (*entity.ProductStatistics, error) {
|
||
|
m.ctrl.T.Helper()
|
||
|
ret := m.ctrl.Call(m, "GetByID", ctx, id)
|
||
|
ret0, _ := ret[0].(*entity.ProductStatistics)
|
||
|
ret1, _ := ret[1].(error)
|
||
|
return ret0, ret1
|
||
|
}
|
||
|
|
||
|
// GetByID indicates an expected call of GetByID.
|
||
|
func (mr *MockProductStatisticsRepoMockRecorder) GetByID(ctx, id any) *gomock.Call {
|
||
|
mr.mock.ctrl.T.Helper()
|
||
|
return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "GetByID", reflect.TypeOf((*MockProductStatisticsRepo)(nil).GetByID), ctx, id)
|
||
|
}
|
||
|
|
||
|
// GetByProductID mocks base method.
|
||
|
func (m *MockProductStatisticsRepo) GetByProductID(ctx context.Context, productID string) (*entity.ProductStatistics, error) {
|
||
|
m.ctrl.T.Helper()
|
||
|
ret := m.ctrl.Call(m, "GetByProductID", ctx, productID)
|
||
|
ret0, _ := ret[0].(*entity.ProductStatistics)
|
||
|
ret1, _ := ret[1].(error)
|
||
|
return ret0, ret1
|
||
|
}
|
||
|
|
||
|
// GetByProductID indicates an expected call of GetByProductID.
|
||
|
func (mr *MockProductStatisticsRepoMockRecorder) GetByProductID(ctx, productID any) *gomock.Call {
|
||
|
mr.mock.ctrl.T.Helper()
|
||
|
return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "GetByProductID", reflect.TypeOf((*MockProductStatisticsRepo)(nil).GetByProductID), ctx, productID)
|
||
|
}
|
||
|
|
||
|
// IncFansCount mocks base method.
|
||
|
func (m *MockProductStatisticsRepo) IncFansCount(ctx context.Context, productID string, fansCount uint64) error {
|
||
|
m.ctrl.T.Helper()
|
||
|
ret := m.ctrl.Call(m, "IncFansCount", ctx, productID, fansCount)
|
||
|
ret0, _ := ret[0].(error)
|
||
|
return ret0
|
||
|
}
|
||
|
|
||
|
// IncFansCount indicates an expected call of IncFansCount.
|
||
|
func (mr *MockProductStatisticsRepoMockRecorder) IncFansCount(ctx, productID, fansCount any) *gomock.Call {
|
||
|
mr.mock.ctrl.T.Helper()
|
||
|
return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "IncFansCount", reflect.TypeOf((*MockProductStatisticsRepo)(nil).IncFansCount), ctx, productID, fansCount)
|
||
|
}
|
||
|
|
||
|
// IncOrders mocks base method.
|
||
|
func (m *MockProductStatisticsRepo) IncOrders(ctx context.Context, productID string, count int64) error {
|
||
|
m.ctrl.T.Helper()
|
||
|
ret := m.ctrl.Call(m, "IncOrders", ctx, productID, count)
|
||
|
ret0, _ := ret[0].(error)
|
||
|
return ret0
|
||
|
}
|
||
|
|
||
|
// IncOrders indicates an expected call of IncOrders.
|
||
|
func (mr *MockProductStatisticsRepoMockRecorder) IncOrders(ctx, productID, count any) *gomock.Call {
|
||
|
mr.mock.ctrl.T.Helper()
|
||
|
return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "IncOrders", reflect.TypeOf((*MockProductStatisticsRepo)(nil).IncOrders), ctx, productID, count)
|
||
|
}
|
||
|
|
||
|
// Index20250317001UP mocks base method.
|
||
|
func (m *MockProductStatisticsRepo) Index20250317001UP(ctx context.Context) (*mongo.Cursor, error) {
|
||
|
m.ctrl.T.Helper()
|
||
|
ret := m.ctrl.Call(m, "Index20250317001UP", ctx)
|
||
|
ret0, _ := ret[0].(*mongo.Cursor)
|
||
|
ret1, _ := ret[1].(error)
|
||
|
return ret0, ret1
|
||
|
}
|
||
|
|
||
|
// Index20250317001UP indicates an expected call of Index20250317001UP.
|
||
|
func (mr *MockProductStatisticsRepoMockRecorder) Index20250317001UP(ctx any) *gomock.Call {
|
||
|
mr.mock.ctrl.T.Helper()
|
||
|
return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Index20250317001UP", reflect.TypeOf((*MockProductStatisticsRepo)(nil).Index20250317001UP), ctx)
|
||
|
}
|
||
|
|
||
|
// UpdateAverageRating mocks base method.
|
||
|
func (m *MockProductStatisticsRepo) UpdateAverageRating(ctx context.Context, productID string, averageRating float64) error {
|
||
|
m.ctrl.T.Helper()
|
||
|
ret := m.ctrl.Call(m, "UpdateAverageRating", ctx, productID, averageRating)
|
||
|
ret0, _ := ret[0].(error)
|
||
|
return ret0
|
||
|
}
|
||
|
|
||
|
// UpdateAverageRating indicates an expected call of UpdateAverageRating.
|
||
|
func (mr *MockProductStatisticsRepoMockRecorder) UpdateAverageRating(ctx, productID, averageRating any) *gomock.Call {
|
||
|
mr.mock.ctrl.T.Helper()
|
||
|
return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "UpdateAverageRating", reflect.TypeOf((*MockProductStatisticsRepo)(nil).UpdateAverageRating), ctx, productID, averageRating)
|
||
|
}
|
||
|
|
||
|
// MockProductStatisticsIndex is a mock of ProductStatisticsIndex interface.
|
||
|
type MockProductStatisticsIndex struct {
|
||
|
ctrl *gomock.Controller
|
||
|
recorder *MockProductStatisticsIndexMockRecorder
|
||
|
isgomock struct{}
|
||
|
}
|
||
|
|
||
|
// MockProductStatisticsIndexMockRecorder is the mock recorder for MockProductStatisticsIndex.
|
||
|
type MockProductStatisticsIndexMockRecorder struct {
|
||
|
mock *MockProductStatisticsIndex
|
||
|
}
|
||
|
|
||
|
// NewMockProductStatisticsIndex creates a new mock instance.
|
||
|
func NewMockProductStatisticsIndex(ctrl *gomock.Controller) *MockProductStatisticsIndex {
|
||
|
mock := &MockProductStatisticsIndex{ctrl: ctrl}
|
||
|
mock.recorder = &MockProductStatisticsIndexMockRecorder{mock}
|
||
|
return mock
|
||
|
}
|
||
|
|
||
|
// EXPECT returns an object that allows the caller to indicate expected use.
|
||
|
func (m *MockProductStatisticsIndex) EXPECT() *MockProductStatisticsIndexMockRecorder {
|
||
|
return m.recorder
|
||
|
}
|
||
|
|
||
|
// Index20250317001UP mocks base method.
|
||
|
func (m *MockProductStatisticsIndex) Index20250317001UP(ctx context.Context) (*mongo.Cursor, error) {
|
||
|
m.ctrl.T.Helper()
|
||
|
ret := m.ctrl.Call(m, "Index20250317001UP", ctx)
|
||
|
ret0, _ := ret[0].(*mongo.Cursor)
|
||
|
ret1, _ := ret[1].(error)
|
||
|
return ret0, ret1
|
||
|
}
|
||
|
|
||
|
// Index20250317001UP indicates an expected call of Index20250317001UP.
|
||
|
func (mr *MockProductStatisticsIndexMockRecorder) Index20250317001UP(ctx any) *gomock.Call {
|
||
|
mr.mock.ctrl.T.Helper()
|
||
|
return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Index20250317001UP", reflect.TypeOf((*MockProductStatisticsIndex)(nil).Index20250317001UP), ctx)
|
||
|
}
|