github.com/MerlinKodo/quic-go@v0.39.2/internal/mocks/quic/early_conn.go (about)

     1  // Code generated by MockGen. DO NOT EDIT.
     2  // Source: github.com/MerlinKodo/quic-go (interfaces: EarlyConnection)
     3  //
     4  // Generated by this command:
     5  //
     6  //	mockgen -build_flags=-tags=gomock -package mockquic -destination quic/early_conn_tmp.go github.com/MerlinKodo/quic-go EarlyConnection
     7  //
     8  // Package mockquic is a generated GoMock package.
     9  package mockquic
    10  
    11  import (
    12  	context "context"
    13  	net "net"
    14  	reflect "reflect"
    15  
    16  	quic "github.com/MerlinKodo/quic-go"
    17  	congestion "github.com/MerlinKodo/quic-go/congestion"
    18  	qerr "github.com/MerlinKodo/quic-go/internal/qerr"
    19  	gomock "go.uber.org/mock/gomock"
    20  )
    21  
    22  // MockEarlyConnection is a mock of EarlyConnection interface.
    23  type MockEarlyConnection struct {
    24  	ctrl     *gomock.Controller
    25  	recorder *MockEarlyConnectionMockRecorder
    26  }
    27  
    28  // MockEarlyConnectionMockRecorder is the mock recorder for MockEarlyConnection.
    29  type MockEarlyConnectionMockRecorder struct {
    30  	mock *MockEarlyConnection
    31  }
    32  
    33  // NewMockEarlyConnection creates a new mock instance.
    34  func NewMockEarlyConnection(ctrl *gomock.Controller) *MockEarlyConnection {
    35  	mock := &MockEarlyConnection{ctrl: ctrl}
    36  	mock.recorder = &MockEarlyConnectionMockRecorder{mock}
    37  	return mock
    38  }
    39  
    40  // EXPECT returns an object that allows the caller to indicate expected use.
    41  func (m *MockEarlyConnection) EXPECT() *MockEarlyConnectionMockRecorder {
    42  	return m.recorder
    43  }
    44  
    45  // AcceptStream mocks base method.
    46  func (m *MockEarlyConnection) AcceptStream(arg0 context.Context) (quic.Stream, error) {
    47  	m.ctrl.T.Helper()
    48  	ret := m.ctrl.Call(m, "AcceptStream", arg0)
    49  	ret0, _ := ret[0].(quic.Stream)
    50  	ret1, _ := ret[1].(error)
    51  	return ret0, ret1
    52  }
    53  
    54  // AcceptStream indicates an expected call of AcceptStream.
    55  func (mr *MockEarlyConnectionMockRecorder) AcceptStream(arg0 any) *gomock.Call {
    56  	mr.mock.ctrl.T.Helper()
    57  	return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "AcceptStream", reflect.TypeOf((*MockEarlyConnection)(nil).AcceptStream), arg0)
    58  }
    59  
    60  // AcceptUniStream mocks base method.
    61  func (m *MockEarlyConnection) AcceptUniStream(arg0 context.Context) (quic.ReceiveStream, error) {
    62  	m.ctrl.T.Helper()
    63  	ret := m.ctrl.Call(m, "AcceptUniStream", arg0)
    64  	ret0, _ := ret[0].(quic.ReceiveStream)
    65  	ret1, _ := ret[1].(error)
    66  	return ret0, ret1
    67  }
    68  
    69  // AcceptUniStream indicates an expected call of AcceptUniStream.
    70  func (mr *MockEarlyConnectionMockRecorder) AcceptUniStream(arg0 any) *gomock.Call {
    71  	mr.mock.ctrl.T.Helper()
    72  	return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "AcceptUniStream", reflect.TypeOf((*MockEarlyConnection)(nil).AcceptUniStream), arg0)
    73  }
    74  
    75  // CloseWithError mocks base method.
    76  func (m *MockEarlyConnection) CloseWithError(arg0 qerr.ApplicationErrorCode, arg1 string) error {
    77  	m.ctrl.T.Helper()
    78  	ret := m.ctrl.Call(m, "CloseWithError", arg0, arg1)
    79  	ret0, _ := ret[0].(error)
    80  	return ret0
    81  }
    82  
    83  // CloseWithError indicates an expected call of CloseWithError.
    84  func (mr *MockEarlyConnectionMockRecorder) CloseWithError(arg0, arg1 any) *gomock.Call {
    85  	mr.mock.ctrl.T.Helper()
    86  	return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "CloseWithError", reflect.TypeOf((*MockEarlyConnection)(nil).CloseWithError), arg0, arg1)
    87  }
    88  
    89  // ConnectionState mocks base method.
    90  func (m *MockEarlyConnection) ConnectionState() quic.ConnectionState {
    91  	m.ctrl.T.Helper()
    92  	ret := m.ctrl.Call(m, "ConnectionState")
    93  	ret0, _ := ret[0].(quic.ConnectionState)
    94  	return ret0
    95  }
    96  
    97  // ConnectionState indicates an expected call of ConnectionState.
    98  func (mr *MockEarlyConnectionMockRecorder) ConnectionState() *gomock.Call {
    99  	mr.mock.ctrl.T.Helper()
   100  	return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "ConnectionState", reflect.TypeOf((*MockEarlyConnection)(nil).ConnectionState))
   101  }
   102  
   103  // Context mocks base method.
   104  func (m *MockEarlyConnection) Context() context.Context {
   105  	m.ctrl.T.Helper()
   106  	ret := m.ctrl.Call(m, "Context")
   107  	ret0, _ := ret[0].(context.Context)
   108  	return ret0
   109  }
   110  
   111  // Context indicates an expected call of Context.
   112  func (mr *MockEarlyConnectionMockRecorder) Context() *gomock.Call {
   113  	mr.mock.ctrl.T.Helper()
   114  	return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Context", reflect.TypeOf((*MockEarlyConnection)(nil).Context))
   115  }
   116  
   117  // HandshakeComplete mocks base method.
   118  func (m *MockEarlyConnection) HandshakeComplete() <-chan struct{} {
   119  	m.ctrl.T.Helper()
   120  	ret := m.ctrl.Call(m, "HandshakeComplete")
   121  	ret0, _ := ret[0].(<-chan struct{})
   122  	return ret0
   123  }
   124  
   125  // HandshakeComplete indicates an expected call of HandshakeComplete.
   126  func (mr *MockEarlyConnectionMockRecorder) HandshakeComplete() *gomock.Call {
   127  	mr.mock.ctrl.T.Helper()
   128  	return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "HandshakeComplete", reflect.TypeOf((*MockEarlyConnection)(nil).HandshakeComplete))
   129  }
   130  
   131  // LocalAddr mocks base method.
   132  func (m *MockEarlyConnection) LocalAddr() net.Addr {
   133  	m.ctrl.T.Helper()
   134  	ret := m.ctrl.Call(m, "LocalAddr")
   135  	ret0, _ := ret[0].(net.Addr)
   136  	return ret0
   137  }
   138  
   139  // LocalAddr indicates an expected call of LocalAddr.
   140  func (mr *MockEarlyConnectionMockRecorder) LocalAddr() *gomock.Call {
   141  	mr.mock.ctrl.T.Helper()
   142  	return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "LocalAddr", reflect.TypeOf((*MockEarlyConnection)(nil).LocalAddr))
   143  }
   144  
   145  // NextConnection mocks base method.
   146  func (m *MockEarlyConnection) NextConnection() quic.Connection {
   147  	m.ctrl.T.Helper()
   148  	ret := m.ctrl.Call(m, "NextConnection")
   149  	ret0, _ := ret[0].(quic.Connection)
   150  	return ret0
   151  }
   152  
   153  // NextConnection indicates an expected call of NextConnection.
   154  func (mr *MockEarlyConnectionMockRecorder) NextConnection() *gomock.Call {
   155  	mr.mock.ctrl.T.Helper()
   156  	return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "NextConnection", reflect.TypeOf((*MockEarlyConnection)(nil).NextConnection))
   157  }
   158  
   159  // OpenStream mocks base method.
   160  func (m *MockEarlyConnection) OpenStream() (quic.Stream, error) {
   161  	m.ctrl.T.Helper()
   162  	ret := m.ctrl.Call(m, "OpenStream")
   163  	ret0, _ := ret[0].(quic.Stream)
   164  	ret1, _ := ret[1].(error)
   165  	return ret0, ret1
   166  }
   167  
   168  // OpenStream indicates an expected call of OpenStream.
   169  func (mr *MockEarlyConnectionMockRecorder) OpenStream() *gomock.Call {
   170  	mr.mock.ctrl.T.Helper()
   171  	return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "OpenStream", reflect.TypeOf((*MockEarlyConnection)(nil).OpenStream))
   172  }
   173  
   174  // OpenStreamSync mocks base method.
   175  func (m *MockEarlyConnection) OpenStreamSync(arg0 context.Context) (quic.Stream, error) {
   176  	m.ctrl.T.Helper()
   177  	ret := m.ctrl.Call(m, "OpenStreamSync", arg0)
   178  	ret0, _ := ret[0].(quic.Stream)
   179  	ret1, _ := ret[1].(error)
   180  	return ret0, ret1
   181  }
   182  
   183  // OpenStreamSync indicates an expected call of OpenStreamSync.
   184  func (mr *MockEarlyConnectionMockRecorder) OpenStreamSync(arg0 any) *gomock.Call {
   185  	mr.mock.ctrl.T.Helper()
   186  	return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "OpenStreamSync", reflect.TypeOf((*MockEarlyConnection)(nil).OpenStreamSync), arg0)
   187  }
   188  
   189  // OpenUniStream mocks base method.
   190  func (m *MockEarlyConnection) OpenUniStream() (quic.SendStream, error) {
   191  	m.ctrl.T.Helper()
   192  	ret := m.ctrl.Call(m, "OpenUniStream")
   193  	ret0, _ := ret[0].(quic.SendStream)
   194  	ret1, _ := ret[1].(error)
   195  	return ret0, ret1
   196  }
   197  
   198  // OpenUniStream indicates an expected call of OpenUniStream.
   199  func (mr *MockEarlyConnectionMockRecorder) OpenUniStream() *gomock.Call {
   200  	mr.mock.ctrl.T.Helper()
   201  	return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "OpenUniStream", reflect.TypeOf((*MockEarlyConnection)(nil).OpenUniStream))
   202  }
   203  
   204  // OpenUniStreamSync mocks base method.
   205  func (m *MockEarlyConnection) OpenUniStreamSync(arg0 context.Context) (quic.SendStream, error) {
   206  	m.ctrl.T.Helper()
   207  	ret := m.ctrl.Call(m, "OpenUniStreamSync", arg0)
   208  	ret0, _ := ret[0].(quic.SendStream)
   209  	ret1, _ := ret[1].(error)
   210  	return ret0, ret1
   211  }
   212  
   213  // OpenUniStreamSync indicates an expected call of OpenUniStreamSync.
   214  func (mr *MockEarlyConnectionMockRecorder) OpenUniStreamSync(arg0 any) *gomock.Call {
   215  	mr.mock.ctrl.T.Helper()
   216  	return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "OpenUniStreamSync", reflect.TypeOf((*MockEarlyConnection)(nil).OpenUniStreamSync), arg0)
   217  }
   218  
   219  // ReceiveMessage mocks base method.
   220  func (m *MockEarlyConnection) ReceiveMessage(arg0 context.Context) ([]byte, error) {
   221  	m.ctrl.T.Helper()
   222  	ret := m.ctrl.Call(m, "ReceiveMessage", arg0)
   223  	ret0, _ := ret[0].([]byte)
   224  	ret1, _ := ret[1].(error)
   225  	return ret0, ret1
   226  }
   227  
   228  // ReceiveMessage indicates an expected call of ReceiveMessage.
   229  func (mr *MockEarlyConnectionMockRecorder) ReceiveMessage(arg0 any) *gomock.Call {
   230  	mr.mock.ctrl.T.Helper()
   231  	return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "ReceiveMessage", reflect.TypeOf((*MockEarlyConnection)(nil).ReceiveMessage), arg0)
   232  }
   233  
   234  // RemoteAddr mocks base method.
   235  func (m *MockEarlyConnection) RemoteAddr() net.Addr {
   236  	m.ctrl.T.Helper()
   237  	ret := m.ctrl.Call(m, "RemoteAddr")
   238  	ret0, _ := ret[0].(net.Addr)
   239  	return ret0
   240  }
   241  
   242  // RemoteAddr indicates an expected call of RemoteAddr.
   243  func (mr *MockEarlyConnectionMockRecorder) RemoteAddr() *gomock.Call {
   244  	mr.mock.ctrl.T.Helper()
   245  	return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "RemoteAddr", reflect.TypeOf((*MockEarlyConnection)(nil).RemoteAddr))
   246  }
   247  
   248  // SendMessage mocks base method.
   249  func (m *MockEarlyConnection) SendMessage(arg0 []byte) error {
   250  	m.ctrl.T.Helper()
   251  	ret := m.ctrl.Call(m, "SendMessage", arg0)
   252  	ret0, _ := ret[0].(error)
   253  	return ret0
   254  }
   255  
   256  // SendMessage indicates an expected call of SendMessage.
   257  func (mr *MockEarlyConnectionMockRecorder) SendMessage(arg0 any) *gomock.Call {
   258  	mr.mock.ctrl.T.Helper()
   259  	return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "SendMessage", reflect.TypeOf((*MockEarlyConnection)(nil).SendMessage), arg0)
   260  }
   261  
   262  // SetCongestionControl mocks base method.
   263  func (m *MockEarlyConnection) SetCongestionControl(arg0 congestion.CongestionControl) {
   264  	m.ctrl.T.Helper()
   265  	m.ctrl.Call(m, "SetCongestionControl", arg0)
   266  }
   267  
   268  // SetCongestionControl indicates an expected call of SetCongestionControl.
   269  func (mr *MockEarlyConnectionMockRecorder) SetCongestionControl(arg0 interface{}) *gomock.Call {
   270  	mr.mock.ctrl.T.Helper()
   271  	return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "SetCongestionControl", reflect.TypeOf((*MockEarlyConnection)(nil).SetCongestionControl), arg0)
   272  }