github.com/nyan233/littlerpc@v0.4.6-0.20230316182519-0c8d5c48abaf/cmd/lrpcurl/mocks/LittleRpcReflectionProxy.go (about) 1 // Code generated by mockery v2.15.0. DO NOT EDIT. 2 3 package mocks 4 5 import ( 6 context "context" 7 8 client "github.com/nyan233/littlerpc/core/client" 9 10 mock "github.com/stretchr/testify/mock" 11 12 server "github.com/nyan233/littlerpc/core/server" 13 ) 14 15 // LittleRpcReflectionProxy is an autogenerated mock type for the LittleRpcReflectionProxy type 16 type LittleRpcReflectionProxy struct { 17 mock.Mock 18 } 19 20 // AllCodec provides a mock function with given fields: ctx, opts 21 func (_m *LittleRpcReflectionProxy) AllCodec(ctx context.Context, opts ...client.CallOption) ([]string, error) { 22 _va := make([]interface{}, len(opts)) 23 for _i := range opts { 24 _va[_i] = opts[_i] 25 } 26 var _ca []interface{} 27 _ca = append(_ca, ctx) 28 _ca = append(_ca, _va...) 29 ret := _m.Called(_ca...) 30 31 var r0 []string 32 if rf, ok := ret.Get(0).(func(context.Context, ...client.CallOption) []string); ok { 33 r0 = rf(ctx, opts...) 34 } else { 35 if ret.Get(0) != nil { 36 r0 = ret.Get(0).([]string) 37 } 38 } 39 40 var r1 error 41 if rf, ok := ret.Get(1).(func(context.Context, ...client.CallOption) error); ok { 42 r1 = rf(ctx, opts...) 43 } else { 44 r1 = ret.Error(1) 45 } 46 47 return r0, r1 48 } 49 50 // AllInstance provides a mock function with given fields: ctx, opts 51 func (_m *LittleRpcReflectionProxy) AllInstance(ctx context.Context, opts ...client.CallOption) (map[string]string, error) { 52 _va := make([]interface{}, len(opts)) 53 for _i := range opts { 54 _va[_i] = opts[_i] 55 } 56 var _ca []interface{} 57 _ca = append(_ca, ctx) 58 _ca = append(_ca, _va...) 59 ret := _m.Called(_ca...) 60 61 var r0 map[string]string 62 if rf, ok := ret.Get(0).(func(context.Context, ...client.CallOption) map[string]string); ok { 63 r0 = rf(ctx, opts...) 64 } else { 65 if ret.Get(0) != nil { 66 r0 = ret.Get(0).(map[string]string) 67 } 68 } 69 70 var r1 error 71 if rf, ok := ret.Get(1).(func(context.Context, ...client.CallOption) error); ok { 72 r1 = rf(ctx, opts...) 73 } else { 74 r1 = ret.Error(1) 75 } 76 77 return r0, r1 78 } 79 80 // AllPacker provides a mock function with given fields: ctx, opts 81 func (_m *LittleRpcReflectionProxy) AllPacker(ctx context.Context, opts ...client.CallOption) ([]string, error) { 82 _va := make([]interface{}, len(opts)) 83 for _i := range opts { 84 _va[_i] = opts[_i] 85 } 86 var _ca []interface{} 87 _ca = append(_ca, ctx) 88 _ca = append(_ca, _va...) 89 ret := _m.Called(_ca...) 90 91 var r0 []string 92 if rf, ok := ret.Get(0).(func(context.Context, ...client.CallOption) []string); ok { 93 r0 = rf(ctx, opts...) 94 } else { 95 if ret.Get(0) != nil { 96 r0 = ret.Get(0).([]string) 97 } 98 } 99 100 var r1 error 101 if rf, ok := ret.Get(1).(func(context.Context, ...client.CallOption) error); ok { 102 r1 = rf(ctx, opts...) 103 } else { 104 r1 = ret.Error(1) 105 } 106 107 return r0, r1 108 } 109 110 // MethodArgumentType provides a mock function with given fields: ctx, serviceName, opts 111 func (_m *LittleRpcReflectionProxy) MethodArgumentType(ctx context.Context, serviceName string, opts ...client.CallOption) ([]server.ArgumentType, error) { 112 _va := make([]interface{}, len(opts)) 113 for _i := range opts { 114 _va[_i] = opts[_i] 115 } 116 var _ca []interface{} 117 _ca = append(_ca, ctx, serviceName) 118 _ca = append(_ca, _va...) 119 ret := _m.Called(_ca...) 120 121 var r0 []server.ArgumentType 122 if rf, ok := ret.Get(0).(func(context.Context, string, ...client.CallOption) []server.ArgumentType); ok { 123 r0 = rf(ctx, serviceName, opts...) 124 } else { 125 if ret.Get(0) != nil { 126 r0 = ret.Get(0).([]server.ArgumentType) 127 } 128 } 129 130 var r1 error 131 if rf, ok := ret.Get(1).(func(context.Context, string, ...client.CallOption) error); ok { 132 r1 = rf(ctx, serviceName, opts...) 133 } else { 134 r1 = ret.Error(1) 135 } 136 137 return r0, r1 138 } 139 140 // MethodTable provides a mock function with given fields: ctx, sourceName, opts 141 func (_m *LittleRpcReflectionProxy) MethodTable(ctx context.Context, sourceName string, opts ...client.CallOption) (*server.MethodTable, error) { 142 _va := make([]interface{}, len(opts)) 143 for _i := range opts { 144 _va[_i] = opts[_i] 145 } 146 var _ca []interface{} 147 _ca = append(_ca, ctx, sourceName) 148 _ca = append(_ca, _va...) 149 ret := _m.Called(_ca...) 150 151 var r0 *server.MethodTable 152 if rf, ok := ret.Get(0).(func(context.Context, string, ...client.CallOption) *server.MethodTable); ok { 153 r0 = rf(ctx, sourceName, opts...) 154 } else { 155 if ret.Get(0) != nil { 156 r0 = ret.Get(0).(*server.MethodTable) 157 } 158 } 159 160 var r1 error 161 if rf, ok := ret.Get(1).(func(context.Context, string, ...client.CallOption) error); ok { 162 r1 = rf(ctx, sourceName, opts...) 163 } else { 164 r1 = ret.Error(1) 165 } 166 167 return r0, r1 168 } 169 170 type mockConstructorTestingTNewLittleRpcReflectionProxy interface { 171 mock.TestingT 172 Cleanup(func()) 173 } 174 175 // NewLittleRpcReflectionProxy creates a new instance of LittleRpcReflectionProxy. It also registers a testing interface on the mock and a cleanup function to assert the mocks expectations. 176 func NewLittleRpcReflectionProxy(t mockConstructorTestingTNewLittleRpcReflectionProxy) *LittleRpcReflectionProxy { 177 mock := &LittleRpcReflectionProxy{} 178 mock.Mock.Test(t) 179 180 t.Cleanup(func() { mock.AssertExpectations(t) }) 181 182 return mock 183 }