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

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