github.com/cloudwego/kitex@v0.9.0/internal/mocks/generic/generic_service.go (about) 1 /* 2 * Copyright 2022 CloudWeGo Authors 3 * 4 * Licensed under the Apache License, Version 2.0 (the "License"); 5 * you may not use this file except in compliance with the License. 6 * You may obtain a copy of the License at 7 * 8 * http://www.apache.org/licenses/LICENSE-2.0 9 * 10 * Unless required by applicable law or agreed to in writing, software 11 * distributed under the License is distributed on an "AS IS" BASIS, 12 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 * See the License for the specific language governing permissions and 14 * limitations under the License. 15 */ 16 17 18 // Code generated by MockGen. DO NOT EDIT. 19 // Source: ../../pkg/generic/generic_service.go 20 21 // Package generic is a generated GoMock package. 22 package generic 23 24 import ( 25 context "context" 26 reflect "reflect" 27 28 gomock "github.com/golang/mock/gomock" 29 ) 30 31 // MockService is a mock of Service interface. 32 type MockService struct { 33 ctrl *gomock.Controller 34 recorder *MockServiceMockRecorder 35 } 36 37 // MockServiceMockRecorder is the mock recorder for MockService. 38 type MockServiceMockRecorder struct { 39 mock *MockService 40 } 41 42 // NewMockService creates a new mock instance. 43 func NewMockService(ctrl *gomock.Controller) *MockService { 44 mock := &MockService{ctrl: ctrl} 45 mock.recorder = &MockServiceMockRecorder{mock} 46 return mock 47 } 48 49 // EXPECT returns an object that allows the caller to indicate expected use. 50 func (m *MockService) EXPECT() *MockServiceMockRecorder { 51 return m.recorder 52 } 53 54 // GenericCall mocks base method. 55 func (m *MockService) GenericCall(ctx context.Context, method string, request interface{}) (interface{}, error) { 56 m.ctrl.T.Helper() 57 ret := m.ctrl.Call(m, "GenericCall", ctx, method, request) 58 ret0, _ := ret[0].(interface{}) 59 ret1, _ := ret[1].(error) 60 return ret0, ret1 61 } 62 63 // GenericCall indicates an expected call of GenericCall. 64 func (mr *MockServiceMockRecorder) GenericCall(ctx, method, request interface{}) *gomock.Call { 65 mr.mock.ctrl.T.Helper() 66 return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "GenericCall", reflect.TypeOf((*MockService)(nil).GenericCall), ctx, method, request) 67 } 68 69 // MockWithCodec is a mock of WithCodec interface. 70 type MockWithCodec struct { 71 ctrl *gomock.Controller 72 recorder *MockWithCodecMockRecorder 73 } 74 75 // MockWithCodecMockRecorder is the mock recorder for MockWithCodec. 76 type MockWithCodecMockRecorder struct { 77 mock *MockWithCodec 78 } 79 80 // NewMockWithCodec creates a new mock instance. 81 func NewMockWithCodec(ctrl *gomock.Controller) *MockWithCodec { 82 mock := &MockWithCodec{ctrl: ctrl} 83 mock.recorder = &MockWithCodecMockRecorder{mock} 84 return mock 85 } 86 87 // EXPECT returns an object that allows the caller to indicate expected use. 88 func (m *MockWithCodec) EXPECT() *MockWithCodecMockRecorder { 89 return m.recorder 90 } 91 92 // SetCodec mocks base method. 93 func (m *MockWithCodec) SetCodec(codec interface{}) { 94 m.ctrl.T.Helper() 95 m.ctrl.Call(m, "SetCodec", codec) 96 } 97 98 // SetCodec indicates an expected call of SetCodec. 99 func (mr *MockWithCodecMockRecorder) SetCodec(codec interface{}) *gomock.Call { 100 mr.mock.ctrl.T.Helper() 101 return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "SetCodec", reflect.TypeOf((*MockWithCodec)(nil).SetCodec), codec) 102 }