github.com/danielpfeifer02/quic-go-prio-packs@v0.41.0-28/internal/mocks/quic/stream.go (about) 1 // Code generated by MockGen. DO NOT EDIT. 2 // Source: github.com/danielpfeifer02/quic-go-prio-packs (interfaces: Stream) 3 // 4 // Generated by this command: 5 // 6 // mockgen -typed -build_flags=-tags=gomock -package mockquic -destination quic/stream.go github.com/danielpfeifer02/quic-go-prio-packs Stream 7 // 8 // Package mockquic is a generated GoMock package. 9 package mockquic 10 11 import ( 12 context "context" 13 reflect "reflect" 14 time "time" 15 16 protocol "github.com/danielpfeifer02/quic-go-prio-packs/internal/protocol" 17 qerr "github.com/danielpfeifer02/quic-go-prio-packs/internal/qerr" 18 gomock "go.uber.org/mock/gomock" 19 ) 20 21 // MockStream is a mock of Stream interface. 22 type MockStream struct { 23 ctrl *gomock.Controller 24 recorder *MockStreamMockRecorder 25 } 26 27 // MockStreamMockRecorder is the mock recorder for MockStream. 28 type MockStreamMockRecorder struct { 29 mock *MockStream 30 } 31 32 // NewMockStream creates a new mock instance. 33 func NewMockStream(ctrl *gomock.Controller) *MockStream { 34 mock := &MockStream{ctrl: ctrl} 35 mock.recorder = &MockStreamMockRecorder{mock} 36 return mock 37 } 38 39 // EXPECT returns an object that allows the caller to indicate expected use. 40 func (m *MockStream) EXPECT() *MockStreamMockRecorder { 41 return m.recorder 42 } 43 44 // CancelRead mocks base method. 45 func (m *MockStream) CancelRead(arg0 qerr.StreamErrorCode) { 46 m.ctrl.T.Helper() 47 m.ctrl.Call(m, "CancelRead", arg0) 48 } 49 50 // CancelRead indicates an expected call of CancelRead. 51 func (mr *MockStreamMockRecorder) CancelRead(arg0 any) *StreamCancelReadCall { 52 mr.mock.ctrl.T.Helper() 53 call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "CancelRead", reflect.TypeOf((*MockStream)(nil).CancelRead), arg0) 54 return &StreamCancelReadCall{Call: call} 55 } 56 57 // StreamCancelReadCall wrap *gomock.Call 58 type StreamCancelReadCall struct { 59 *gomock.Call 60 } 61 62 // Return rewrite *gomock.Call.Return 63 func (c *StreamCancelReadCall) Return() *StreamCancelReadCall { 64 c.Call = c.Call.Return() 65 return c 66 } 67 68 // Do rewrite *gomock.Call.Do 69 func (c *StreamCancelReadCall) Do(f func(qerr.StreamErrorCode)) *StreamCancelReadCall { 70 c.Call = c.Call.Do(f) 71 return c 72 } 73 74 // DoAndReturn rewrite *gomock.Call.DoAndReturn 75 func (c *StreamCancelReadCall) DoAndReturn(f func(qerr.StreamErrorCode)) *StreamCancelReadCall { 76 c.Call = c.Call.DoAndReturn(f) 77 return c 78 } 79 80 // CancelWrite mocks base method. 81 func (m *MockStream) CancelWrite(arg0 qerr.StreamErrorCode) { 82 m.ctrl.T.Helper() 83 m.ctrl.Call(m, "CancelWrite", arg0) 84 } 85 86 // CancelWrite indicates an expected call of CancelWrite. 87 func (mr *MockStreamMockRecorder) CancelWrite(arg0 any) *StreamCancelWriteCall { 88 mr.mock.ctrl.T.Helper() 89 call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "CancelWrite", reflect.TypeOf((*MockStream)(nil).CancelWrite), arg0) 90 return &StreamCancelWriteCall{Call: call} 91 } 92 93 // StreamCancelWriteCall wrap *gomock.Call 94 type StreamCancelWriteCall struct { 95 *gomock.Call 96 } 97 98 // Return rewrite *gomock.Call.Return 99 func (c *StreamCancelWriteCall) Return() *StreamCancelWriteCall { 100 c.Call = c.Call.Return() 101 return c 102 } 103 104 // Do rewrite *gomock.Call.Do 105 func (c *StreamCancelWriteCall) Do(f func(qerr.StreamErrorCode)) *StreamCancelWriteCall { 106 c.Call = c.Call.Do(f) 107 return c 108 } 109 110 // DoAndReturn rewrite *gomock.Call.DoAndReturn 111 func (c *StreamCancelWriteCall) DoAndReturn(f func(qerr.StreamErrorCode)) *StreamCancelWriteCall { 112 c.Call = c.Call.DoAndReturn(f) 113 return c 114 } 115 116 // Close mocks base method. 117 func (m *MockStream) Close() error { 118 m.ctrl.T.Helper() 119 ret := m.ctrl.Call(m, "Close") 120 ret0, _ := ret[0].(error) 121 return ret0 122 } 123 124 // Close indicates an expected call of Close. 125 func (mr *MockStreamMockRecorder) Close() *StreamCloseCall { 126 mr.mock.ctrl.T.Helper() 127 call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Close", reflect.TypeOf((*MockStream)(nil).Close)) 128 return &StreamCloseCall{Call: call} 129 } 130 131 // StreamCloseCall wrap *gomock.Call 132 type StreamCloseCall struct { 133 *gomock.Call 134 } 135 136 // Return rewrite *gomock.Call.Return 137 func (c *StreamCloseCall) Return(arg0 error) *StreamCloseCall { 138 c.Call = c.Call.Return(arg0) 139 return c 140 } 141 142 // Do rewrite *gomock.Call.Do 143 func (c *StreamCloseCall) Do(f func() error) *StreamCloseCall { 144 c.Call = c.Call.Do(f) 145 return c 146 } 147 148 // DoAndReturn rewrite *gomock.Call.DoAndReturn 149 func (c *StreamCloseCall) DoAndReturn(f func() error) *StreamCloseCall { 150 c.Call = c.Call.DoAndReturn(f) 151 return c 152 } 153 154 // Context mocks base method. 155 func (m *MockStream) Context() context.Context { 156 m.ctrl.T.Helper() 157 ret := m.ctrl.Call(m, "Context") 158 ret0, _ := ret[0].(context.Context) 159 return ret0 160 } 161 162 // Context indicates an expected call of Context. 163 func (mr *MockStreamMockRecorder) Context() *StreamContextCall { 164 mr.mock.ctrl.T.Helper() 165 call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Context", reflect.TypeOf((*MockStream)(nil).Context)) 166 return &StreamContextCall{Call: call} 167 } 168 169 // StreamContextCall wrap *gomock.Call 170 type StreamContextCall struct { 171 *gomock.Call 172 } 173 174 // Return rewrite *gomock.Call.Return 175 func (c *StreamContextCall) Return(arg0 context.Context) *StreamContextCall { 176 c.Call = c.Call.Return(arg0) 177 return c 178 } 179 180 // Do rewrite *gomock.Call.Do 181 func (c *StreamContextCall) Do(f func() context.Context) *StreamContextCall { 182 c.Call = c.Call.Do(f) 183 return c 184 } 185 186 // DoAndReturn rewrite *gomock.Call.DoAndReturn 187 func (c *StreamContextCall) DoAndReturn(f func() context.Context) *StreamContextCall { 188 c.Call = c.Call.DoAndReturn(f) 189 return c 190 } 191 192 // Read mocks base method. 193 func (m *MockStream) Read(arg0 []byte) (int, error) { 194 m.ctrl.T.Helper() 195 ret := m.ctrl.Call(m, "Read", arg0) 196 ret0, _ := ret[0].(int) 197 ret1, _ := ret[1].(error) 198 return ret0, ret1 199 } 200 201 // Read indicates an expected call of Read. 202 func (mr *MockStreamMockRecorder) Read(arg0 any) *StreamReadCall { 203 mr.mock.ctrl.T.Helper() 204 call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Read", reflect.TypeOf((*MockStream)(nil).Read), arg0) 205 return &StreamReadCall{Call: call} 206 } 207 208 // StreamReadCall wrap *gomock.Call 209 type StreamReadCall struct { 210 *gomock.Call 211 } 212 213 // Return rewrite *gomock.Call.Return 214 func (c *StreamReadCall) Return(arg0 int, arg1 error) *StreamReadCall { 215 c.Call = c.Call.Return(arg0, arg1) 216 return c 217 } 218 219 // Do rewrite *gomock.Call.Do 220 func (c *StreamReadCall) Do(f func([]byte) (int, error)) *StreamReadCall { 221 c.Call = c.Call.Do(f) 222 return c 223 } 224 225 // DoAndReturn rewrite *gomock.Call.DoAndReturn 226 func (c *StreamReadCall) DoAndReturn(f func([]byte) (int, error)) *StreamReadCall { 227 c.Call = c.Call.DoAndReturn(f) 228 return c 229 } 230 231 // SetDeadline mocks base method. 232 func (m *MockStream) SetDeadline(arg0 time.Time) error { 233 m.ctrl.T.Helper() 234 ret := m.ctrl.Call(m, "SetDeadline", arg0) 235 ret0, _ := ret[0].(error) 236 return ret0 237 } 238 239 // SetDeadline indicates an expected call of SetDeadline. 240 func (mr *MockStreamMockRecorder) SetDeadline(arg0 any) *StreamSetDeadlineCall { 241 mr.mock.ctrl.T.Helper() 242 call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "SetDeadline", reflect.TypeOf((*MockStream)(nil).SetDeadline), arg0) 243 return &StreamSetDeadlineCall{Call: call} 244 } 245 246 // StreamSetDeadlineCall wrap *gomock.Call 247 type StreamSetDeadlineCall struct { 248 *gomock.Call 249 } 250 251 // Return rewrite *gomock.Call.Return 252 func (c *StreamSetDeadlineCall) Return(arg0 error) *StreamSetDeadlineCall { 253 c.Call = c.Call.Return(arg0) 254 return c 255 } 256 257 // Do rewrite *gomock.Call.Do 258 func (c *StreamSetDeadlineCall) Do(f func(time.Time) error) *StreamSetDeadlineCall { 259 c.Call = c.Call.Do(f) 260 return c 261 } 262 263 // DoAndReturn rewrite *gomock.Call.DoAndReturn 264 func (c *StreamSetDeadlineCall) DoAndReturn(f func(time.Time) error) *StreamSetDeadlineCall { 265 c.Call = c.Call.DoAndReturn(f) 266 return c 267 } 268 269 // SetReadDeadline mocks base method. 270 func (m *MockStream) SetReadDeadline(arg0 time.Time) error { 271 m.ctrl.T.Helper() 272 ret := m.ctrl.Call(m, "SetReadDeadline", arg0) 273 ret0, _ := ret[0].(error) 274 return ret0 275 } 276 277 // SetReadDeadline indicates an expected call of SetReadDeadline. 278 func (mr *MockStreamMockRecorder) SetReadDeadline(arg0 any) *StreamSetReadDeadlineCall { 279 mr.mock.ctrl.T.Helper() 280 call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "SetReadDeadline", reflect.TypeOf((*MockStream)(nil).SetReadDeadline), arg0) 281 return &StreamSetReadDeadlineCall{Call: call} 282 } 283 284 // StreamSetReadDeadlineCall wrap *gomock.Call 285 type StreamSetReadDeadlineCall struct { 286 *gomock.Call 287 } 288 289 // Return rewrite *gomock.Call.Return 290 func (c *StreamSetReadDeadlineCall) Return(arg0 error) *StreamSetReadDeadlineCall { 291 c.Call = c.Call.Return(arg0) 292 return c 293 } 294 295 // Do rewrite *gomock.Call.Do 296 func (c *StreamSetReadDeadlineCall) Do(f func(time.Time) error) *StreamSetReadDeadlineCall { 297 c.Call = c.Call.Do(f) 298 return c 299 } 300 301 // DoAndReturn rewrite *gomock.Call.DoAndReturn 302 func (c *StreamSetReadDeadlineCall) DoAndReturn(f func(time.Time) error) *StreamSetReadDeadlineCall { 303 c.Call = c.Call.DoAndReturn(f) 304 return c 305 } 306 307 // SetWriteDeadline mocks base method. 308 func (m *MockStream) SetWriteDeadline(arg0 time.Time) error { 309 m.ctrl.T.Helper() 310 ret := m.ctrl.Call(m, "SetWriteDeadline", arg0) 311 ret0, _ := ret[0].(error) 312 return ret0 313 } 314 315 // SetWriteDeadline indicates an expected call of SetWriteDeadline. 316 func (mr *MockStreamMockRecorder) SetWriteDeadline(arg0 any) *StreamSetWriteDeadlineCall { 317 mr.mock.ctrl.T.Helper() 318 call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "SetWriteDeadline", reflect.TypeOf((*MockStream)(nil).SetWriteDeadline), arg0) 319 return &StreamSetWriteDeadlineCall{Call: call} 320 } 321 322 // StreamSetWriteDeadlineCall wrap *gomock.Call 323 type StreamSetWriteDeadlineCall struct { 324 *gomock.Call 325 } 326 327 // Return rewrite *gomock.Call.Return 328 func (c *StreamSetWriteDeadlineCall) Return(arg0 error) *StreamSetWriteDeadlineCall { 329 c.Call = c.Call.Return(arg0) 330 return c 331 } 332 333 // Do rewrite *gomock.Call.Do 334 func (c *StreamSetWriteDeadlineCall) Do(f func(time.Time) error) *StreamSetWriteDeadlineCall { 335 c.Call = c.Call.Do(f) 336 return c 337 } 338 339 // DoAndReturn rewrite *gomock.Call.DoAndReturn 340 func (c *StreamSetWriteDeadlineCall) DoAndReturn(f func(time.Time) error) *StreamSetWriteDeadlineCall { 341 c.Call = c.Call.DoAndReturn(f) 342 return c 343 } 344 345 // StreamID mocks base method. 346 func (m *MockStream) StreamID() protocol.StreamID { 347 m.ctrl.T.Helper() 348 ret := m.ctrl.Call(m, "StreamID") 349 ret0, _ := ret[0].(protocol.StreamID) 350 return ret0 351 } 352 353 // StreamID indicates an expected call of StreamID. 354 func (mr *MockStreamMockRecorder) StreamID() *StreamStreamIDCall { 355 mr.mock.ctrl.T.Helper() 356 call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "StreamID", reflect.TypeOf((*MockStream)(nil).StreamID)) 357 return &StreamStreamIDCall{Call: call} 358 } 359 360 // StreamStreamIDCall wrap *gomock.Call 361 type StreamStreamIDCall struct { 362 *gomock.Call 363 } 364 365 // Return rewrite *gomock.Call.Return 366 func (c *StreamStreamIDCall) Return(arg0 protocol.StreamID) *StreamStreamIDCall { 367 c.Call = c.Call.Return(arg0) 368 return c 369 } 370 371 // Do rewrite *gomock.Call.Do 372 func (c *StreamStreamIDCall) Do(f func() protocol.StreamID) *StreamStreamIDCall { 373 c.Call = c.Call.Do(f) 374 return c 375 } 376 377 // DoAndReturn rewrite *gomock.Call.DoAndReturn 378 func (c *StreamStreamIDCall) DoAndReturn(f func() protocol.StreamID) *StreamStreamIDCall { 379 c.Call = c.Call.DoAndReturn(f) 380 return c 381 } 382 383 // Write mocks base method. 384 func (m *MockStream) Write(arg0 []byte) (int, error) { 385 m.ctrl.T.Helper() 386 ret := m.ctrl.Call(m, "Write", arg0) 387 ret0, _ := ret[0].(int) 388 ret1, _ := ret[1].(error) 389 return ret0, ret1 390 } 391 392 // Write indicates an expected call of Write. 393 func (mr *MockStreamMockRecorder) Write(arg0 any) *StreamWriteCall { 394 mr.mock.ctrl.T.Helper() 395 call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Write", reflect.TypeOf((*MockStream)(nil).Write), arg0) 396 return &StreamWriteCall{Call: call} 397 } 398 399 // StreamWriteCall wrap *gomock.Call 400 type StreamWriteCall struct { 401 *gomock.Call 402 } 403 404 // Return rewrite *gomock.Call.Return 405 func (c *StreamWriteCall) Return(arg0 int, arg1 error) *StreamWriteCall { 406 c.Call = c.Call.Return(arg0, arg1) 407 return c 408 } 409 410 // Do rewrite *gomock.Call.Do 411 func (c *StreamWriteCall) Do(f func([]byte) (int, error)) *StreamWriteCall { 412 c.Call = c.Call.Do(f) 413 return c 414 } 415 416 // DoAndReturn rewrite *gomock.Call.DoAndReturn 417 func (c *StreamWriteCall) DoAndReturn(f func([]byte) (int, error)) *StreamWriteCall { 418 c.Call = c.Call.DoAndReturn(f) 419 return c 420 }