github.com/TugasAkhir-QUIC/quic-go@v0.0.2-0.20240215011318-d20e25a9054c/mock_quic_conn_test.go (about) 1 // Code generated by MockGen. DO NOT EDIT. 2 // Source: github.com/TugasAkhir-QUIC/quic-go (interfaces: QUICConn) 3 // 4 // Generated by this command: 5 // 6 // mockgen.exe -typed -build_flags=-tags=gomock -package quic -self_package github.com/TugasAkhir-QUIC/quic-go -destination mock_quic_conn_test.go github.com/TugasAkhir-QUIC/quic-go QUICConn 7 // 8 // Package quic is a generated GoMock package. 9 package quic 10 11 import ( 12 context "context" 13 net "net" 14 reflect "reflect" 15 16 protocol "github.com/TugasAkhir-QUIC/quic-go/internal/protocol" 17 qerr "github.com/TugasAkhir-QUIC/quic-go/internal/qerr" 18 gomock "go.uber.org/mock/gomock" 19 ) 20 21 // MockQUICConn is a mock of QUICConn interface. 22 type MockQUICConn struct { 23 ctrl *gomock.Controller 24 recorder *MockQUICConnMockRecorder 25 } 26 27 // MockQUICConnMockRecorder is the mock recorder for MockQUICConn. 28 type MockQUICConnMockRecorder struct { 29 mock *MockQUICConn 30 } 31 32 // NewMockQUICConn creates a new mock instance. 33 func NewMockQUICConn(ctrl *gomock.Controller) *MockQUICConn { 34 mock := &MockQUICConn{ctrl: ctrl} 35 mock.recorder = &MockQUICConnMockRecorder{mock} 36 return mock 37 } 38 39 // EXPECT returns an object that allows the caller to indicate expected use. 40 func (m *MockQUICConn) EXPECT() *MockQUICConnMockRecorder { 41 return m.recorder 42 } 43 44 // AcceptStream mocks base method. 45 func (m *MockQUICConn) AcceptStream(arg0 context.Context) (Stream, error) { 46 m.ctrl.T.Helper() 47 ret := m.ctrl.Call(m, "AcceptStream", arg0) 48 ret0, _ := ret[0].(Stream) 49 ret1, _ := ret[1].(error) 50 return ret0, ret1 51 } 52 53 // AcceptStream indicates an expected call of AcceptStream. 54 func (mr *MockQUICConnMockRecorder) AcceptStream(arg0 any) *QUICConnAcceptStreamCall { 55 mr.mock.ctrl.T.Helper() 56 call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "AcceptStream", reflect.TypeOf((*MockQUICConn)(nil).AcceptStream), arg0) 57 return &QUICConnAcceptStreamCall{Call: call} 58 } 59 60 // QUICConnAcceptStreamCall wrap *gomock.Call 61 type QUICConnAcceptStreamCall struct { 62 *gomock.Call 63 } 64 65 // Return rewrite *gomock.Call.Return 66 func (c *QUICConnAcceptStreamCall) Return(arg0 Stream, arg1 error) *QUICConnAcceptStreamCall { 67 c.Call = c.Call.Return(arg0, arg1) 68 return c 69 } 70 71 // Do rewrite *gomock.Call.Do 72 func (c *QUICConnAcceptStreamCall) Do(f func(context.Context) (Stream, error)) *QUICConnAcceptStreamCall { 73 c.Call = c.Call.Do(f) 74 return c 75 } 76 77 // DoAndReturn rewrite *gomock.Call.DoAndReturn 78 func (c *QUICConnAcceptStreamCall) DoAndReturn(f func(context.Context) (Stream, error)) *QUICConnAcceptStreamCall { 79 c.Call = c.Call.DoAndReturn(f) 80 return c 81 } 82 83 // AcceptUniStream mocks base method. 84 func (m *MockQUICConn) AcceptUniStream(arg0 context.Context) (ReceiveStream, error) { 85 m.ctrl.T.Helper() 86 ret := m.ctrl.Call(m, "AcceptUniStream", arg0) 87 ret0, _ := ret[0].(ReceiveStream) 88 ret1, _ := ret[1].(error) 89 return ret0, ret1 90 } 91 92 // AcceptUniStream indicates an expected call of AcceptUniStream. 93 func (mr *MockQUICConnMockRecorder) AcceptUniStream(arg0 any) *QUICConnAcceptUniStreamCall { 94 mr.mock.ctrl.T.Helper() 95 call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "AcceptUniStream", reflect.TypeOf((*MockQUICConn)(nil).AcceptUniStream), arg0) 96 return &QUICConnAcceptUniStreamCall{Call: call} 97 } 98 99 // QUICConnAcceptUniStreamCall wrap *gomock.Call 100 type QUICConnAcceptUniStreamCall struct { 101 *gomock.Call 102 } 103 104 // Return rewrite *gomock.Call.Return 105 func (c *QUICConnAcceptUniStreamCall) Return(arg0 ReceiveStream, arg1 error) *QUICConnAcceptUniStreamCall { 106 c.Call = c.Call.Return(arg0, arg1) 107 return c 108 } 109 110 // Do rewrite *gomock.Call.Do 111 func (c *QUICConnAcceptUniStreamCall) Do(f func(context.Context) (ReceiveStream, error)) *QUICConnAcceptUniStreamCall { 112 c.Call = c.Call.Do(f) 113 return c 114 } 115 116 // DoAndReturn rewrite *gomock.Call.DoAndReturn 117 func (c *QUICConnAcceptUniStreamCall) DoAndReturn(f func(context.Context) (ReceiveStream, error)) *QUICConnAcceptUniStreamCall { 118 c.Call = c.Call.DoAndReturn(f) 119 return c 120 } 121 122 // CloseWithError mocks base method. 123 func (m *MockQUICConn) CloseWithError(arg0 qerr.ApplicationErrorCode, arg1 string) error { 124 m.ctrl.T.Helper() 125 ret := m.ctrl.Call(m, "CloseWithError", arg0, arg1) 126 ret0, _ := ret[0].(error) 127 return ret0 128 } 129 130 // CloseWithError indicates an expected call of CloseWithError. 131 func (mr *MockQUICConnMockRecorder) CloseWithError(arg0, arg1 any) *QUICConnCloseWithErrorCall { 132 mr.mock.ctrl.T.Helper() 133 call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "CloseWithError", reflect.TypeOf((*MockQUICConn)(nil).CloseWithError), arg0, arg1) 134 return &QUICConnCloseWithErrorCall{Call: call} 135 } 136 137 // QUICConnCloseWithErrorCall wrap *gomock.Call 138 type QUICConnCloseWithErrorCall struct { 139 *gomock.Call 140 } 141 142 // Return rewrite *gomock.Call.Return 143 func (c *QUICConnCloseWithErrorCall) Return(arg0 error) *QUICConnCloseWithErrorCall { 144 c.Call = c.Call.Return(arg0) 145 return c 146 } 147 148 // Do rewrite *gomock.Call.Do 149 func (c *QUICConnCloseWithErrorCall) Do(f func(qerr.ApplicationErrorCode, string) error) *QUICConnCloseWithErrorCall { 150 c.Call = c.Call.Do(f) 151 return c 152 } 153 154 // DoAndReturn rewrite *gomock.Call.DoAndReturn 155 func (c *QUICConnCloseWithErrorCall) DoAndReturn(f func(qerr.ApplicationErrorCode, string) error) *QUICConnCloseWithErrorCall { 156 c.Call = c.Call.DoAndReturn(f) 157 return c 158 } 159 160 // ConnectionState mocks base method. 161 func (m *MockQUICConn) ConnectionState() ConnectionState { 162 m.ctrl.T.Helper() 163 ret := m.ctrl.Call(m, "ConnectionState") 164 ret0, _ := ret[0].(ConnectionState) 165 return ret0 166 } 167 168 // ConnectionState indicates an expected call of ConnectionState. 169 func (mr *MockQUICConnMockRecorder) ConnectionState() *QUICConnConnectionStateCall { 170 mr.mock.ctrl.T.Helper() 171 call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "ConnectionState", reflect.TypeOf((*MockQUICConn)(nil).ConnectionState)) 172 return &QUICConnConnectionStateCall{Call: call} 173 } 174 175 // QUICConnConnectionStateCall wrap *gomock.Call 176 type QUICConnConnectionStateCall struct { 177 *gomock.Call 178 } 179 180 // Return rewrite *gomock.Call.Return 181 func (c *QUICConnConnectionStateCall) Return(arg0 ConnectionState) *QUICConnConnectionStateCall { 182 c.Call = c.Call.Return(arg0) 183 return c 184 } 185 186 // Do rewrite *gomock.Call.Do 187 func (c *QUICConnConnectionStateCall) Do(f func() ConnectionState) *QUICConnConnectionStateCall { 188 c.Call = c.Call.Do(f) 189 return c 190 } 191 192 // DoAndReturn rewrite *gomock.Call.DoAndReturn 193 func (c *QUICConnConnectionStateCall) DoAndReturn(f func() ConnectionState) *QUICConnConnectionStateCall { 194 c.Call = c.Call.DoAndReturn(f) 195 return c 196 } 197 198 // Context mocks base method. 199 func (m *MockQUICConn) Context() context.Context { 200 m.ctrl.T.Helper() 201 ret := m.ctrl.Call(m, "Context") 202 ret0, _ := ret[0].(context.Context) 203 return ret0 204 } 205 206 // Context indicates an expected call of Context. 207 func (mr *MockQUICConnMockRecorder) Context() *QUICConnContextCall { 208 mr.mock.ctrl.T.Helper() 209 call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Context", reflect.TypeOf((*MockQUICConn)(nil).Context)) 210 return &QUICConnContextCall{Call: call} 211 } 212 213 // QUICConnContextCall wrap *gomock.Call 214 type QUICConnContextCall struct { 215 *gomock.Call 216 } 217 218 // Return rewrite *gomock.Call.Return 219 func (c *QUICConnContextCall) Return(arg0 context.Context) *QUICConnContextCall { 220 c.Call = c.Call.Return(arg0) 221 return c 222 } 223 224 // Do rewrite *gomock.Call.Do 225 func (c *QUICConnContextCall) Do(f func() context.Context) *QUICConnContextCall { 226 c.Call = c.Call.Do(f) 227 return c 228 } 229 230 // DoAndReturn rewrite *gomock.Call.DoAndReturn 231 func (c *QUICConnContextCall) DoAndReturn(f func() context.Context) *QUICConnContextCall { 232 c.Call = c.Call.DoAndReturn(f) 233 return c 234 } 235 236 // GetMaxBandwidth mocks base method. 237 func (m *MockQUICConn) GetMaxBandwidth() uint64 { 238 m.ctrl.T.Helper() 239 ret := m.ctrl.Call(m, "GetMaxBandwidth") 240 ret0, _ := ret[0].(uint64) 241 return ret0 242 } 243 244 // GetMaxBandwidth indicates an expected call of GetMaxBandwidth. 245 func (mr *MockQUICConnMockRecorder) GetMaxBandwidth() *QUICConnGetMaxBandwidthCall { 246 mr.mock.ctrl.T.Helper() 247 call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "GetMaxBandwidth", reflect.TypeOf((*MockQUICConn)(nil).GetMaxBandwidth)) 248 return &QUICConnGetMaxBandwidthCall{Call: call} 249 } 250 251 // QUICConnGetMaxBandwidthCall wrap *gomock.Call 252 type QUICConnGetMaxBandwidthCall struct { 253 *gomock.Call 254 } 255 256 // Return rewrite *gomock.Call.Return 257 func (c *QUICConnGetMaxBandwidthCall) Return(arg0 uint64) *QUICConnGetMaxBandwidthCall { 258 c.Call = c.Call.Return(arg0) 259 return c 260 } 261 262 // Do rewrite *gomock.Call.Do 263 func (c *QUICConnGetMaxBandwidthCall) Do(f func() uint64) *QUICConnGetMaxBandwidthCall { 264 c.Call = c.Call.Do(f) 265 return c 266 } 267 268 // DoAndReturn rewrite *gomock.Call.DoAndReturn 269 func (c *QUICConnGetMaxBandwidthCall) DoAndReturn(f func() uint64) *QUICConnGetMaxBandwidthCall { 270 c.Call = c.Call.DoAndReturn(f) 271 return c 272 } 273 274 // GetVersion mocks base method. 275 func (m *MockQUICConn) GetVersion() protocol.Version { 276 m.ctrl.T.Helper() 277 ret := m.ctrl.Call(m, "GetVersion") 278 ret0, _ := ret[0].(protocol.Version) 279 return ret0 280 } 281 282 // GetVersion indicates an expected call of GetVersion. 283 func (mr *MockQUICConnMockRecorder) GetVersion() *QUICConnGetVersionCall { 284 mr.mock.ctrl.T.Helper() 285 call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "GetVersion", reflect.TypeOf((*MockQUICConn)(nil).GetVersion)) 286 return &QUICConnGetVersionCall{Call: call} 287 } 288 289 // QUICConnGetVersionCall wrap *gomock.Call 290 type QUICConnGetVersionCall struct { 291 *gomock.Call 292 } 293 294 // Return rewrite *gomock.Call.Return 295 func (c *QUICConnGetVersionCall) Return(arg0 protocol.Version) *QUICConnGetVersionCall { 296 c.Call = c.Call.Return(arg0) 297 return c 298 } 299 300 // Do rewrite *gomock.Call.Do 301 func (c *QUICConnGetVersionCall) Do(f func() protocol.Version) *QUICConnGetVersionCall { 302 c.Call = c.Call.Do(f) 303 return c 304 } 305 306 // DoAndReturn rewrite *gomock.Call.DoAndReturn 307 func (c *QUICConnGetVersionCall) DoAndReturn(f func() protocol.Version) *QUICConnGetVersionCall { 308 c.Call = c.Call.DoAndReturn(f) 309 return c 310 } 311 312 // HandshakeComplete mocks base method. 313 func (m *MockQUICConn) HandshakeComplete() <-chan struct{} { 314 m.ctrl.T.Helper() 315 ret := m.ctrl.Call(m, "HandshakeComplete") 316 ret0, _ := ret[0].(<-chan struct{}) 317 return ret0 318 } 319 320 // HandshakeComplete indicates an expected call of HandshakeComplete. 321 func (mr *MockQUICConnMockRecorder) HandshakeComplete() *QUICConnHandshakeCompleteCall { 322 mr.mock.ctrl.T.Helper() 323 call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "HandshakeComplete", reflect.TypeOf((*MockQUICConn)(nil).HandshakeComplete)) 324 return &QUICConnHandshakeCompleteCall{Call: call} 325 } 326 327 // QUICConnHandshakeCompleteCall wrap *gomock.Call 328 type QUICConnHandshakeCompleteCall struct { 329 *gomock.Call 330 } 331 332 // Return rewrite *gomock.Call.Return 333 func (c *QUICConnHandshakeCompleteCall) Return(arg0 <-chan struct{}) *QUICConnHandshakeCompleteCall { 334 c.Call = c.Call.Return(arg0) 335 return c 336 } 337 338 // Do rewrite *gomock.Call.Do 339 func (c *QUICConnHandshakeCompleteCall) Do(f func() <-chan struct{}) *QUICConnHandshakeCompleteCall { 340 c.Call = c.Call.Do(f) 341 return c 342 } 343 344 // DoAndReturn rewrite *gomock.Call.DoAndReturn 345 func (c *QUICConnHandshakeCompleteCall) DoAndReturn(f func() <-chan struct{}) *QUICConnHandshakeCompleteCall { 346 c.Call = c.Call.DoAndReturn(f) 347 return c 348 } 349 350 // LocalAddr mocks base method. 351 func (m *MockQUICConn) LocalAddr() net.Addr { 352 m.ctrl.T.Helper() 353 ret := m.ctrl.Call(m, "LocalAddr") 354 ret0, _ := ret[0].(net.Addr) 355 return ret0 356 } 357 358 // LocalAddr indicates an expected call of LocalAddr. 359 func (mr *MockQUICConnMockRecorder) LocalAddr() *QUICConnLocalAddrCall { 360 mr.mock.ctrl.T.Helper() 361 call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "LocalAddr", reflect.TypeOf((*MockQUICConn)(nil).LocalAddr)) 362 return &QUICConnLocalAddrCall{Call: call} 363 } 364 365 // QUICConnLocalAddrCall wrap *gomock.Call 366 type QUICConnLocalAddrCall struct { 367 *gomock.Call 368 } 369 370 // Return rewrite *gomock.Call.Return 371 func (c *QUICConnLocalAddrCall) Return(arg0 net.Addr) *QUICConnLocalAddrCall { 372 c.Call = c.Call.Return(arg0) 373 return c 374 } 375 376 // Do rewrite *gomock.Call.Do 377 func (c *QUICConnLocalAddrCall) Do(f func() net.Addr) *QUICConnLocalAddrCall { 378 c.Call = c.Call.Do(f) 379 return c 380 } 381 382 // DoAndReturn rewrite *gomock.Call.DoAndReturn 383 func (c *QUICConnLocalAddrCall) DoAndReturn(f func() net.Addr) *QUICConnLocalAddrCall { 384 c.Call = c.Call.DoAndReturn(f) 385 return c 386 } 387 388 // NextConnection mocks base method. 389 func (m *MockQUICConn) NextConnection() Connection { 390 m.ctrl.T.Helper() 391 ret := m.ctrl.Call(m, "NextConnection") 392 ret0, _ := ret[0].(Connection) 393 return ret0 394 } 395 396 // NextConnection indicates an expected call of NextConnection. 397 func (mr *MockQUICConnMockRecorder) NextConnection() *QUICConnNextConnectionCall { 398 mr.mock.ctrl.T.Helper() 399 call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "NextConnection", reflect.TypeOf((*MockQUICConn)(nil).NextConnection)) 400 return &QUICConnNextConnectionCall{Call: call} 401 } 402 403 // QUICConnNextConnectionCall wrap *gomock.Call 404 type QUICConnNextConnectionCall struct { 405 *gomock.Call 406 } 407 408 // Return rewrite *gomock.Call.Return 409 func (c *QUICConnNextConnectionCall) Return(arg0 Connection) *QUICConnNextConnectionCall { 410 c.Call = c.Call.Return(arg0) 411 return c 412 } 413 414 // Do rewrite *gomock.Call.Do 415 func (c *QUICConnNextConnectionCall) Do(f func() Connection) *QUICConnNextConnectionCall { 416 c.Call = c.Call.Do(f) 417 return c 418 } 419 420 // DoAndReturn rewrite *gomock.Call.DoAndReturn 421 func (c *QUICConnNextConnectionCall) DoAndReturn(f func() Connection) *QUICConnNextConnectionCall { 422 c.Call = c.Call.DoAndReturn(f) 423 return c 424 } 425 426 // OpenStream mocks base method. 427 func (m *MockQUICConn) OpenStream() (Stream, error) { 428 m.ctrl.T.Helper() 429 ret := m.ctrl.Call(m, "OpenStream") 430 ret0, _ := ret[0].(Stream) 431 ret1, _ := ret[1].(error) 432 return ret0, ret1 433 } 434 435 // OpenStream indicates an expected call of OpenStream. 436 func (mr *MockQUICConnMockRecorder) OpenStream() *QUICConnOpenStreamCall { 437 mr.mock.ctrl.T.Helper() 438 call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "OpenStream", reflect.TypeOf((*MockQUICConn)(nil).OpenStream)) 439 return &QUICConnOpenStreamCall{Call: call} 440 } 441 442 // QUICConnOpenStreamCall wrap *gomock.Call 443 type QUICConnOpenStreamCall struct { 444 *gomock.Call 445 } 446 447 // Return rewrite *gomock.Call.Return 448 func (c *QUICConnOpenStreamCall) Return(arg0 Stream, arg1 error) *QUICConnOpenStreamCall { 449 c.Call = c.Call.Return(arg0, arg1) 450 return c 451 } 452 453 // Do rewrite *gomock.Call.Do 454 func (c *QUICConnOpenStreamCall) Do(f func() (Stream, error)) *QUICConnOpenStreamCall { 455 c.Call = c.Call.Do(f) 456 return c 457 } 458 459 // DoAndReturn rewrite *gomock.Call.DoAndReturn 460 func (c *QUICConnOpenStreamCall) DoAndReturn(f func() (Stream, error)) *QUICConnOpenStreamCall { 461 c.Call = c.Call.DoAndReturn(f) 462 return c 463 } 464 465 // OpenStreamSync mocks base method. 466 func (m *MockQUICConn) OpenStreamSync(arg0 context.Context) (Stream, error) { 467 m.ctrl.T.Helper() 468 ret := m.ctrl.Call(m, "OpenStreamSync", arg0) 469 ret0, _ := ret[0].(Stream) 470 ret1, _ := ret[1].(error) 471 return ret0, ret1 472 } 473 474 // OpenStreamSync indicates an expected call of OpenStreamSync. 475 func (mr *MockQUICConnMockRecorder) OpenStreamSync(arg0 any) *QUICConnOpenStreamSyncCall { 476 mr.mock.ctrl.T.Helper() 477 call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "OpenStreamSync", reflect.TypeOf((*MockQUICConn)(nil).OpenStreamSync), arg0) 478 return &QUICConnOpenStreamSyncCall{Call: call} 479 } 480 481 // QUICConnOpenStreamSyncCall wrap *gomock.Call 482 type QUICConnOpenStreamSyncCall struct { 483 *gomock.Call 484 } 485 486 // Return rewrite *gomock.Call.Return 487 func (c *QUICConnOpenStreamSyncCall) Return(arg0 Stream, arg1 error) *QUICConnOpenStreamSyncCall { 488 c.Call = c.Call.Return(arg0, arg1) 489 return c 490 } 491 492 // Do rewrite *gomock.Call.Do 493 func (c *QUICConnOpenStreamSyncCall) Do(f func(context.Context) (Stream, error)) *QUICConnOpenStreamSyncCall { 494 c.Call = c.Call.Do(f) 495 return c 496 } 497 498 // DoAndReturn rewrite *gomock.Call.DoAndReturn 499 func (c *QUICConnOpenStreamSyncCall) DoAndReturn(f func(context.Context) (Stream, error)) *QUICConnOpenStreamSyncCall { 500 c.Call = c.Call.DoAndReturn(f) 501 return c 502 } 503 504 // OpenUniStream mocks base method. 505 func (m *MockQUICConn) OpenUniStream() (SendStream, error) { 506 m.ctrl.T.Helper() 507 ret := m.ctrl.Call(m, "OpenUniStream") 508 ret0, _ := ret[0].(SendStream) 509 ret1, _ := ret[1].(error) 510 return ret0, ret1 511 } 512 513 // OpenUniStream indicates an expected call of OpenUniStream. 514 func (mr *MockQUICConnMockRecorder) OpenUniStream() *QUICConnOpenUniStreamCall { 515 mr.mock.ctrl.T.Helper() 516 call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "OpenUniStream", reflect.TypeOf((*MockQUICConn)(nil).OpenUniStream)) 517 return &QUICConnOpenUniStreamCall{Call: call} 518 } 519 520 // QUICConnOpenUniStreamCall wrap *gomock.Call 521 type QUICConnOpenUniStreamCall struct { 522 *gomock.Call 523 } 524 525 // Return rewrite *gomock.Call.Return 526 func (c *QUICConnOpenUniStreamCall) Return(arg0 SendStream, arg1 error) *QUICConnOpenUniStreamCall { 527 c.Call = c.Call.Return(arg0, arg1) 528 return c 529 } 530 531 // Do rewrite *gomock.Call.Do 532 func (c *QUICConnOpenUniStreamCall) Do(f func() (SendStream, error)) *QUICConnOpenUniStreamCall { 533 c.Call = c.Call.Do(f) 534 return c 535 } 536 537 // DoAndReturn rewrite *gomock.Call.DoAndReturn 538 func (c *QUICConnOpenUniStreamCall) DoAndReturn(f func() (SendStream, error)) *QUICConnOpenUniStreamCall { 539 c.Call = c.Call.DoAndReturn(f) 540 return c 541 } 542 543 // OpenUniStreamSync mocks base method. 544 func (m *MockQUICConn) OpenUniStreamSync(arg0 context.Context) (SendStream, error) { 545 m.ctrl.T.Helper() 546 ret := m.ctrl.Call(m, "OpenUniStreamSync", arg0) 547 ret0, _ := ret[0].(SendStream) 548 ret1, _ := ret[1].(error) 549 return ret0, ret1 550 } 551 552 // OpenUniStreamSync indicates an expected call of OpenUniStreamSync. 553 func (mr *MockQUICConnMockRecorder) OpenUniStreamSync(arg0 any) *QUICConnOpenUniStreamSyncCall { 554 mr.mock.ctrl.T.Helper() 555 call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "OpenUniStreamSync", reflect.TypeOf((*MockQUICConn)(nil).OpenUniStreamSync), arg0) 556 return &QUICConnOpenUniStreamSyncCall{Call: call} 557 } 558 559 // QUICConnOpenUniStreamSyncCall wrap *gomock.Call 560 type QUICConnOpenUniStreamSyncCall struct { 561 *gomock.Call 562 } 563 564 // Return rewrite *gomock.Call.Return 565 func (c *QUICConnOpenUniStreamSyncCall) Return(arg0 SendStream, arg1 error) *QUICConnOpenUniStreamSyncCall { 566 c.Call = c.Call.Return(arg0, arg1) 567 return c 568 } 569 570 // Do rewrite *gomock.Call.Do 571 func (c *QUICConnOpenUniStreamSyncCall) Do(f func(context.Context) (SendStream, error)) *QUICConnOpenUniStreamSyncCall { 572 c.Call = c.Call.Do(f) 573 return c 574 } 575 576 // DoAndReturn rewrite *gomock.Call.DoAndReturn 577 func (c *QUICConnOpenUniStreamSyncCall) DoAndReturn(f func(context.Context) (SendStream, error)) *QUICConnOpenUniStreamSyncCall { 578 c.Call = c.Call.DoAndReturn(f) 579 return c 580 } 581 582 // ReceiveDatagram mocks base method. 583 func (m *MockQUICConn) ReceiveDatagram(arg0 context.Context) ([]byte, error) { 584 m.ctrl.T.Helper() 585 ret := m.ctrl.Call(m, "ReceiveDatagram", arg0) 586 ret0, _ := ret[0].([]byte) 587 ret1, _ := ret[1].(error) 588 return ret0, ret1 589 } 590 591 // ReceiveDatagram indicates an expected call of ReceiveDatagram. 592 func (mr *MockQUICConnMockRecorder) ReceiveDatagram(arg0 any) *QUICConnReceiveDatagramCall { 593 mr.mock.ctrl.T.Helper() 594 call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "ReceiveDatagram", reflect.TypeOf((*MockQUICConn)(nil).ReceiveDatagram), arg0) 595 return &QUICConnReceiveDatagramCall{Call: call} 596 } 597 598 // QUICConnReceiveDatagramCall wrap *gomock.Call 599 type QUICConnReceiveDatagramCall struct { 600 *gomock.Call 601 } 602 603 // Return rewrite *gomock.Call.Return 604 func (c *QUICConnReceiveDatagramCall) Return(arg0 []byte, arg1 error) *QUICConnReceiveDatagramCall { 605 c.Call = c.Call.Return(arg0, arg1) 606 return c 607 } 608 609 // Do rewrite *gomock.Call.Do 610 func (c *QUICConnReceiveDatagramCall) Do(f func(context.Context) ([]byte, error)) *QUICConnReceiveDatagramCall { 611 c.Call = c.Call.Do(f) 612 return c 613 } 614 615 // DoAndReturn rewrite *gomock.Call.DoAndReturn 616 func (c *QUICConnReceiveDatagramCall) DoAndReturn(f func(context.Context) ([]byte, error)) *QUICConnReceiveDatagramCall { 617 c.Call = c.Call.DoAndReturn(f) 618 return c 619 } 620 621 // RemoteAddr mocks base method. 622 func (m *MockQUICConn) RemoteAddr() net.Addr { 623 m.ctrl.T.Helper() 624 ret := m.ctrl.Call(m, "RemoteAddr") 625 ret0, _ := ret[0].(net.Addr) 626 return ret0 627 } 628 629 // RemoteAddr indicates an expected call of RemoteAddr. 630 func (mr *MockQUICConnMockRecorder) RemoteAddr() *QUICConnRemoteAddrCall { 631 mr.mock.ctrl.T.Helper() 632 call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "RemoteAddr", reflect.TypeOf((*MockQUICConn)(nil).RemoteAddr)) 633 return &QUICConnRemoteAddrCall{Call: call} 634 } 635 636 // QUICConnRemoteAddrCall wrap *gomock.Call 637 type QUICConnRemoteAddrCall struct { 638 *gomock.Call 639 } 640 641 // Return rewrite *gomock.Call.Return 642 func (c *QUICConnRemoteAddrCall) Return(arg0 net.Addr) *QUICConnRemoteAddrCall { 643 c.Call = c.Call.Return(arg0) 644 return c 645 } 646 647 // Do rewrite *gomock.Call.Do 648 func (c *QUICConnRemoteAddrCall) Do(f func() net.Addr) *QUICConnRemoteAddrCall { 649 c.Call = c.Call.Do(f) 650 return c 651 } 652 653 // DoAndReturn rewrite *gomock.Call.DoAndReturn 654 func (c *QUICConnRemoteAddrCall) DoAndReturn(f func() net.Addr) *QUICConnRemoteAddrCall { 655 c.Call = c.Call.DoAndReturn(f) 656 return c 657 } 658 659 // SendDatagram mocks base method. 660 func (m *MockQUICConn) SendDatagram(arg0 []byte) error { 661 m.ctrl.T.Helper() 662 ret := m.ctrl.Call(m, "SendDatagram", arg0) 663 ret0, _ := ret[0].(error) 664 return ret0 665 } 666 667 // SendDatagram indicates an expected call of SendDatagram. 668 func (mr *MockQUICConnMockRecorder) SendDatagram(arg0 any) *QUICConnSendDatagramCall { 669 mr.mock.ctrl.T.Helper() 670 call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "SendDatagram", reflect.TypeOf((*MockQUICConn)(nil).SendDatagram), arg0) 671 return &QUICConnSendDatagramCall{Call: call} 672 } 673 674 // QUICConnSendDatagramCall wrap *gomock.Call 675 type QUICConnSendDatagramCall struct { 676 *gomock.Call 677 } 678 679 // Return rewrite *gomock.Call.Return 680 func (c *QUICConnSendDatagramCall) Return(arg0 error) *QUICConnSendDatagramCall { 681 c.Call = c.Call.Return(arg0) 682 return c 683 } 684 685 // Do rewrite *gomock.Call.Do 686 func (c *QUICConnSendDatagramCall) Do(f func([]byte) error) *QUICConnSendDatagramCall { 687 c.Call = c.Call.Do(f) 688 return c 689 } 690 691 // DoAndReturn rewrite *gomock.Call.DoAndReturn 692 func (c *QUICConnSendDatagramCall) DoAndReturn(f func([]byte) error) *QUICConnSendDatagramCall { 693 c.Call = c.Call.DoAndReturn(f) 694 return c 695 } 696 697 // SetMaxBandwidth mocks base method. 698 func (m *MockQUICConn) SetMaxBandwidth(arg0 uint64) { 699 m.ctrl.T.Helper() 700 m.ctrl.Call(m, "SetMaxBandwidth", arg0) 701 } 702 703 // SetMaxBandwidth indicates an expected call of SetMaxBandwidth. 704 func (mr *MockQUICConnMockRecorder) SetMaxBandwidth(arg0 any) *QUICConnSetMaxBandwidthCall { 705 mr.mock.ctrl.T.Helper() 706 call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "SetMaxBandwidth", reflect.TypeOf((*MockQUICConn)(nil).SetMaxBandwidth), arg0) 707 return &QUICConnSetMaxBandwidthCall{Call: call} 708 } 709 710 // QUICConnSetMaxBandwidthCall wrap *gomock.Call 711 type QUICConnSetMaxBandwidthCall struct { 712 *gomock.Call 713 } 714 715 // Return rewrite *gomock.Call.Return 716 func (c *QUICConnSetMaxBandwidthCall) Return() *QUICConnSetMaxBandwidthCall { 717 c.Call = c.Call.Return() 718 return c 719 } 720 721 // Do rewrite *gomock.Call.Do 722 func (c *QUICConnSetMaxBandwidthCall) Do(f func(uint64)) *QUICConnSetMaxBandwidthCall { 723 c.Call = c.Call.Do(f) 724 return c 725 } 726 727 // DoAndReturn rewrite *gomock.Call.DoAndReturn 728 func (c *QUICConnSetMaxBandwidthCall) DoAndReturn(f func(uint64)) *QUICConnSetMaxBandwidthCall { 729 c.Call = c.Call.DoAndReturn(f) 730 return c 731 } 732 733 // closeWithTransportError mocks base method. 734 func (m *MockQUICConn) closeWithTransportError(arg0 qerr.TransportErrorCode) { 735 m.ctrl.T.Helper() 736 m.ctrl.Call(m, "closeWithTransportError", arg0) 737 } 738 739 // closeWithTransportError indicates an expected call of closeWithTransportError. 740 func (mr *MockQUICConnMockRecorder) closeWithTransportError(arg0 any) *QUICConncloseWithTransportErrorCall { 741 mr.mock.ctrl.T.Helper() 742 call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "closeWithTransportError", reflect.TypeOf((*MockQUICConn)(nil).closeWithTransportError), arg0) 743 return &QUICConncloseWithTransportErrorCall{Call: call} 744 } 745 746 // QUICConncloseWithTransportErrorCall wrap *gomock.Call 747 type QUICConncloseWithTransportErrorCall struct { 748 *gomock.Call 749 } 750 751 // Return rewrite *gomock.Call.Return 752 func (c *QUICConncloseWithTransportErrorCall) Return() *QUICConncloseWithTransportErrorCall { 753 c.Call = c.Call.Return() 754 return c 755 } 756 757 // Do rewrite *gomock.Call.Do 758 func (c *QUICConncloseWithTransportErrorCall) Do(f func(qerr.TransportErrorCode)) *QUICConncloseWithTransportErrorCall { 759 c.Call = c.Call.Do(f) 760 return c 761 } 762 763 // DoAndReturn rewrite *gomock.Call.DoAndReturn 764 func (c *QUICConncloseWithTransportErrorCall) DoAndReturn(f func(qerr.TransportErrorCode)) *QUICConncloseWithTransportErrorCall { 765 c.Call = c.Call.DoAndReturn(f) 766 return c 767 } 768 769 // destroy mocks base method. 770 func (m *MockQUICConn) destroy(arg0 error) { 771 m.ctrl.T.Helper() 772 m.ctrl.Call(m, "destroy", arg0) 773 } 774 775 // destroy indicates an expected call of destroy. 776 func (mr *MockQUICConnMockRecorder) destroy(arg0 any) *QUICConndestroyCall { 777 mr.mock.ctrl.T.Helper() 778 call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "destroy", reflect.TypeOf((*MockQUICConn)(nil).destroy), arg0) 779 return &QUICConndestroyCall{Call: call} 780 } 781 782 // QUICConndestroyCall wrap *gomock.Call 783 type QUICConndestroyCall struct { 784 *gomock.Call 785 } 786 787 // Return rewrite *gomock.Call.Return 788 func (c *QUICConndestroyCall) Return() *QUICConndestroyCall { 789 c.Call = c.Call.Return() 790 return c 791 } 792 793 // Do rewrite *gomock.Call.Do 794 func (c *QUICConndestroyCall) Do(f func(error)) *QUICConndestroyCall { 795 c.Call = c.Call.Do(f) 796 return c 797 } 798 799 // DoAndReturn rewrite *gomock.Call.DoAndReturn 800 func (c *QUICConndestroyCall) DoAndReturn(f func(error)) *QUICConndestroyCall { 801 c.Call = c.Call.DoAndReturn(f) 802 return c 803 } 804 805 // earlyConnReady mocks base method. 806 func (m *MockQUICConn) earlyConnReady() <-chan struct{} { 807 m.ctrl.T.Helper() 808 ret := m.ctrl.Call(m, "earlyConnReady") 809 ret0, _ := ret[0].(<-chan struct{}) 810 return ret0 811 } 812 813 // earlyConnReady indicates an expected call of earlyConnReady. 814 func (mr *MockQUICConnMockRecorder) earlyConnReady() *QUICConnearlyConnReadyCall { 815 mr.mock.ctrl.T.Helper() 816 call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "earlyConnReady", reflect.TypeOf((*MockQUICConn)(nil).earlyConnReady)) 817 return &QUICConnearlyConnReadyCall{Call: call} 818 } 819 820 // QUICConnearlyConnReadyCall wrap *gomock.Call 821 type QUICConnearlyConnReadyCall struct { 822 *gomock.Call 823 } 824 825 // Return rewrite *gomock.Call.Return 826 func (c *QUICConnearlyConnReadyCall) Return(arg0 <-chan struct{}) *QUICConnearlyConnReadyCall { 827 c.Call = c.Call.Return(arg0) 828 return c 829 } 830 831 // Do rewrite *gomock.Call.Do 832 func (c *QUICConnearlyConnReadyCall) Do(f func() <-chan struct{}) *QUICConnearlyConnReadyCall { 833 c.Call = c.Call.Do(f) 834 return c 835 } 836 837 // DoAndReturn rewrite *gomock.Call.DoAndReturn 838 func (c *QUICConnearlyConnReadyCall) DoAndReturn(f func() <-chan struct{}) *QUICConnearlyConnReadyCall { 839 c.Call = c.Call.DoAndReturn(f) 840 return c 841 } 842 843 // getPerspective mocks base method. 844 func (m *MockQUICConn) getPerspective() protocol.Perspective { 845 m.ctrl.T.Helper() 846 ret := m.ctrl.Call(m, "getPerspective") 847 ret0, _ := ret[0].(protocol.Perspective) 848 return ret0 849 } 850 851 // getPerspective indicates an expected call of getPerspective. 852 func (mr *MockQUICConnMockRecorder) getPerspective() *QUICConngetPerspectiveCall { 853 mr.mock.ctrl.T.Helper() 854 call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "getPerspective", reflect.TypeOf((*MockQUICConn)(nil).getPerspective)) 855 return &QUICConngetPerspectiveCall{Call: call} 856 } 857 858 // QUICConngetPerspectiveCall wrap *gomock.Call 859 type QUICConngetPerspectiveCall struct { 860 *gomock.Call 861 } 862 863 // Return rewrite *gomock.Call.Return 864 func (c *QUICConngetPerspectiveCall) Return(arg0 protocol.Perspective) *QUICConngetPerspectiveCall { 865 c.Call = c.Call.Return(arg0) 866 return c 867 } 868 869 // Do rewrite *gomock.Call.Do 870 func (c *QUICConngetPerspectiveCall) Do(f func() protocol.Perspective) *QUICConngetPerspectiveCall { 871 c.Call = c.Call.Do(f) 872 return c 873 } 874 875 // DoAndReturn rewrite *gomock.Call.DoAndReturn 876 func (c *QUICConngetPerspectiveCall) DoAndReturn(f func() protocol.Perspective) *QUICConngetPerspectiveCall { 877 c.Call = c.Call.DoAndReturn(f) 878 return c 879 } 880 881 // handlePacket mocks base method. 882 func (m *MockQUICConn) handlePacket(arg0 receivedPacket) { 883 m.ctrl.T.Helper() 884 m.ctrl.Call(m, "handlePacket", arg0) 885 } 886 887 // handlePacket indicates an expected call of handlePacket. 888 func (mr *MockQUICConnMockRecorder) handlePacket(arg0 any) *QUICConnhandlePacketCall { 889 mr.mock.ctrl.T.Helper() 890 call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "handlePacket", reflect.TypeOf((*MockQUICConn)(nil).handlePacket), arg0) 891 return &QUICConnhandlePacketCall{Call: call} 892 } 893 894 // QUICConnhandlePacketCall wrap *gomock.Call 895 type QUICConnhandlePacketCall struct { 896 *gomock.Call 897 } 898 899 // Return rewrite *gomock.Call.Return 900 func (c *QUICConnhandlePacketCall) Return() *QUICConnhandlePacketCall { 901 c.Call = c.Call.Return() 902 return c 903 } 904 905 // Do rewrite *gomock.Call.Do 906 func (c *QUICConnhandlePacketCall) Do(f func(receivedPacket)) *QUICConnhandlePacketCall { 907 c.Call = c.Call.Do(f) 908 return c 909 } 910 911 // DoAndReturn rewrite *gomock.Call.DoAndReturn 912 func (c *QUICConnhandlePacketCall) DoAndReturn(f func(receivedPacket)) *QUICConnhandlePacketCall { 913 c.Call = c.Call.DoAndReturn(f) 914 return c 915 } 916 917 // run mocks base method. 918 func (m *MockQUICConn) run() error { 919 m.ctrl.T.Helper() 920 ret := m.ctrl.Call(m, "run") 921 ret0, _ := ret[0].(error) 922 return ret0 923 } 924 925 // run indicates an expected call of run. 926 func (mr *MockQUICConnMockRecorder) run() *QUICConnrunCall { 927 mr.mock.ctrl.T.Helper() 928 call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "run", reflect.TypeOf((*MockQUICConn)(nil).run)) 929 return &QUICConnrunCall{Call: call} 930 } 931 932 // QUICConnrunCall wrap *gomock.Call 933 type QUICConnrunCall struct { 934 *gomock.Call 935 } 936 937 // Return rewrite *gomock.Call.Return 938 func (c *QUICConnrunCall) Return(arg0 error) *QUICConnrunCall { 939 c.Call = c.Call.Return(arg0) 940 return c 941 } 942 943 // Do rewrite *gomock.Call.Do 944 func (c *QUICConnrunCall) Do(f func() error) *QUICConnrunCall { 945 c.Call = c.Call.Do(f) 946 return c 947 } 948 949 // DoAndReturn rewrite *gomock.Call.DoAndReturn 950 func (c *QUICConnrunCall) DoAndReturn(f func() error) *QUICConnrunCall { 951 c.Call = c.Call.DoAndReturn(f) 952 return c 953 }