github.com/tuingking/flamingo@v0.0.0-20220403134817-2796ae0e84ca/mock/product/repository.go (about) 1 // Code generated by MockGen. DO NOT EDIT. 2 // Source: internal/product/repository.go 3 4 // Package mock is a generated GoMock package. 5 package mock 6 7 import ( 8 context "context" 9 reflect "reflect" 10 11 gomock "github.com/golang/mock/gomock" 12 product "github.com/tuingking/flamingo/internal/product" 13 ) 14 15 // MockRepository is a mock of Repository interface. 16 type MockRepository struct { 17 ctrl *gomock.Controller 18 recorder *MockRepositoryMockRecorder 19 } 20 21 // MockRepositoryMockRecorder is the mock recorder for MockRepository. 22 type MockRepositoryMockRecorder struct { 23 mock *MockRepository 24 } 25 26 // NewMockRepository creates a new mock instance. 27 func NewMockRepository(ctrl *gomock.Controller) *MockRepository { 28 mock := &MockRepository{ctrl: ctrl} 29 mock.recorder = &MockRepositoryMockRecorder{mock} 30 return mock 31 } 32 33 // EXPECT returns an object that allows the caller to indicate expected use. 34 func (m *MockRepository) EXPECT() *MockRepositoryMockRecorder { 35 return m.recorder 36 } 37 38 // Create mocks base method. 39 func (m *MockRepository) Create(ctx context.Context, v product.Product) (product.Product, error) { 40 m.ctrl.T.Helper() 41 ret := m.ctrl.Call(m, "Create", ctx, v) 42 ret0, _ := ret[0].(product.Product) 43 ret1, _ := ret[1].(error) 44 return ret0, ret1 45 } 46 47 // Create indicates an expected call of Create. 48 func (mr *MockRepositoryMockRecorder) Create(ctx, v interface{}) *gomock.Call { 49 mr.mock.ctrl.T.Helper() 50 return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Create", reflect.TypeOf((*MockRepository)(nil).Create), ctx, v) 51 } 52 53 // FindAll mocks base method. 54 func (m *MockRepository) FindAll(ctx context.Context) ([]product.Product, error) { 55 m.ctrl.T.Helper() 56 ret := m.ctrl.Call(m, "FindAll", ctx) 57 ret0, _ := ret[0].([]product.Product) 58 ret1, _ := ret[1].(error) 59 return ret0, ret1 60 } 61 62 // FindAll indicates an expected call of FindAll. 63 func (mr *MockRepositoryMockRecorder) FindAll(ctx interface{}) *gomock.Call { 64 mr.mock.ctrl.T.Helper() 65 return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "FindAll", reflect.TypeOf((*MockRepository)(nil).FindAll), ctx) 66 }