github.com/quic-go/quic-go@v0.44.0/internal/mocks/stream_flow_controller.go (about) 1 // Code generated by MockGen. DO NOT EDIT. 2 // Source: github.com/quic-go/quic-go/internal/flowcontrol (interfaces: StreamFlowController) 3 // 4 // Generated by this command: 5 // 6 // mockgen -typed -build_flags=-tags=gomock -package mocks -destination stream_flow_controller.go github.com/quic-go/quic-go/internal/flowcontrol StreamFlowController 7 // 8 9 // Package mocks is a generated GoMock package. 10 package mocks 11 12 import ( 13 reflect "reflect" 14 15 protocol "github.com/quic-go/quic-go/internal/protocol" 16 gomock "go.uber.org/mock/gomock" 17 ) 18 19 // MockStreamFlowController is a mock of StreamFlowController interface. 20 type MockStreamFlowController struct { 21 ctrl *gomock.Controller 22 recorder *MockStreamFlowControllerMockRecorder 23 } 24 25 // MockStreamFlowControllerMockRecorder is the mock recorder for MockStreamFlowController. 26 type MockStreamFlowControllerMockRecorder struct { 27 mock *MockStreamFlowController 28 } 29 30 // NewMockStreamFlowController creates a new mock instance. 31 func NewMockStreamFlowController(ctrl *gomock.Controller) *MockStreamFlowController { 32 mock := &MockStreamFlowController{ctrl: ctrl} 33 mock.recorder = &MockStreamFlowControllerMockRecorder{mock} 34 return mock 35 } 36 37 // EXPECT returns an object that allows the caller to indicate expected use. 38 func (m *MockStreamFlowController) EXPECT() *MockStreamFlowControllerMockRecorder { 39 return m.recorder 40 } 41 42 // Abandon mocks base method. 43 func (m *MockStreamFlowController) Abandon() { 44 m.ctrl.T.Helper() 45 m.ctrl.Call(m, "Abandon") 46 } 47 48 // Abandon indicates an expected call of Abandon. 49 func (mr *MockStreamFlowControllerMockRecorder) Abandon() *MockStreamFlowControllerAbandonCall { 50 mr.mock.ctrl.T.Helper() 51 call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Abandon", reflect.TypeOf((*MockStreamFlowController)(nil).Abandon)) 52 return &MockStreamFlowControllerAbandonCall{Call: call} 53 } 54 55 // MockStreamFlowControllerAbandonCall wrap *gomock.Call 56 type MockStreamFlowControllerAbandonCall struct { 57 *gomock.Call 58 } 59 60 // Return rewrite *gomock.Call.Return 61 func (c *MockStreamFlowControllerAbandonCall) Return() *MockStreamFlowControllerAbandonCall { 62 c.Call = c.Call.Return() 63 return c 64 } 65 66 // Do rewrite *gomock.Call.Do 67 func (c *MockStreamFlowControllerAbandonCall) Do(f func()) *MockStreamFlowControllerAbandonCall { 68 c.Call = c.Call.Do(f) 69 return c 70 } 71 72 // DoAndReturn rewrite *gomock.Call.DoAndReturn 73 func (c *MockStreamFlowControllerAbandonCall) DoAndReturn(f func()) *MockStreamFlowControllerAbandonCall { 74 c.Call = c.Call.DoAndReturn(f) 75 return c 76 } 77 78 // AddBytesRead mocks base method. 79 func (m *MockStreamFlowController) AddBytesRead(arg0 protocol.ByteCount) { 80 m.ctrl.T.Helper() 81 m.ctrl.Call(m, "AddBytesRead", arg0) 82 } 83 84 // AddBytesRead indicates an expected call of AddBytesRead. 85 func (mr *MockStreamFlowControllerMockRecorder) AddBytesRead(arg0 any) *MockStreamFlowControllerAddBytesReadCall { 86 mr.mock.ctrl.T.Helper() 87 call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "AddBytesRead", reflect.TypeOf((*MockStreamFlowController)(nil).AddBytesRead), arg0) 88 return &MockStreamFlowControllerAddBytesReadCall{Call: call} 89 } 90 91 // MockStreamFlowControllerAddBytesReadCall wrap *gomock.Call 92 type MockStreamFlowControllerAddBytesReadCall struct { 93 *gomock.Call 94 } 95 96 // Return rewrite *gomock.Call.Return 97 func (c *MockStreamFlowControllerAddBytesReadCall) Return() *MockStreamFlowControllerAddBytesReadCall { 98 c.Call = c.Call.Return() 99 return c 100 } 101 102 // Do rewrite *gomock.Call.Do 103 func (c *MockStreamFlowControllerAddBytesReadCall) Do(f func(protocol.ByteCount)) *MockStreamFlowControllerAddBytesReadCall { 104 c.Call = c.Call.Do(f) 105 return c 106 } 107 108 // DoAndReturn rewrite *gomock.Call.DoAndReturn 109 func (c *MockStreamFlowControllerAddBytesReadCall) DoAndReturn(f func(protocol.ByteCount)) *MockStreamFlowControllerAddBytesReadCall { 110 c.Call = c.Call.DoAndReturn(f) 111 return c 112 } 113 114 // AddBytesSent mocks base method. 115 func (m *MockStreamFlowController) AddBytesSent(arg0 protocol.ByteCount) { 116 m.ctrl.T.Helper() 117 m.ctrl.Call(m, "AddBytesSent", arg0) 118 } 119 120 // AddBytesSent indicates an expected call of AddBytesSent. 121 func (mr *MockStreamFlowControllerMockRecorder) AddBytesSent(arg0 any) *MockStreamFlowControllerAddBytesSentCall { 122 mr.mock.ctrl.T.Helper() 123 call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "AddBytesSent", reflect.TypeOf((*MockStreamFlowController)(nil).AddBytesSent), arg0) 124 return &MockStreamFlowControllerAddBytesSentCall{Call: call} 125 } 126 127 // MockStreamFlowControllerAddBytesSentCall wrap *gomock.Call 128 type MockStreamFlowControllerAddBytesSentCall struct { 129 *gomock.Call 130 } 131 132 // Return rewrite *gomock.Call.Return 133 func (c *MockStreamFlowControllerAddBytesSentCall) Return() *MockStreamFlowControllerAddBytesSentCall { 134 c.Call = c.Call.Return() 135 return c 136 } 137 138 // Do rewrite *gomock.Call.Do 139 func (c *MockStreamFlowControllerAddBytesSentCall) Do(f func(protocol.ByteCount)) *MockStreamFlowControllerAddBytesSentCall { 140 c.Call = c.Call.Do(f) 141 return c 142 } 143 144 // DoAndReturn rewrite *gomock.Call.DoAndReturn 145 func (c *MockStreamFlowControllerAddBytesSentCall) DoAndReturn(f func(protocol.ByteCount)) *MockStreamFlowControllerAddBytesSentCall { 146 c.Call = c.Call.DoAndReturn(f) 147 return c 148 } 149 150 // GetWindowUpdate mocks base method. 151 func (m *MockStreamFlowController) GetWindowUpdate() protocol.ByteCount { 152 m.ctrl.T.Helper() 153 ret := m.ctrl.Call(m, "GetWindowUpdate") 154 ret0, _ := ret[0].(protocol.ByteCount) 155 return ret0 156 } 157 158 // GetWindowUpdate indicates an expected call of GetWindowUpdate. 159 func (mr *MockStreamFlowControllerMockRecorder) GetWindowUpdate() *MockStreamFlowControllerGetWindowUpdateCall { 160 mr.mock.ctrl.T.Helper() 161 call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "GetWindowUpdate", reflect.TypeOf((*MockStreamFlowController)(nil).GetWindowUpdate)) 162 return &MockStreamFlowControllerGetWindowUpdateCall{Call: call} 163 } 164 165 // MockStreamFlowControllerGetWindowUpdateCall wrap *gomock.Call 166 type MockStreamFlowControllerGetWindowUpdateCall struct { 167 *gomock.Call 168 } 169 170 // Return rewrite *gomock.Call.Return 171 func (c *MockStreamFlowControllerGetWindowUpdateCall) Return(arg0 protocol.ByteCount) *MockStreamFlowControllerGetWindowUpdateCall { 172 c.Call = c.Call.Return(arg0) 173 return c 174 } 175 176 // Do rewrite *gomock.Call.Do 177 func (c *MockStreamFlowControllerGetWindowUpdateCall) Do(f func() protocol.ByteCount) *MockStreamFlowControllerGetWindowUpdateCall { 178 c.Call = c.Call.Do(f) 179 return c 180 } 181 182 // DoAndReturn rewrite *gomock.Call.DoAndReturn 183 func (c *MockStreamFlowControllerGetWindowUpdateCall) DoAndReturn(f func() protocol.ByteCount) *MockStreamFlowControllerGetWindowUpdateCall { 184 c.Call = c.Call.DoAndReturn(f) 185 return c 186 } 187 188 // IsNewlyBlocked mocks base method. 189 func (m *MockStreamFlowController) IsNewlyBlocked() (bool, protocol.ByteCount) { 190 m.ctrl.T.Helper() 191 ret := m.ctrl.Call(m, "IsNewlyBlocked") 192 ret0, _ := ret[0].(bool) 193 ret1, _ := ret[1].(protocol.ByteCount) 194 return ret0, ret1 195 } 196 197 // IsNewlyBlocked indicates an expected call of IsNewlyBlocked. 198 func (mr *MockStreamFlowControllerMockRecorder) IsNewlyBlocked() *MockStreamFlowControllerIsNewlyBlockedCall { 199 mr.mock.ctrl.T.Helper() 200 call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "IsNewlyBlocked", reflect.TypeOf((*MockStreamFlowController)(nil).IsNewlyBlocked)) 201 return &MockStreamFlowControllerIsNewlyBlockedCall{Call: call} 202 } 203 204 // MockStreamFlowControllerIsNewlyBlockedCall wrap *gomock.Call 205 type MockStreamFlowControllerIsNewlyBlockedCall struct { 206 *gomock.Call 207 } 208 209 // Return rewrite *gomock.Call.Return 210 func (c *MockStreamFlowControllerIsNewlyBlockedCall) Return(arg0 bool, arg1 protocol.ByteCount) *MockStreamFlowControllerIsNewlyBlockedCall { 211 c.Call = c.Call.Return(arg0, arg1) 212 return c 213 } 214 215 // Do rewrite *gomock.Call.Do 216 func (c *MockStreamFlowControllerIsNewlyBlockedCall) Do(f func() (bool, protocol.ByteCount)) *MockStreamFlowControllerIsNewlyBlockedCall { 217 c.Call = c.Call.Do(f) 218 return c 219 } 220 221 // DoAndReturn rewrite *gomock.Call.DoAndReturn 222 func (c *MockStreamFlowControllerIsNewlyBlockedCall) DoAndReturn(f func() (bool, protocol.ByteCount)) *MockStreamFlowControllerIsNewlyBlockedCall { 223 c.Call = c.Call.DoAndReturn(f) 224 return c 225 } 226 227 // SendWindowSize mocks base method. 228 func (m *MockStreamFlowController) SendWindowSize() protocol.ByteCount { 229 m.ctrl.T.Helper() 230 ret := m.ctrl.Call(m, "SendWindowSize") 231 ret0, _ := ret[0].(protocol.ByteCount) 232 return ret0 233 } 234 235 // SendWindowSize indicates an expected call of SendWindowSize. 236 func (mr *MockStreamFlowControllerMockRecorder) SendWindowSize() *MockStreamFlowControllerSendWindowSizeCall { 237 mr.mock.ctrl.T.Helper() 238 call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "SendWindowSize", reflect.TypeOf((*MockStreamFlowController)(nil).SendWindowSize)) 239 return &MockStreamFlowControllerSendWindowSizeCall{Call: call} 240 } 241 242 // MockStreamFlowControllerSendWindowSizeCall wrap *gomock.Call 243 type MockStreamFlowControllerSendWindowSizeCall struct { 244 *gomock.Call 245 } 246 247 // Return rewrite *gomock.Call.Return 248 func (c *MockStreamFlowControllerSendWindowSizeCall) Return(arg0 protocol.ByteCount) *MockStreamFlowControllerSendWindowSizeCall { 249 c.Call = c.Call.Return(arg0) 250 return c 251 } 252 253 // Do rewrite *gomock.Call.Do 254 func (c *MockStreamFlowControllerSendWindowSizeCall) Do(f func() protocol.ByteCount) *MockStreamFlowControllerSendWindowSizeCall { 255 c.Call = c.Call.Do(f) 256 return c 257 } 258 259 // DoAndReturn rewrite *gomock.Call.DoAndReturn 260 func (c *MockStreamFlowControllerSendWindowSizeCall) DoAndReturn(f func() protocol.ByteCount) *MockStreamFlowControllerSendWindowSizeCall { 261 c.Call = c.Call.DoAndReturn(f) 262 return c 263 } 264 265 // UpdateHighestReceived mocks base method. 266 func (m *MockStreamFlowController) UpdateHighestReceived(arg0 protocol.ByteCount, arg1 bool) error { 267 m.ctrl.T.Helper() 268 ret := m.ctrl.Call(m, "UpdateHighestReceived", arg0, arg1) 269 ret0, _ := ret[0].(error) 270 return ret0 271 } 272 273 // UpdateHighestReceived indicates an expected call of UpdateHighestReceived. 274 func (mr *MockStreamFlowControllerMockRecorder) UpdateHighestReceived(arg0, arg1 any) *MockStreamFlowControllerUpdateHighestReceivedCall { 275 mr.mock.ctrl.T.Helper() 276 call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "UpdateHighestReceived", reflect.TypeOf((*MockStreamFlowController)(nil).UpdateHighestReceived), arg0, arg1) 277 return &MockStreamFlowControllerUpdateHighestReceivedCall{Call: call} 278 } 279 280 // MockStreamFlowControllerUpdateHighestReceivedCall wrap *gomock.Call 281 type MockStreamFlowControllerUpdateHighestReceivedCall struct { 282 *gomock.Call 283 } 284 285 // Return rewrite *gomock.Call.Return 286 func (c *MockStreamFlowControllerUpdateHighestReceivedCall) Return(arg0 error) *MockStreamFlowControllerUpdateHighestReceivedCall { 287 c.Call = c.Call.Return(arg0) 288 return c 289 } 290 291 // Do rewrite *gomock.Call.Do 292 func (c *MockStreamFlowControllerUpdateHighestReceivedCall) Do(f func(protocol.ByteCount, bool) error) *MockStreamFlowControllerUpdateHighestReceivedCall { 293 c.Call = c.Call.Do(f) 294 return c 295 } 296 297 // DoAndReturn rewrite *gomock.Call.DoAndReturn 298 func (c *MockStreamFlowControllerUpdateHighestReceivedCall) DoAndReturn(f func(protocol.ByteCount, bool) error) *MockStreamFlowControllerUpdateHighestReceivedCall { 299 c.Call = c.Call.DoAndReturn(f) 300 return c 301 } 302 303 // UpdateSendWindow mocks base method. 304 func (m *MockStreamFlowController) UpdateSendWindow(arg0 protocol.ByteCount) bool { 305 m.ctrl.T.Helper() 306 ret := m.ctrl.Call(m, "UpdateSendWindow", arg0) 307 ret0, _ := ret[0].(bool) 308 return ret0 309 } 310 311 // UpdateSendWindow indicates an expected call of UpdateSendWindow. 312 func (mr *MockStreamFlowControllerMockRecorder) UpdateSendWindow(arg0 any) *MockStreamFlowControllerUpdateSendWindowCall { 313 mr.mock.ctrl.T.Helper() 314 call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "UpdateSendWindow", reflect.TypeOf((*MockStreamFlowController)(nil).UpdateSendWindow), arg0) 315 return &MockStreamFlowControllerUpdateSendWindowCall{Call: call} 316 } 317 318 // MockStreamFlowControllerUpdateSendWindowCall wrap *gomock.Call 319 type MockStreamFlowControllerUpdateSendWindowCall struct { 320 *gomock.Call 321 } 322 323 // Return rewrite *gomock.Call.Return 324 func (c *MockStreamFlowControllerUpdateSendWindowCall) Return(arg0 bool) *MockStreamFlowControllerUpdateSendWindowCall { 325 c.Call = c.Call.Return(arg0) 326 return c 327 } 328 329 // Do rewrite *gomock.Call.Do 330 func (c *MockStreamFlowControllerUpdateSendWindowCall) Do(f func(protocol.ByteCount) bool) *MockStreamFlowControllerUpdateSendWindowCall { 331 c.Call = c.Call.Do(f) 332 return c 333 } 334 335 // DoAndReturn rewrite *gomock.Call.DoAndReturn 336 func (c *MockStreamFlowControllerUpdateSendWindowCall) DoAndReturn(f func(protocol.ByteCount) bool) *MockStreamFlowControllerUpdateSendWindowCall { 337 c.Call = c.Call.DoAndReturn(f) 338 return c 339 }