go.uber.org/yarpc@v1.72.1/api/middleware/middlewaretest/router.go (about) 1 // Code generated by MockGen. DO NOT EDIT. 2 // Source: go.uber.org/yarpc/api/middleware (interfaces: Router,UnaryInbound,UnaryOutbound,OnewayInbound,OnewayOutbound,StreamInbound,StreamOutbound) 3 4 // Copyright (c) 2022 Uber Technologies, Inc. 5 // 6 // Permission is hereby granted, free of charge, to any person obtaining a copy 7 // of this software and associated documentation files (the "Software"), to deal 8 // in the Software without restriction, including without limitation the rights 9 // to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 10 // copies of the Software, and to permit persons to whom the Software is 11 // furnished to do so, subject to the following conditions: 12 // 13 // The above copyright notice and this permission notice shall be included in 14 // all copies or substantial portions of the Software. 15 // 16 // THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 17 // IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 18 // FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 19 // AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 20 // LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 21 // OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN 22 // THE SOFTWARE. 23 24 // Package middlewaretest is a generated GoMock package. 25 package middlewaretest 26 27 import ( 28 context "context" 29 gomock "github.com/golang/mock/gomock" 30 transport "go.uber.org/yarpc/api/transport" 31 reflect "reflect" 32 ) 33 34 // MockRouter is a mock of Router interface 35 type MockRouter struct { 36 ctrl *gomock.Controller 37 recorder *MockRouterMockRecorder 38 } 39 40 // MockRouterMockRecorder is the mock recorder for MockRouter 41 type MockRouterMockRecorder struct { 42 mock *MockRouter 43 } 44 45 // NewMockRouter creates a new mock instance 46 func NewMockRouter(ctrl *gomock.Controller) *MockRouter { 47 mock := &MockRouter{ctrl: ctrl} 48 mock.recorder = &MockRouterMockRecorder{mock} 49 return mock 50 } 51 52 // EXPECT returns an object that allows the caller to indicate expected use 53 func (m *MockRouter) EXPECT() *MockRouterMockRecorder { 54 return m.recorder 55 } 56 57 // Choose mocks base method 58 func (m *MockRouter) Choose(arg0 context.Context, arg1 *transport.Request, arg2 transport.Router) (transport.HandlerSpec, error) { 59 m.ctrl.T.Helper() 60 ret := m.ctrl.Call(m, "Choose", arg0, arg1, arg2) 61 ret0, _ := ret[0].(transport.HandlerSpec) 62 ret1, _ := ret[1].(error) 63 return ret0, ret1 64 } 65 66 // Choose indicates an expected call of Choose 67 func (mr *MockRouterMockRecorder) Choose(arg0, arg1, arg2 interface{}) *gomock.Call { 68 mr.mock.ctrl.T.Helper() 69 return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Choose", reflect.TypeOf((*MockRouter)(nil).Choose), arg0, arg1, arg2) 70 } 71 72 // Procedures mocks base method 73 func (m *MockRouter) Procedures(arg0 transport.Router) []transport.Procedure { 74 m.ctrl.T.Helper() 75 ret := m.ctrl.Call(m, "Procedures", arg0) 76 ret0, _ := ret[0].([]transport.Procedure) 77 return ret0 78 } 79 80 // Procedures indicates an expected call of Procedures 81 func (mr *MockRouterMockRecorder) Procedures(arg0 interface{}) *gomock.Call { 82 mr.mock.ctrl.T.Helper() 83 return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Procedures", reflect.TypeOf((*MockRouter)(nil).Procedures), arg0) 84 } 85 86 // MockUnaryInbound is a mock of UnaryInbound interface 87 type MockUnaryInbound struct { 88 ctrl *gomock.Controller 89 recorder *MockUnaryInboundMockRecorder 90 } 91 92 // MockUnaryInboundMockRecorder is the mock recorder for MockUnaryInbound 93 type MockUnaryInboundMockRecorder struct { 94 mock *MockUnaryInbound 95 } 96 97 // NewMockUnaryInbound creates a new mock instance 98 func NewMockUnaryInbound(ctrl *gomock.Controller) *MockUnaryInbound { 99 mock := &MockUnaryInbound{ctrl: ctrl} 100 mock.recorder = &MockUnaryInboundMockRecorder{mock} 101 return mock 102 } 103 104 // EXPECT returns an object that allows the caller to indicate expected use 105 func (m *MockUnaryInbound) EXPECT() *MockUnaryInboundMockRecorder { 106 return m.recorder 107 } 108 109 // Handle mocks base method 110 func (m *MockUnaryInbound) Handle(arg0 context.Context, arg1 *transport.Request, arg2 transport.ResponseWriter, arg3 transport.UnaryHandler) error { 111 m.ctrl.T.Helper() 112 ret := m.ctrl.Call(m, "Handle", arg0, arg1, arg2, arg3) 113 ret0, _ := ret[0].(error) 114 return ret0 115 } 116 117 // Handle indicates an expected call of Handle 118 func (mr *MockUnaryInboundMockRecorder) Handle(arg0, arg1, arg2, arg3 interface{}) *gomock.Call { 119 mr.mock.ctrl.T.Helper() 120 return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Handle", reflect.TypeOf((*MockUnaryInbound)(nil).Handle), arg0, arg1, arg2, arg3) 121 } 122 123 // MockUnaryOutbound is a mock of UnaryOutbound interface 124 type MockUnaryOutbound struct { 125 ctrl *gomock.Controller 126 recorder *MockUnaryOutboundMockRecorder 127 } 128 129 // MockUnaryOutboundMockRecorder is the mock recorder for MockUnaryOutbound 130 type MockUnaryOutboundMockRecorder struct { 131 mock *MockUnaryOutbound 132 } 133 134 // NewMockUnaryOutbound creates a new mock instance 135 func NewMockUnaryOutbound(ctrl *gomock.Controller) *MockUnaryOutbound { 136 mock := &MockUnaryOutbound{ctrl: ctrl} 137 mock.recorder = &MockUnaryOutboundMockRecorder{mock} 138 return mock 139 } 140 141 // EXPECT returns an object that allows the caller to indicate expected use 142 func (m *MockUnaryOutbound) EXPECT() *MockUnaryOutboundMockRecorder { 143 return m.recorder 144 } 145 146 // Call mocks base method 147 func (m *MockUnaryOutbound) Call(arg0 context.Context, arg1 *transport.Request, arg2 transport.UnaryOutbound) (*transport.Response, error) { 148 m.ctrl.T.Helper() 149 ret := m.ctrl.Call(m, "Call", arg0, arg1, arg2) 150 ret0, _ := ret[0].(*transport.Response) 151 ret1, _ := ret[1].(error) 152 return ret0, ret1 153 } 154 155 // Call indicates an expected call of Call 156 func (mr *MockUnaryOutboundMockRecorder) Call(arg0, arg1, arg2 interface{}) *gomock.Call { 157 mr.mock.ctrl.T.Helper() 158 return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Call", reflect.TypeOf((*MockUnaryOutbound)(nil).Call), arg0, arg1, arg2) 159 } 160 161 // MockOnewayInbound is a mock of OnewayInbound interface 162 type MockOnewayInbound struct { 163 ctrl *gomock.Controller 164 recorder *MockOnewayInboundMockRecorder 165 } 166 167 // MockOnewayInboundMockRecorder is the mock recorder for MockOnewayInbound 168 type MockOnewayInboundMockRecorder struct { 169 mock *MockOnewayInbound 170 } 171 172 // NewMockOnewayInbound creates a new mock instance 173 func NewMockOnewayInbound(ctrl *gomock.Controller) *MockOnewayInbound { 174 mock := &MockOnewayInbound{ctrl: ctrl} 175 mock.recorder = &MockOnewayInboundMockRecorder{mock} 176 return mock 177 } 178 179 // EXPECT returns an object that allows the caller to indicate expected use 180 func (m *MockOnewayInbound) EXPECT() *MockOnewayInboundMockRecorder { 181 return m.recorder 182 } 183 184 // HandleOneway mocks base method 185 func (m *MockOnewayInbound) HandleOneway(arg0 context.Context, arg1 *transport.Request, arg2 transport.OnewayHandler) error { 186 m.ctrl.T.Helper() 187 ret := m.ctrl.Call(m, "HandleOneway", arg0, arg1, arg2) 188 ret0, _ := ret[0].(error) 189 return ret0 190 } 191 192 // HandleOneway indicates an expected call of HandleOneway 193 func (mr *MockOnewayInboundMockRecorder) HandleOneway(arg0, arg1, arg2 interface{}) *gomock.Call { 194 mr.mock.ctrl.T.Helper() 195 return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "HandleOneway", reflect.TypeOf((*MockOnewayInbound)(nil).HandleOneway), arg0, arg1, arg2) 196 } 197 198 // MockOnewayOutbound is a mock of OnewayOutbound interface 199 type MockOnewayOutbound struct { 200 ctrl *gomock.Controller 201 recorder *MockOnewayOutboundMockRecorder 202 } 203 204 // MockOnewayOutboundMockRecorder is the mock recorder for MockOnewayOutbound 205 type MockOnewayOutboundMockRecorder struct { 206 mock *MockOnewayOutbound 207 } 208 209 // NewMockOnewayOutbound creates a new mock instance 210 func NewMockOnewayOutbound(ctrl *gomock.Controller) *MockOnewayOutbound { 211 mock := &MockOnewayOutbound{ctrl: ctrl} 212 mock.recorder = &MockOnewayOutboundMockRecorder{mock} 213 return mock 214 } 215 216 // EXPECT returns an object that allows the caller to indicate expected use 217 func (m *MockOnewayOutbound) EXPECT() *MockOnewayOutboundMockRecorder { 218 return m.recorder 219 } 220 221 // CallOneway mocks base method 222 func (m *MockOnewayOutbound) CallOneway(arg0 context.Context, arg1 *transport.Request, arg2 transport.OnewayOutbound) (transport.Ack, error) { 223 m.ctrl.T.Helper() 224 ret := m.ctrl.Call(m, "CallOneway", arg0, arg1, arg2) 225 ret0, _ := ret[0].(transport.Ack) 226 ret1, _ := ret[1].(error) 227 return ret0, ret1 228 } 229 230 // CallOneway indicates an expected call of CallOneway 231 func (mr *MockOnewayOutboundMockRecorder) CallOneway(arg0, arg1, arg2 interface{}) *gomock.Call { 232 mr.mock.ctrl.T.Helper() 233 return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "CallOneway", reflect.TypeOf((*MockOnewayOutbound)(nil).CallOneway), arg0, arg1, arg2) 234 } 235 236 // MockStreamInbound is a mock of StreamInbound interface 237 type MockStreamInbound struct { 238 ctrl *gomock.Controller 239 recorder *MockStreamInboundMockRecorder 240 } 241 242 // MockStreamInboundMockRecorder is the mock recorder for MockStreamInbound 243 type MockStreamInboundMockRecorder struct { 244 mock *MockStreamInbound 245 } 246 247 // NewMockStreamInbound creates a new mock instance 248 func NewMockStreamInbound(ctrl *gomock.Controller) *MockStreamInbound { 249 mock := &MockStreamInbound{ctrl: ctrl} 250 mock.recorder = &MockStreamInboundMockRecorder{mock} 251 return mock 252 } 253 254 // EXPECT returns an object that allows the caller to indicate expected use 255 func (m *MockStreamInbound) EXPECT() *MockStreamInboundMockRecorder { 256 return m.recorder 257 } 258 259 // HandleStream mocks base method 260 func (m *MockStreamInbound) HandleStream(arg0 *transport.ServerStream, arg1 transport.StreamHandler) error { 261 m.ctrl.T.Helper() 262 ret := m.ctrl.Call(m, "HandleStream", arg0, arg1) 263 ret0, _ := ret[0].(error) 264 return ret0 265 } 266 267 // HandleStream indicates an expected call of HandleStream 268 func (mr *MockStreamInboundMockRecorder) HandleStream(arg0, arg1 interface{}) *gomock.Call { 269 mr.mock.ctrl.T.Helper() 270 return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "HandleStream", reflect.TypeOf((*MockStreamInbound)(nil).HandleStream), arg0, arg1) 271 } 272 273 // MockStreamOutbound is a mock of StreamOutbound interface 274 type MockStreamOutbound struct { 275 ctrl *gomock.Controller 276 recorder *MockStreamOutboundMockRecorder 277 } 278 279 // MockStreamOutboundMockRecorder is the mock recorder for MockStreamOutbound 280 type MockStreamOutboundMockRecorder struct { 281 mock *MockStreamOutbound 282 } 283 284 // NewMockStreamOutbound creates a new mock instance 285 func NewMockStreamOutbound(ctrl *gomock.Controller) *MockStreamOutbound { 286 mock := &MockStreamOutbound{ctrl: ctrl} 287 mock.recorder = &MockStreamOutboundMockRecorder{mock} 288 return mock 289 } 290 291 // EXPECT returns an object that allows the caller to indicate expected use 292 func (m *MockStreamOutbound) EXPECT() *MockStreamOutboundMockRecorder { 293 return m.recorder 294 } 295 296 // CallStream mocks base method 297 func (m *MockStreamOutbound) CallStream(arg0 context.Context, arg1 *transport.StreamRequest, arg2 transport.StreamOutbound) (*transport.ClientStream, error) { 298 m.ctrl.T.Helper() 299 ret := m.ctrl.Call(m, "CallStream", arg0, arg1, arg2) 300 ret0, _ := ret[0].(*transport.ClientStream) 301 ret1, _ := ret[1].(error) 302 return ret0, ret1 303 } 304 305 // CallStream indicates an expected call of CallStream 306 func (mr *MockStreamOutboundMockRecorder) CallStream(arg0, arg1, arg2 interface{}) *gomock.Call { 307 mr.mock.ctrl.T.Helper() 308 return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "CallStream", reflect.TypeOf((*MockStreamOutbound)(nil).CallStream), arg0, arg1, arg2) 309 }