github.com/ydb-platform/ydb-go-sdk/v3@v3.89.2/internal/conn/grpc_client_conn_interface_mock_test.go (about) 1 // Code generated by MockGen. DO NOT EDIT. 2 // Source: google.golang.org/grpc (interfaces: ClientConnInterface) 3 // 4 // Generated by this command: 5 // 6 // mockgen -destination grpc_client_conn_interface_mock_test.go --typed -package conn -write_package_comment=false google.golang.org/grpc ClientConnInterface 7 package conn 8 9 import ( 10 context "context" 11 reflect "reflect" 12 13 gomock "go.uber.org/mock/gomock" 14 grpc "google.golang.org/grpc" 15 ) 16 17 // MockClientConnInterface is a mock of ClientConnInterface interface. 18 type MockClientConnInterface struct { 19 ctrl *gomock.Controller 20 recorder *MockClientConnInterfaceMockRecorder 21 } 22 23 // MockClientConnInterfaceMockRecorder is the mock recorder for MockClientConnInterface. 24 type MockClientConnInterfaceMockRecorder struct { 25 mock *MockClientConnInterface 26 } 27 28 // NewMockClientConnInterface creates a new mock instance. 29 func NewMockClientConnInterface(ctrl *gomock.Controller) *MockClientConnInterface { 30 mock := &MockClientConnInterface{ctrl: ctrl} 31 mock.recorder = &MockClientConnInterfaceMockRecorder{mock} 32 return mock 33 } 34 35 // EXPECT returns an object that allows the caller to indicate expected use. 36 func (m *MockClientConnInterface) EXPECT() *MockClientConnInterfaceMockRecorder { 37 return m.recorder 38 } 39 40 // Invoke mocks base method. 41 func (m *MockClientConnInterface) Invoke(arg0 context.Context, arg1 string, arg2, arg3 any, arg4 ...grpc.CallOption) error { 42 m.ctrl.T.Helper() 43 varargs := []any{arg0, arg1, arg2, arg3} 44 for _, a := range arg4 { 45 varargs = append(varargs, a) 46 } 47 ret := m.ctrl.Call(m, "Invoke", varargs...) 48 ret0, _ := ret[0].(error) 49 return ret0 50 } 51 52 // Invoke indicates an expected call of Invoke. 53 func (mr *MockClientConnInterfaceMockRecorder) Invoke(arg0, arg1, arg2, arg3 any, arg4 ...any) *MockClientConnInterfaceInvokeCall { 54 mr.mock.ctrl.T.Helper() 55 varargs := append([]any{arg0, arg1, arg2, arg3}, arg4...) 56 call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Invoke", reflect.TypeOf((*MockClientConnInterface)(nil).Invoke), varargs...) 57 return &MockClientConnInterfaceInvokeCall{Call: call} 58 } 59 60 // MockClientConnInterfaceInvokeCall wrap *gomock.Call 61 type MockClientConnInterfaceInvokeCall struct { 62 *gomock.Call 63 } 64 65 // Return rewrite *gomock.Call.Return 66 func (c *MockClientConnInterfaceInvokeCall) Return(arg0 error) *MockClientConnInterfaceInvokeCall { 67 c.Call = c.Call.Return(arg0) 68 return c 69 } 70 71 // Do rewrite *gomock.Call.Do 72 func (c *MockClientConnInterfaceInvokeCall) Do(f func(context.Context, string, any, any, ...grpc.CallOption) error) *MockClientConnInterfaceInvokeCall { 73 c.Call = c.Call.Do(f) 74 return c 75 } 76 77 // DoAndReturn rewrite *gomock.Call.DoAndReturn 78 func (c *MockClientConnInterfaceInvokeCall) DoAndReturn(f func(context.Context, string, any, any, ...grpc.CallOption) error) *MockClientConnInterfaceInvokeCall { 79 c.Call = c.Call.DoAndReturn(f) 80 return c 81 } 82 83 // NewStream mocks base method. 84 func (m *MockClientConnInterface) NewStream(arg0 context.Context, arg1 *grpc.StreamDesc, arg2 string, arg3 ...grpc.CallOption) (grpc.ClientStream, error) { 85 m.ctrl.T.Helper() 86 varargs := []any{arg0, arg1, arg2} 87 for _, a := range arg3 { 88 varargs = append(varargs, a) 89 } 90 ret := m.ctrl.Call(m, "NewStream", varargs...) 91 ret0, _ := ret[0].(grpc.ClientStream) 92 ret1, _ := ret[1].(error) 93 return ret0, ret1 94 } 95 96 // NewStream indicates an expected call of NewStream. 97 func (mr *MockClientConnInterfaceMockRecorder) NewStream(arg0, arg1, arg2 any, arg3 ...any) *MockClientConnInterfaceNewStreamCall { 98 mr.mock.ctrl.T.Helper() 99 varargs := append([]any{arg0, arg1, arg2}, arg3...) 100 call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "NewStream", reflect.TypeOf((*MockClientConnInterface)(nil).NewStream), varargs...) 101 return &MockClientConnInterfaceNewStreamCall{Call: call} 102 } 103 104 // MockClientConnInterfaceNewStreamCall wrap *gomock.Call 105 type MockClientConnInterfaceNewStreamCall struct { 106 *gomock.Call 107 } 108 109 // Return rewrite *gomock.Call.Return 110 func (c *MockClientConnInterfaceNewStreamCall) Return(arg0 grpc.ClientStream, arg1 error) *MockClientConnInterfaceNewStreamCall { 111 c.Call = c.Call.Return(arg0, arg1) 112 return c 113 } 114 115 // Do rewrite *gomock.Call.Do 116 func (c *MockClientConnInterfaceNewStreamCall) Do(f func(context.Context, *grpc.StreamDesc, string, ...grpc.CallOption) (grpc.ClientStream, error)) *MockClientConnInterfaceNewStreamCall { 117 c.Call = c.Call.Do(f) 118 return c 119 } 120 121 // DoAndReturn rewrite *gomock.Call.DoAndReturn 122 func (c *MockClientConnInterfaceNewStreamCall) DoAndReturn(f func(context.Context, *grpc.StreamDesc, string, ...grpc.CallOption) (grpc.ClientStream, error)) *MockClientConnInterfaceNewStreamCall { 123 c.Call = c.Call.DoAndReturn(f) 124 return c 125 }