github.com/anycable/anycable-go@v1.5.1/mocks/RPCClient.go (about) 1 // Code generated by mockery v1.0.0. DO NOT EDIT. 2 3 package mocks 4 5 import anycable "github.com/anycable/anycable-go/protos" 6 import context "context" 7 import grpc "google.golang.org/grpc" 8 import mock "github.com/stretchr/testify/mock" 9 10 // RPCClient is an autogenerated mock type for the RPCClient type 11 type RPCClient struct { 12 mock.Mock 13 } 14 15 // Command provides a mock function with given fields: ctx, in, opts 16 func (_m *RPCClient) Command(ctx context.Context, in *anycable.CommandMessage, opts ...grpc.CallOption) (*anycable.CommandResponse, error) { 17 _va := make([]interface{}, len(opts)) 18 for _i := range opts { 19 _va[_i] = opts[_i] 20 } 21 var _ca []interface{} 22 _ca = append(_ca, ctx, in) 23 _ca = append(_ca, _va...) 24 ret := _m.Called(_ca...) 25 26 var r0 *anycable.CommandResponse 27 if rf, ok := ret.Get(0).(func(context.Context, *anycable.CommandMessage, ...grpc.CallOption) *anycable.CommandResponse); ok { 28 r0 = rf(ctx, in, opts...) 29 } else { 30 if ret.Get(0) != nil { 31 r0 = ret.Get(0).(*anycable.CommandResponse) 32 } 33 } 34 35 var r1 error 36 if rf, ok := ret.Get(1).(func(context.Context, *anycable.CommandMessage, ...grpc.CallOption) error); ok { 37 r1 = rf(ctx, in, opts...) 38 } else { 39 r1 = ret.Error(1) 40 } 41 42 return r0, r1 43 } 44 45 // Connect provides a mock function with given fields: ctx, in, opts 46 func (_m *RPCClient) Connect(ctx context.Context, in *anycable.ConnectionRequest, opts ...grpc.CallOption) (*anycable.ConnectionResponse, error) { 47 _va := make([]interface{}, len(opts)) 48 for _i := range opts { 49 _va[_i] = opts[_i] 50 } 51 var _ca []interface{} 52 _ca = append(_ca, ctx, in) 53 _ca = append(_ca, _va...) 54 ret := _m.Called(_ca...) 55 56 var r0 *anycable.ConnectionResponse 57 if rf, ok := ret.Get(0).(func(context.Context, *anycable.ConnectionRequest, ...grpc.CallOption) *anycable.ConnectionResponse); ok { 58 r0 = rf(ctx, in, opts...) 59 } else { 60 if ret.Get(0) != nil { 61 r0 = ret.Get(0).(*anycable.ConnectionResponse) 62 } 63 } 64 65 var r1 error 66 if rf, ok := ret.Get(1).(func(context.Context, *anycable.ConnectionRequest, ...grpc.CallOption) error); ok { 67 r1 = rf(ctx, in, opts...) 68 } else { 69 r1 = ret.Error(1) 70 } 71 72 return r0, r1 73 } 74 75 // Disconnect provides a mock function with given fields: ctx, in, opts 76 func (_m *RPCClient) Disconnect(ctx context.Context, in *anycable.DisconnectRequest, opts ...grpc.CallOption) (*anycable.DisconnectResponse, error) { 77 _va := make([]interface{}, len(opts)) 78 for _i := range opts { 79 _va[_i] = opts[_i] 80 } 81 var _ca []interface{} 82 _ca = append(_ca, ctx, in) 83 _ca = append(_ca, _va...) 84 ret := _m.Called(_ca...) 85 86 var r0 *anycable.DisconnectResponse 87 if rf, ok := ret.Get(0).(func(context.Context, *anycable.DisconnectRequest, ...grpc.CallOption) *anycable.DisconnectResponse); ok { 88 r0 = rf(ctx, in, opts...) 89 } else { 90 if ret.Get(0) != nil { 91 r0 = ret.Get(0).(*anycable.DisconnectResponse) 92 } 93 } 94 95 var r1 error 96 if rf, ok := ret.Get(1).(func(context.Context, *anycable.DisconnectRequest, ...grpc.CallOption) error); ok { 97 r1 = rf(ctx, in, opts...) 98 } else { 99 r1 = ret.Error(1) 100 } 101 102 return r0, r1 103 }