github.com/matrixorigin/matrixone@v1.2.0/pkg/frontend/test/iosession_mock.go (about)

     1  // Code generated by MockGen. DO NOT EDIT.
     2  // Source: ../../../vendor/github.com/fagongzi/goetty/v2/session.go
     3  
     4  // Package mock_frontend is a generated GoMock package.
     5  package mock_frontend
     6  
     7  import (
     8  	net "net"
     9  	reflect "reflect"
    10  	time "time"
    11  
    12  	goetty "github.com/fagongzi/goetty/v2"
    13  	buf "github.com/fagongzi/goetty/v2/buf"
    14  	gomock "github.com/golang/mock/gomock"
    15  )
    16  
    17  // MockIOSession is a mock of IOSession interface.
    18  type MockIOSession struct {
    19  	ctrl     *gomock.Controller
    20  	recorder *MockIOSessionMockRecorder
    21  }
    22  
    23  // MockIOSessionMockRecorder is the mock recorder for MockIOSession.
    24  type MockIOSessionMockRecorder struct {
    25  	mock *MockIOSession
    26  }
    27  
    28  // NewMockIOSession creates a new mock instance.
    29  func NewMockIOSession(ctrl *gomock.Controller) *MockIOSession {
    30  	mock := &MockIOSession{ctrl: ctrl}
    31  	mock.recorder = &MockIOSessionMockRecorder{mock}
    32  	return mock
    33  }
    34  
    35  // EXPECT returns an object that allows the caller to indicate expected use.
    36  func (m *MockIOSession) EXPECT() *MockIOSessionMockRecorder {
    37  	return m.recorder
    38  }
    39  
    40  // Close mocks base method.
    41  func (m *MockIOSession) Close() error {
    42  	m.ctrl.T.Helper()
    43  	ret := m.ctrl.Call(m, "Close")
    44  	ret0, _ := ret[0].(error)
    45  	return ret0
    46  }
    47  
    48  // Close indicates an expected call of Close.
    49  func (mr *MockIOSessionMockRecorder) Close() *gomock.Call {
    50  	mr.mock.ctrl.T.Helper()
    51  	return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Close", reflect.TypeOf((*MockIOSession)(nil).Close))
    52  }
    53  
    54  // Connect mocks base method.
    55  func (m *MockIOSession) Connect(addr string, timeout time.Duration) error {
    56  	m.ctrl.T.Helper()
    57  	ret := m.ctrl.Call(m, "Connect", addr, timeout)
    58  	ret0, _ := ret[0].(error)
    59  	return ret0
    60  }
    61  
    62  // Connect indicates an expected call of Connect.
    63  func (mr *MockIOSessionMockRecorder) Connect(addr, timeout interface{}) *gomock.Call {
    64  	mr.mock.ctrl.T.Helper()
    65  	return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Connect", reflect.TypeOf((*MockIOSession)(nil).Connect), addr, timeout)
    66  }
    67  
    68  // Connected mocks base method.
    69  func (m *MockIOSession) Connected() bool {
    70  	m.ctrl.T.Helper()
    71  	ret := m.ctrl.Call(m, "Connected")
    72  	ret0, _ := ret[0].(bool)
    73  	return ret0
    74  }
    75  
    76  // Connected indicates an expected call of Connected.
    77  func (mr *MockIOSessionMockRecorder) Connected() *gomock.Call {
    78  	mr.mock.ctrl.T.Helper()
    79  	return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Connected", reflect.TypeOf((*MockIOSession)(nil).Connected))
    80  }
    81  
    82  // Disconnect mocks base method.
    83  func (m *MockIOSession) Disconnect() error {
    84  	m.ctrl.T.Helper()
    85  	ret := m.ctrl.Call(m, "Disconnect")
    86  	ret0, _ := ret[0].(error)
    87  	return ret0
    88  }
    89  
    90  // Disconnect indicates an expected call of Disconnect.
    91  func (mr *MockIOSessionMockRecorder) Disconnect() *gomock.Call {
    92  	mr.mock.ctrl.T.Helper()
    93  	return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Disconnect", reflect.TypeOf((*MockIOSession)(nil).Disconnect))
    94  }
    95  
    96  // Flush mocks base method.
    97  func (m *MockIOSession) Flush(timeout time.Duration) error {
    98  	m.ctrl.T.Helper()
    99  	ret := m.ctrl.Call(m, "Flush", timeout)
   100  	ret0, _ := ret[0].(error)
   101  	return ret0
   102  }
   103  
   104  // Flush indicates an expected call of Flush.
   105  func (mr *MockIOSessionMockRecorder) Flush(timeout interface{}) *gomock.Call {
   106  	mr.mock.ctrl.T.Helper()
   107  	return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Flush", reflect.TypeOf((*MockIOSession)(nil).Flush), timeout)
   108  }
   109  
   110  // ID mocks base method.
   111  func (m *MockIOSession) ID() uint64 {
   112  	m.ctrl.T.Helper()
   113  	ret := m.ctrl.Call(m, "ID")
   114  	ret0, _ := ret[0].(uint64)
   115  	return ret0
   116  }
   117  
   118  // ID indicates an expected call of ID.
   119  func (mr *MockIOSessionMockRecorder) ID() *gomock.Call {
   120  	mr.mock.ctrl.T.Helper()
   121  	return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "ID", reflect.TypeOf((*MockIOSession)(nil).ID))
   122  }
   123  
   124  // OutBuf mocks base method.
   125  func (m *MockIOSession) OutBuf() *buf.ByteBuf {
   126  	m.ctrl.T.Helper()
   127  	ret := m.ctrl.Call(m, "OutBuf")
   128  	ret0, _ := ret[0].(*buf.ByteBuf)
   129  	return ret0
   130  }
   131  
   132  // OutBuf indicates an expected call of OutBuf.
   133  func (mr *MockIOSessionMockRecorder) OutBuf() *gomock.Call {
   134  	mr.mock.ctrl.T.Helper()
   135  	return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "OutBuf", reflect.TypeOf((*MockIOSession)(nil).OutBuf))
   136  }
   137  
   138  // RawConn mocks base method.
   139  func (m *MockIOSession) RawConn() net.Conn {
   140  	m.ctrl.T.Helper()
   141  	ret := m.ctrl.Call(m, "RawConn")
   142  	ret0, _ := ret[0].(net.Conn)
   143  	return ret0
   144  }
   145  
   146  // RawConn indicates an expected call of RawConn.
   147  func (mr *MockIOSessionMockRecorder) RawConn() *gomock.Call {
   148  	mr.mock.ctrl.T.Helper()
   149  	return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "RawConn", reflect.TypeOf((*MockIOSession)(nil).RawConn))
   150  }
   151  
   152  // Read mocks base method.
   153  func (m *MockIOSession) Read(option goetty.ReadOptions) (any, error) {
   154  	m.ctrl.T.Helper()
   155  	ret := m.ctrl.Call(m, "Read", option)
   156  	ret0, _ := ret[0].(any)
   157  	ret1, _ := ret[1].(error)
   158  	return ret0, ret1
   159  }
   160  
   161  // Read indicates an expected call of Read.
   162  func (mr *MockIOSessionMockRecorder) Read(option interface{}) *gomock.Call {
   163  	mr.mock.ctrl.T.Helper()
   164  	return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Read", reflect.TypeOf((*MockIOSession)(nil).Read), option)
   165  }
   166  
   167  // Ref mocks base method.
   168  func (m *MockIOSession) Ref() {
   169  	m.ctrl.T.Helper()
   170  	m.ctrl.Call(m, "Ref")
   171  }
   172  
   173  // Ref indicates an expected call of Ref.
   174  func (mr *MockIOSessionMockRecorder) Ref() *gomock.Call {
   175  	mr.mock.ctrl.T.Helper()
   176  	return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Ref", reflect.TypeOf((*MockIOSession)(nil).Ref))
   177  }
   178  
   179  // RemoteAddress mocks base method.
   180  func (m *MockIOSession) RemoteAddress() string {
   181  	m.ctrl.T.Helper()
   182  	ret := m.ctrl.Call(m, "RemoteAddress")
   183  	ret0, _ := ret[0].(string)
   184  	return ret0
   185  }
   186  
   187  // RemoteAddress indicates an expected call of RemoteAddress.
   188  func (mr *MockIOSessionMockRecorder) RemoteAddress() *gomock.Call {
   189  	mr.mock.ctrl.T.Helper()
   190  	return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "RemoteAddress", reflect.TypeOf((*MockIOSession)(nil).RemoteAddress))
   191  }
   192  
   193  // UseConn mocks base method.
   194  func (m *MockIOSession) UseConn(arg0 net.Conn) {
   195  	m.ctrl.T.Helper()
   196  	m.ctrl.Call(m, "UseConn", arg0)
   197  }
   198  
   199  // UseConn indicates an expected call of UseConn.
   200  func (mr *MockIOSessionMockRecorder) UseConn(arg0 interface{}) *gomock.Call {
   201  	mr.mock.ctrl.T.Helper()
   202  	return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "UseConn", reflect.TypeOf((*MockIOSession)(nil).UseConn), arg0)
   203  }
   204  
   205  // Write mocks base method.
   206  func (m *MockIOSession) Write(msg any, options goetty.WriteOptions) error {
   207  	m.ctrl.T.Helper()
   208  	ret := m.ctrl.Call(m, "Write", msg, options)
   209  	ret0, _ := ret[0].(error)
   210  	return ret0
   211  }
   212  
   213  // Write indicates an expected call of Write.
   214  func (mr *MockIOSessionMockRecorder) Write(msg, options interface{}) *gomock.Call {
   215  	mr.mock.ctrl.T.Helper()
   216  	return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Write", reflect.TypeOf((*MockIOSession)(nil).Write), msg, options)
   217  }