github.com/aergoio/aergo@v1.3.1/p2p/p2pmock/mock_stream.go (about)

     1  // Code generated by MockGen. DO NOT EDIT.
     2  // Source: github.com/libp2p/go-libp2p-core/network (interfaces: Stream)
     3  
     4  // Package mock_network is a generated GoMock package.
     5  package p2pmock
     6  
     7  import (
     8  	gomock "github.com/golang/mock/gomock"
     9  	network "github.com/libp2p/go-libp2p-core/network"
    10  	protocol "github.com/libp2p/go-libp2p-core/protocol"
    11  	reflect "reflect"
    12  	time "time"
    13  )
    14  
    15  // MockStream is a mock of Stream interface
    16  type MockStream struct {
    17  	ctrl     *gomock.Controller
    18  	recorder *MockStreamMockRecorder
    19  }
    20  
    21  // MockStreamMockRecorder is the mock recorder for MockStream
    22  type MockStreamMockRecorder struct {
    23  	mock *MockStream
    24  }
    25  
    26  // NewMockStream creates a new mock instance
    27  func NewMockStream(ctrl *gomock.Controller) *MockStream {
    28  	mock := &MockStream{ctrl: ctrl}
    29  	mock.recorder = &MockStreamMockRecorder{mock}
    30  	return mock
    31  }
    32  
    33  // EXPECT returns an object that allows the caller to indicate expected use
    34  func (m *MockStream) EXPECT() *MockStreamMockRecorder {
    35  	return m.recorder
    36  }
    37  
    38  // Close mocks base method
    39  func (m *MockStream) Close() error {
    40  	m.ctrl.T.Helper()
    41  	ret := m.ctrl.Call(m, "Close")
    42  	ret0, _ := ret[0].(error)
    43  	return ret0
    44  }
    45  
    46  // Close indicates an expected call of Close
    47  func (mr *MockStreamMockRecorder) Close() *gomock.Call {
    48  	mr.mock.ctrl.T.Helper()
    49  	return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Close", reflect.TypeOf((*MockStream)(nil).Close))
    50  }
    51  
    52  // Conn mocks base method
    53  func (m *MockStream) Conn() network.Conn {
    54  	m.ctrl.T.Helper()
    55  	ret := m.ctrl.Call(m, "Conn")
    56  	ret0, _ := ret[0].(network.Conn)
    57  	return ret0
    58  }
    59  
    60  // Conn indicates an expected call of Conn
    61  func (mr *MockStreamMockRecorder) Conn() *gomock.Call {
    62  	mr.mock.ctrl.T.Helper()
    63  	return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Conn", reflect.TypeOf((*MockStream)(nil).Conn))
    64  }
    65  
    66  // Protocol mocks base method
    67  func (m *MockStream) Protocol() protocol.ID {
    68  	m.ctrl.T.Helper()
    69  	ret := m.ctrl.Call(m, "Protocol")
    70  	ret0, _ := ret[0].(protocol.ID)
    71  	return ret0
    72  }
    73  
    74  // Protocol indicates an expected call of Protocol
    75  func (mr *MockStreamMockRecorder) Protocol() *gomock.Call {
    76  	mr.mock.ctrl.T.Helper()
    77  	return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Protocol", reflect.TypeOf((*MockStream)(nil).Protocol))
    78  }
    79  
    80  // Read mocks base method
    81  func (m *MockStream) Read(arg0 []byte) (int, error) {
    82  	m.ctrl.T.Helper()
    83  	ret := m.ctrl.Call(m, "Read", arg0)
    84  	ret0, _ := ret[0].(int)
    85  	ret1, _ := ret[1].(error)
    86  	return ret0, ret1
    87  }
    88  
    89  // Read indicates an expected call of Read
    90  func (mr *MockStreamMockRecorder) Read(arg0 interface{}) *gomock.Call {
    91  	mr.mock.ctrl.T.Helper()
    92  	return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Read", reflect.TypeOf((*MockStream)(nil).Read), arg0)
    93  }
    94  
    95  // Reset mocks base method
    96  func (m *MockStream) Reset() error {
    97  	m.ctrl.T.Helper()
    98  	ret := m.ctrl.Call(m, "Reset")
    99  	ret0, _ := ret[0].(error)
   100  	return ret0
   101  }
   102  
   103  // Reset indicates an expected call of Reset
   104  func (mr *MockStreamMockRecorder) Reset() *gomock.Call {
   105  	mr.mock.ctrl.T.Helper()
   106  	return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Reset", reflect.TypeOf((*MockStream)(nil).Reset))
   107  }
   108  
   109  // SetDeadline mocks base method
   110  func (m *MockStream) SetDeadline(arg0 time.Time) error {
   111  	m.ctrl.T.Helper()
   112  	ret := m.ctrl.Call(m, "SetDeadline", arg0)
   113  	ret0, _ := ret[0].(error)
   114  	return ret0
   115  }
   116  
   117  // SetDeadline indicates an expected call of SetDeadline
   118  func (mr *MockStreamMockRecorder) SetDeadline(arg0 interface{}) *gomock.Call {
   119  	mr.mock.ctrl.T.Helper()
   120  	return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "SetDeadline", reflect.TypeOf((*MockStream)(nil).SetDeadline), arg0)
   121  }
   122  
   123  // SetProtocol mocks base method
   124  func (m *MockStream) SetProtocol(arg0 protocol.ID) {
   125  	m.ctrl.T.Helper()
   126  	m.ctrl.Call(m, "SetProtocol", arg0)
   127  }
   128  
   129  // SetProtocol indicates an expected call of SetProtocol
   130  func (mr *MockStreamMockRecorder) SetProtocol(arg0 interface{}) *gomock.Call {
   131  	mr.mock.ctrl.T.Helper()
   132  	return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "SetProtocol", reflect.TypeOf((*MockStream)(nil).SetProtocol), arg0)
   133  }
   134  
   135  // SetReadDeadline mocks base method
   136  func (m *MockStream) SetReadDeadline(arg0 time.Time) error {
   137  	m.ctrl.T.Helper()
   138  	ret := m.ctrl.Call(m, "SetReadDeadline", arg0)
   139  	ret0, _ := ret[0].(error)
   140  	return ret0
   141  }
   142  
   143  // SetReadDeadline indicates an expected call of SetReadDeadline
   144  func (mr *MockStreamMockRecorder) SetReadDeadline(arg0 interface{}) *gomock.Call {
   145  	mr.mock.ctrl.T.Helper()
   146  	return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "SetReadDeadline", reflect.TypeOf((*MockStream)(nil).SetReadDeadline), arg0)
   147  }
   148  
   149  // SetWriteDeadline mocks base method
   150  func (m *MockStream) SetWriteDeadline(arg0 time.Time) error {
   151  	m.ctrl.T.Helper()
   152  	ret := m.ctrl.Call(m, "SetWriteDeadline", arg0)
   153  	ret0, _ := ret[0].(error)
   154  	return ret0
   155  }
   156  
   157  // SetWriteDeadline indicates an expected call of SetWriteDeadline
   158  func (mr *MockStreamMockRecorder) SetWriteDeadline(arg0 interface{}) *gomock.Call {
   159  	mr.mock.ctrl.T.Helper()
   160  	return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "SetWriteDeadline", reflect.TypeOf((*MockStream)(nil).SetWriteDeadline), arg0)
   161  }
   162  
   163  // Stat mocks base method
   164  func (m *MockStream) Stat() network.Stat {
   165  	m.ctrl.T.Helper()
   166  	ret := m.ctrl.Call(m, "Stat")
   167  	ret0, _ := ret[0].(network.Stat)
   168  	return ret0
   169  }
   170  
   171  // Stat indicates an expected call of Stat
   172  func (mr *MockStreamMockRecorder) Stat() *gomock.Call {
   173  	mr.mock.ctrl.T.Helper()
   174  	return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Stat", reflect.TypeOf((*MockStream)(nil).Stat))
   175  }
   176  
   177  // Write mocks base method
   178  func (m *MockStream) Write(arg0 []byte) (int, error) {
   179  	m.ctrl.T.Helper()
   180  	ret := m.ctrl.Call(m, "Write", arg0)
   181  	ret0, _ := ret[0].(int)
   182  	ret1, _ := ret[1].(error)
   183  	return ret0, ret1
   184  }
   185  
   186  // Write indicates an expected call of Write
   187  func (mr *MockStreamMockRecorder) Write(arg0 interface{}) *gomock.Call {
   188  	mr.mock.ctrl.T.Helper()
   189  	return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Write", reflect.TypeOf((*MockStream)(nil).Write), arg0)
   190  }