// Code generated by MockGen. DO NOT EDIT. // Source: ./pkg/domain/repository/product.go // // Generated by this command: // // mockgen -source=./pkg/domain/repository/product.go -destination=./pkg/mock/repository/product.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" repository "code.30cm.net/digimon/app-cloudep-product-service/pkg/domain/repository" mongo "go.mongodb.org/mongo-driver/mongo" options "go.mongodb.org/mongo-driver/mongo/options" gomock "go.uber.org/mock/gomock" ) // MockProductRepository is a mock of ProductRepository interface. type MockProductRepository struct { ctrl *gomock.Controller recorder *MockProductRepositoryMockRecorder isgomock struct{} } // MockProductRepositoryMockRecorder is the mock recorder for MockProductRepository. type MockProductRepositoryMockRecorder struct { mock *MockProductRepository } // NewMockProductRepository creates a new mock instance. func NewMockProductRepository(ctrl *gomock.Controller) *MockProductRepository { mock := &MockProductRepository{ctrl: ctrl} mock.recorder = &MockProductRepositoryMockRecorder{mock} return mock } // EXPECT returns an object that allows the caller to indicate expected use. func (m *MockProductRepository) EXPECT() *MockProductRepositoryMockRecorder { return m.recorder } // Delete mocks base method. func (m *MockProductRepository) 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 *MockProductRepositoryMockRecorder) Delete(ctx, id any) *gomock.Call { mr.mock.ctrl.T.Helper() return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Delete", reflect.TypeOf((*MockProductRepository)(nil).Delete), ctx, id) } // FindOneByID mocks base method. func (m *MockProductRepository) FindOneByID(ctx context.Context, id string) (*entity.Product, error) { m.ctrl.T.Helper() ret := m.ctrl.Call(m, "FindOneByID", ctx, id) ret0, _ := ret[0].(*entity.Product) ret1, _ := ret[1].(error) return ret0, ret1 } // FindOneByID indicates an expected call of FindOneByID. func (mr *MockProductRepositoryMockRecorder) FindOneByID(ctx, id any) *gomock.Call { mr.mock.ctrl.T.Helper() return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "FindOneByID", reflect.TypeOf((*MockProductRepository)(nil).FindOneByID), ctx, id) } // FindOneBySlug mocks base method. func (m *MockProductRepository) FindOneBySlug(ctx context.Context, slug string) (*entity.Product, error) { m.ctrl.T.Helper() ret := m.ctrl.Call(m, "FindOneBySlug", ctx, slug) ret0, _ := ret[0].(*entity.Product) ret1, _ := ret[1].(error) return ret0, ret1 } // FindOneBySlug indicates an expected call of FindOneBySlug. func (mr *MockProductRepositoryMockRecorder) FindOneBySlug(ctx, slug any) *gomock.Call { mr.mock.ctrl.T.Helper() return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "FindOneBySlug", reflect.TypeOf((*MockProductRepository)(nil).FindOneBySlug), ctx, slug) } // Index20250317001UP mocks base method. func (m *MockProductRepository) 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 *MockProductRepositoryMockRecorder) Index20250317001UP(ctx any) *gomock.Call { mr.mock.ctrl.T.Helper() return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Index20250317001UP", reflect.TypeOf((*MockProductRepository)(nil).Index20250317001UP), ctx) } // Insert mocks base method. func (m *MockProductRepository) Insert(ctx context.Context, data *entity.Product) error { m.ctrl.T.Helper() ret := m.ctrl.Call(m, "Insert", ctx, data) ret0, _ := ret[0].(error) return ret0 } // Insert indicates an expected call of Insert. func (mr *MockProductRepositoryMockRecorder) Insert(ctx, data any) *gomock.Call { mr.mock.ctrl.T.Helper() return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Insert", reflect.TypeOf((*MockProductRepository)(nil).Insert), ctx, data) } // ListProduct mocks base method. func (m *MockProductRepository) ListProduct(ctx context.Context, params *repository.ProductQueryParams) ([]*entity.Product, int64, error) { m.ctrl.T.Helper() ret := m.ctrl.Call(m, "ListProduct", ctx, params) ret0, _ := ret[0].([]*entity.Product) ret1, _ := ret[1].(int64) ret2, _ := ret[2].(error) return ret0, ret1, ret2 } // ListProduct indicates an expected call of ListProduct. func (mr *MockProductRepositoryMockRecorder) ListProduct(ctx, params any) *gomock.Call { mr.mock.ctrl.T.Helper() return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "ListProduct", reflect.TypeOf((*MockProductRepository)(nil).ListProduct), ctx, params) } // Transaction mocks base method. func (m *MockProductRepository) Transaction(ctx context.Context, fn func(mongo.SessionContext) (any, error), opts ...*options.TransactionOptions) error { m.ctrl.T.Helper() varargs := []any{ctx, fn} for _, a := range opts { varargs = append(varargs, a) } ret := m.ctrl.Call(m, "Transaction", varargs...) ret0, _ := ret[0].(error) return ret0 } // Transaction indicates an expected call of Transaction. func (mr *MockProductRepositoryMockRecorder) Transaction(ctx, fn any, opts ...any) *gomock.Call { mr.mock.ctrl.T.Helper() varargs := append([]any{ctx, fn}, opts...) return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Transaction", reflect.TypeOf((*MockProductRepository)(nil).Transaction), varargs...) } // Update mocks base method. func (m *MockProductRepository) Update(ctx context.Context, productID string, data *repository.ProductUpdateParams) (*mongo.UpdateResult, error) { m.ctrl.T.Helper() ret := m.ctrl.Call(m, "Update", ctx, productID, data) ret0, _ := ret[0].(*mongo.UpdateResult) ret1, _ := ret[1].(error) return ret0, ret1 } // Update indicates an expected call of Update. func (mr *MockProductRepositoryMockRecorder) Update(ctx, productID, data any) *gomock.Call { mr.mock.ctrl.T.Helper() return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Update", reflect.TypeOf((*MockProductRepository)(nil).Update), ctx, productID, data) } // MockProductIndex is a mock of ProductIndex interface. type MockProductIndex struct { ctrl *gomock.Controller recorder *MockProductIndexMockRecorder isgomock struct{} } // MockProductIndexMockRecorder is the mock recorder for MockProductIndex. type MockProductIndexMockRecorder struct { mock *MockProductIndex } // NewMockProductIndex creates a new mock instance. func NewMockProductIndex(ctrl *gomock.Controller) *MockProductIndex { mock := &MockProductIndex{ctrl: ctrl} mock.recorder = &MockProductIndexMockRecorder{mock} return mock } // EXPECT returns an object that allows the caller to indicate expected use. func (m *MockProductIndex) EXPECT() *MockProductIndexMockRecorder { return m.recorder } // Index20250317001UP mocks base method. func (m *MockProductIndex) 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 *MockProductIndexMockRecorder) Index20250317001UP(ctx any) *gomock.Call { mr.mock.ctrl.T.Helper() return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Index20250317001UP", reflect.TypeOf((*MockProductIndex)(nil).Index20250317001UP), ctx) }