github.com/apernet/quic-go@v0.43.1-0.20240515053213-5e9e635fd9f0/internal/mocks/ackhandler/received_packet_handler.go (about)

     1  // Code generated by MockGen. DO NOT EDIT.
     2  // Source: github.com/apernet/quic-go/internal/ackhandler (interfaces: ReceivedPacketHandler)
     3  //
     4  // Generated by this command:
     5  //
     6  //	mockgen -typed -build_flags=-tags=gomock -package mockackhandler -destination ackhandler/received_packet_handler.go github.com/apernet/quic-go/internal/ackhandler ReceivedPacketHandler
     7  //
     8  
     9  // Package mockackhandler is a generated GoMock package.
    10  package mockackhandler
    11  
    12  import (
    13  	reflect "reflect"
    14  	time "time"
    15  
    16  	protocol "github.com/apernet/quic-go/internal/protocol"
    17  	wire "github.com/apernet/quic-go/internal/wire"
    18  	gomock "go.uber.org/mock/gomock"
    19  )
    20  
    21  // MockReceivedPacketHandler is a mock of ReceivedPacketHandler interface.
    22  type MockReceivedPacketHandler struct {
    23  	ctrl     *gomock.Controller
    24  	recorder *MockReceivedPacketHandlerMockRecorder
    25  }
    26  
    27  // MockReceivedPacketHandlerMockRecorder is the mock recorder for MockReceivedPacketHandler.
    28  type MockReceivedPacketHandlerMockRecorder struct {
    29  	mock *MockReceivedPacketHandler
    30  }
    31  
    32  // NewMockReceivedPacketHandler creates a new mock instance.
    33  func NewMockReceivedPacketHandler(ctrl *gomock.Controller) *MockReceivedPacketHandler {
    34  	mock := &MockReceivedPacketHandler{ctrl: ctrl}
    35  	mock.recorder = &MockReceivedPacketHandlerMockRecorder{mock}
    36  	return mock
    37  }
    38  
    39  // EXPECT returns an object that allows the caller to indicate expected use.
    40  func (m *MockReceivedPacketHandler) EXPECT() *MockReceivedPacketHandlerMockRecorder {
    41  	return m.recorder
    42  }
    43  
    44  // DropPackets mocks base method.
    45  func (m *MockReceivedPacketHandler) DropPackets(arg0 protocol.EncryptionLevel) {
    46  	m.ctrl.T.Helper()
    47  	m.ctrl.Call(m, "DropPackets", arg0)
    48  }
    49  
    50  // DropPackets indicates an expected call of DropPackets.
    51  func (mr *MockReceivedPacketHandlerMockRecorder) DropPackets(arg0 any) *MockReceivedPacketHandlerDropPacketsCall {
    52  	mr.mock.ctrl.T.Helper()
    53  	call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "DropPackets", reflect.TypeOf((*MockReceivedPacketHandler)(nil).DropPackets), arg0)
    54  	return &MockReceivedPacketHandlerDropPacketsCall{Call: call}
    55  }
    56  
    57  // MockReceivedPacketHandlerDropPacketsCall wrap *gomock.Call
    58  type MockReceivedPacketHandlerDropPacketsCall struct {
    59  	*gomock.Call
    60  }
    61  
    62  // Return rewrite *gomock.Call.Return
    63  func (c *MockReceivedPacketHandlerDropPacketsCall) Return() *MockReceivedPacketHandlerDropPacketsCall {
    64  	c.Call = c.Call.Return()
    65  	return c
    66  }
    67  
    68  // Do rewrite *gomock.Call.Do
    69  func (c *MockReceivedPacketHandlerDropPacketsCall) Do(f func(protocol.EncryptionLevel)) *MockReceivedPacketHandlerDropPacketsCall {
    70  	c.Call = c.Call.Do(f)
    71  	return c
    72  }
    73  
    74  // DoAndReturn rewrite *gomock.Call.DoAndReturn
    75  func (c *MockReceivedPacketHandlerDropPacketsCall) DoAndReturn(f func(protocol.EncryptionLevel)) *MockReceivedPacketHandlerDropPacketsCall {
    76  	c.Call = c.Call.DoAndReturn(f)
    77  	return c
    78  }
    79  
    80  // GetAckFrame mocks base method.
    81  func (m *MockReceivedPacketHandler) GetAckFrame(arg0 protocol.EncryptionLevel, arg1 bool) *wire.AckFrame {
    82  	m.ctrl.T.Helper()
    83  	ret := m.ctrl.Call(m, "GetAckFrame", arg0, arg1)
    84  	ret0, _ := ret[0].(*wire.AckFrame)
    85  	return ret0
    86  }
    87  
    88  // GetAckFrame indicates an expected call of GetAckFrame.
    89  func (mr *MockReceivedPacketHandlerMockRecorder) GetAckFrame(arg0, arg1 any) *MockReceivedPacketHandlerGetAckFrameCall {
    90  	mr.mock.ctrl.T.Helper()
    91  	call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "GetAckFrame", reflect.TypeOf((*MockReceivedPacketHandler)(nil).GetAckFrame), arg0, arg1)
    92  	return &MockReceivedPacketHandlerGetAckFrameCall{Call: call}
    93  }
    94  
    95  // MockReceivedPacketHandlerGetAckFrameCall wrap *gomock.Call
    96  type MockReceivedPacketHandlerGetAckFrameCall struct {
    97  	*gomock.Call
    98  }
    99  
   100  // Return rewrite *gomock.Call.Return
   101  func (c *MockReceivedPacketHandlerGetAckFrameCall) Return(arg0 *wire.AckFrame) *MockReceivedPacketHandlerGetAckFrameCall {
   102  	c.Call = c.Call.Return(arg0)
   103  	return c
   104  }
   105  
   106  // Do rewrite *gomock.Call.Do
   107  func (c *MockReceivedPacketHandlerGetAckFrameCall) Do(f func(protocol.EncryptionLevel, bool) *wire.AckFrame) *MockReceivedPacketHandlerGetAckFrameCall {
   108  	c.Call = c.Call.Do(f)
   109  	return c
   110  }
   111  
   112  // DoAndReturn rewrite *gomock.Call.DoAndReturn
   113  func (c *MockReceivedPacketHandlerGetAckFrameCall) DoAndReturn(f func(protocol.EncryptionLevel, bool) *wire.AckFrame) *MockReceivedPacketHandlerGetAckFrameCall {
   114  	c.Call = c.Call.DoAndReturn(f)
   115  	return c
   116  }
   117  
   118  // GetAlarmTimeout mocks base method.
   119  func (m *MockReceivedPacketHandler) GetAlarmTimeout() time.Time {
   120  	m.ctrl.T.Helper()
   121  	ret := m.ctrl.Call(m, "GetAlarmTimeout")
   122  	ret0, _ := ret[0].(time.Time)
   123  	return ret0
   124  }
   125  
   126  // GetAlarmTimeout indicates an expected call of GetAlarmTimeout.
   127  func (mr *MockReceivedPacketHandlerMockRecorder) GetAlarmTimeout() *MockReceivedPacketHandlerGetAlarmTimeoutCall {
   128  	mr.mock.ctrl.T.Helper()
   129  	call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "GetAlarmTimeout", reflect.TypeOf((*MockReceivedPacketHandler)(nil).GetAlarmTimeout))
   130  	return &MockReceivedPacketHandlerGetAlarmTimeoutCall{Call: call}
   131  }
   132  
   133  // MockReceivedPacketHandlerGetAlarmTimeoutCall wrap *gomock.Call
   134  type MockReceivedPacketHandlerGetAlarmTimeoutCall struct {
   135  	*gomock.Call
   136  }
   137  
   138  // Return rewrite *gomock.Call.Return
   139  func (c *MockReceivedPacketHandlerGetAlarmTimeoutCall) Return(arg0 time.Time) *MockReceivedPacketHandlerGetAlarmTimeoutCall {
   140  	c.Call = c.Call.Return(arg0)
   141  	return c
   142  }
   143  
   144  // Do rewrite *gomock.Call.Do
   145  func (c *MockReceivedPacketHandlerGetAlarmTimeoutCall) Do(f func() time.Time) *MockReceivedPacketHandlerGetAlarmTimeoutCall {
   146  	c.Call = c.Call.Do(f)
   147  	return c
   148  }
   149  
   150  // DoAndReturn rewrite *gomock.Call.DoAndReturn
   151  func (c *MockReceivedPacketHandlerGetAlarmTimeoutCall) DoAndReturn(f func() time.Time) *MockReceivedPacketHandlerGetAlarmTimeoutCall {
   152  	c.Call = c.Call.DoAndReturn(f)
   153  	return c
   154  }
   155  
   156  // IsPotentiallyDuplicate mocks base method.
   157  func (m *MockReceivedPacketHandler) IsPotentiallyDuplicate(arg0 protocol.PacketNumber, arg1 protocol.EncryptionLevel) bool {
   158  	m.ctrl.T.Helper()
   159  	ret := m.ctrl.Call(m, "IsPotentiallyDuplicate", arg0, arg1)
   160  	ret0, _ := ret[0].(bool)
   161  	return ret0
   162  }
   163  
   164  // IsPotentiallyDuplicate indicates an expected call of IsPotentiallyDuplicate.
   165  func (mr *MockReceivedPacketHandlerMockRecorder) IsPotentiallyDuplicate(arg0, arg1 any) *MockReceivedPacketHandlerIsPotentiallyDuplicateCall {
   166  	mr.mock.ctrl.T.Helper()
   167  	call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "IsPotentiallyDuplicate", reflect.TypeOf((*MockReceivedPacketHandler)(nil).IsPotentiallyDuplicate), arg0, arg1)
   168  	return &MockReceivedPacketHandlerIsPotentiallyDuplicateCall{Call: call}
   169  }
   170  
   171  // MockReceivedPacketHandlerIsPotentiallyDuplicateCall wrap *gomock.Call
   172  type MockReceivedPacketHandlerIsPotentiallyDuplicateCall struct {
   173  	*gomock.Call
   174  }
   175  
   176  // Return rewrite *gomock.Call.Return
   177  func (c *MockReceivedPacketHandlerIsPotentiallyDuplicateCall) Return(arg0 bool) *MockReceivedPacketHandlerIsPotentiallyDuplicateCall {
   178  	c.Call = c.Call.Return(arg0)
   179  	return c
   180  }
   181  
   182  // Do rewrite *gomock.Call.Do
   183  func (c *MockReceivedPacketHandlerIsPotentiallyDuplicateCall) Do(f func(protocol.PacketNumber, protocol.EncryptionLevel) bool) *MockReceivedPacketHandlerIsPotentiallyDuplicateCall {
   184  	c.Call = c.Call.Do(f)
   185  	return c
   186  }
   187  
   188  // DoAndReturn rewrite *gomock.Call.DoAndReturn
   189  func (c *MockReceivedPacketHandlerIsPotentiallyDuplicateCall) DoAndReturn(f func(protocol.PacketNumber, protocol.EncryptionLevel) bool) *MockReceivedPacketHandlerIsPotentiallyDuplicateCall {
   190  	c.Call = c.Call.DoAndReturn(f)
   191  	return c
   192  }
   193  
   194  // ReceivedPacket mocks base method.
   195  func (m *MockReceivedPacketHandler) ReceivedPacket(arg0 protocol.PacketNumber, arg1 protocol.ECN, arg2 protocol.EncryptionLevel, arg3 time.Time, arg4 bool) error {
   196  	m.ctrl.T.Helper()
   197  	ret := m.ctrl.Call(m, "ReceivedPacket", arg0, arg1, arg2, arg3, arg4)
   198  	ret0, _ := ret[0].(error)
   199  	return ret0
   200  }
   201  
   202  // ReceivedPacket indicates an expected call of ReceivedPacket.
   203  func (mr *MockReceivedPacketHandlerMockRecorder) ReceivedPacket(arg0, arg1, arg2, arg3, arg4 any) *MockReceivedPacketHandlerReceivedPacketCall {
   204  	mr.mock.ctrl.T.Helper()
   205  	call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "ReceivedPacket", reflect.TypeOf((*MockReceivedPacketHandler)(nil).ReceivedPacket), arg0, arg1, arg2, arg3, arg4)
   206  	return &MockReceivedPacketHandlerReceivedPacketCall{Call: call}
   207  }
   208  
   209  // MockReceivedPacketHandlerReceivedPacketCall wrap *gomock.Call
   210  type MockReceivedPacketHandlerReceivedPacketCall struct {
   211  	*gomock.Call
   212  }
   213  
   214  // Return rewrite *gomock.Call.Return
   215  func (c *MockReceivedPacketHandlerReceivedPacketCall) Return(arg0 error) *MockReceivedPacketHandlerReceivedPacketCall {
   216  	c.Call = c.Call.Return(arg0)
   217  	return c
   218  }
   219  
   220  // Do rewrite *gomock.Call.Do
   221  func (c *MockReceivedPacketHandlerReceivedPacketCall) Do(f func(protocol.PacketNumber, protocol.ECN, protocol.EncryptionLevel, time.Time, bool) error) *MockReceivedPacketHandlerReceivedPacketCall {
   222  	c.Call = c.Call.Do(f)
   223  	return c
   224  }
   225  
   226  // DoAndReturn rewrite *gomock.Call.DoAndReturn
   227  func (c *MockReceivedPacketHandlerReceivedPacketCall) DoAndReturn(f func(protocol.PacketNumber, protocol.ECN, protocol.EncryptionLevel, time.Time, bool) error) *MockReceivedPacketHandlerReceivedPacketCall {
   228  	c.Call = c.Call.DoAndReturn(f)
   229  	return c
   230  }