github.com/aergoio/aergo@v1.3.1/p2p/p2pmock/mock_handshake.go (about) 1 // Code generated by MockGen. DO NOT EDIT. 2 // Source: handshake.go 3 4 // Package p2pmock is a generated GoMock package. 5 package p2pmock 6 7 import ( 8 context "context" 9 p2pcommon "github.com/aergoio/aergo/p2p/p2pcommon" 10 types "github.com/aergoio/aergo/types" 11 gomock "github.com/golang/mock/gomock" 12 io "io" 13 reflect "reflect" 14 time "time" 15 ) 16 17 // MockHSHandlerFactory is a mock of HSHandlerFactory interface 18 type MockHSHandlerFactory struct { 19 ctrl *gomock.Controller 20 recorder *MockHSHandlerFactoryMockRecorder 21 } 22 23 // MockHSHandlerFactoryMockRecorder is the mock recorder for MockHSHandlerFactory 24 type MockHSHandlerFactoryMockRecorder struct { 25 mock *MockHSHandlerFactory 26 } 27 28 // NewMockHSHandlerFactory creates a new mock instance 29 func NewMockHSHandlerFactory(ctrl *gomock.Controller) *MockHSHandlerFactory { 30 mock := &MockHSHandlerFactory{ctrl: ctrl} 31 mock.recorder = &MockHSHandlerFactoryMockRecorder{mock} 32 return mock 33 } 34 35 // EXPECT returns an object that allows the caller to indicate expected use 36 func (m *MockHSHandlerFactory) EXPECT() *MockHSHandlerFactoryMockRecorder { 37 return m.recorder 38 } 39 40 // CreateHSHandler mocks base method 41 func (m *MockHSHandlerFactory) CreateHSHandler(legacy, outbound bool, pid types.PeerID) p2pcommon.HSHandler { 42 m.ctrl.T.Helper() 43 ret := m.ctrl.Call(m, "CreateHSHandler", legacy, outbound, pid) 44 ret0, _ := ret[0].(p2pcommon.HSHandler) 45 return ret0 46 } 47 48 // CreateHSHandler indicates an expected call of CreateHSHandler 49 func (mr *MockHSHandlerFactoryMockRecorder) CreateHSHandler(legacy, outbound, pid interface{}) *gomock.Call { 50 mr.mock.ctrl.T.Helper() 51 return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "CreateHSHandler", reflect.TypeOf((*MockHSHandlerFactory)(nil).CreateHSHandler), legacy, outbound, pid) 52 } 53 54 // MockHSHandler is a mock of HSHandler interface 55 type MockHSHandler struct { 56 ctrl *gomock.Controller 57 recorder *MockHSHandlerMockRecorder 58 } 59 60 // MockHSHandlerMockRecorder is the mock recorder for MockHSHandler 61 type MockHSHandlerMockRecorder struct { 62 mock *MockHSHandler 63 } 64 65 // NewMockHSHandler creates a new mock instance 66 func NewMockHSHandler(ctrl *gomock.Controller) *MockHSHandler { 67 mock := &MockHSHandler{ctrl: ctrl} 68 mock.recorder = &MockHSHandlerMockRecorder{mock} 69 return mock 70 } 71 72 // EXPECT returns an object that allows the caller to indicate expected use 73 func (m *MockHSHandler) EXPECT() *MockHSHandlerMockRecorder { 74 return m.recorder 75 } 76 77 // Handle mocks base method 78 func (m *MockHSHandler) Handle(s io.ReadWriteCloser, ttl time.Duration) (p2pcommon.MsgReadWriter, *types.Status, error) { 79 m.ctrl.T.Helper() 80 ret := m.ctrl.Call(m, "Handle", s, ttl) 81 ret0, _ := ret[0].(p2pcommon.MsgReadWriter) 82 ret1, _ := ret[1].(*types.Status) 83 ret2, _ := ret[2].(error) 84 return ret0, ret1, ret2 85 } 86 87 // Handle indicates an expected call of Handle 88 func (mr *MockHSHandlerMockRecorder) Handle(s, ttl interface{}) *gomock.Call { 89 mr.mock.ctrl.T.Helper() 90 return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Handle", reflect.TypeOf((*MockHSHandler)(nil).Handle), s, ttl) 91 } 92 93 // MockVersionedManager is a mock of VersionedManager interface 94 type MockVersionedManager struct { 95 ctrl *gomock.Controller 96 recorder *MockVersionedManagerMockRecorder 97 } 98 99 // MockVersionedManagerMockRecorder is the mock recorder for MockVersionedManager 100 type MockVersionedManagerMockRecorder struct { 101 mock *MockVersionedManager 102 } 103 104 // NewMockVersionedManager creates a new mock instance 105 func NewMockVersionedManager(ctrl *gomock.Controller) *MockVersionedManager { 106 mock := &MockVersionedManager{ctrl: ctrl} 107 mock.recorder = &MockVersionedManagerMockRecorder{mock} 108 return mock 109 } 110 111 // EXPECT returns an object that allows the caller to indicate expected use 112 func (m *MockVersionedManager) EXPECT() *MockVersionedManagerMockRecorder { 113 return m.recorder 114 } 115 116 // FindBestP2PVersion mocks base method 117 func (m *MockVersionedManager) FindBestP2PVersion(versions []p2pcommon.P2PVersion) p2pcommon.P2PVersion { 118 m.ctrl.T.Helper() 119 ret := m.ctrl.Call(m, "FindBestP2PVersion", versions) 120 ret0, _ := ret[0].(p2pcommon.P2PVersion) 121 return ret0 122 } 123 124 // FindBestP2PVersion indicates an expected call of FindBestP2PVersion 125 func (mr *MockVersionedManagerMockRecorder) FindBestP2PVersion(versions interface{}) *gomock.Call { 126 mr.mock.ctrl.T.Helper() 127 return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "FindBestP2PVersion", reflect.TypeOf((*MockVersionedManager)(nil).FindBestP2PVersion), versions) 128 } 129 130 // GetVersionedHandshaker mocks base method 131 func (m *MockVersionedManager) GetVersionedHandshaker(version p2pcommon.P2PVersion, peerID types.PeerID, rwc io.ReadWriteCloser) (p2pcommon.VersionedHandshaker, error) { 132 m.ctrl.T.Helper() 133 ret := m.ctrl.Call(m, "GetVersionedHandshaker", version, peerID, rwc) 134 ret0, _ := ret[0].(p2pcommon.VersionedHandshaker) 135 ret1, _ := ret[1].(error) 136 return ret0, ret1 137 } 138 139 // GetVersionedHandshaker indicates an expected call of GetVersionedHandshaker 140 func (mr *MockVersionedManagerMockRecorder) GetVersionedHandshaker(version, peerID, rwc interface{}) *gomock.Call { 141 mr.mock.ctrl.T.Helper() 142 return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "GetVersionedHandshaker", reflect.TypeOf((*MockVersionedManager)(nil).GetVersionedHandshaker), version, peerID, rwc) 143 } 144 145 // MockVersionedHandshaker is a mock of VersionedHandshaker interface 146 type MockVersionedHandshaker struct { 147 ctrl *gomock.Controller 148 recorder *MockVersionedHandshakerMockRecorder 149 } 150 151 // MockVersionedHandshakerMockRecorder is the mock recorder for MockVersionedHandshaker 152 type MockVersionedHandshakerMockRecorder struct { 153 mock *MockVersionedHandshaker 154 } 155 156 // NewMockVersionedHandshaker creates a new mock instance 157 func NewMockVersionedHandshaker(ctrl *gomock.Controller) *MockVersionedHandshaker { 158 mock := &MockVersionedHandshaker{ctrl: ctrl} 159 mock.recorder = &MockVersionedHandshakerMockRecorder{mock} 160 return mock 161 } 162 163 // EXPECT returns an object that allows the caller to indicate expected use 164 func (m *MockVersionedHandshaker) EXPECT() *MockVersionedHandshakerMockRecorder { 165 return m.recorder 166 } 167 168 // DoForOutbound mocks base method 169 func (m *MockVersionedHandshaker) DoForOutbound(ctx context.Context) (*types.Status, error) { 170 m.ctrl.T.Helper() 171 ret := m.ctrl.Call(m, "DoForOutbound", ctx) 172 ret0, _ := ret[0].(*types.Status) 173 ret1, _ := ret[1].(error) 174 return ret0, ret1 175 } 176 177 // DoForOutbound indicates an expected call of DoForOutbound 178 func (mr *MockVersionedHandshakerMockRecorder) DoForOutbound(ctx interface{}) *gomock.Call { 179 mr.mock.ctrl.T.Helper() 180 return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "DoForOutbound", reflect.TypeOf((*MockVersionedHandshaker)(nil).DoForOutbound), ctx) 181 } 182 183 // DoForInbound mocks base method 184 func (m *MockVersionedHandshaker) DoForInbound(ctx context.Context) (*types.Status, error) { 185 m.ctrl.T.Helper() 186 ret := m.ctrl.Call(m, "DoForInbound", ctx) 187 ret0, _ := ret[0].(*types.Status) 188 ret1, _ := ret[1].(error) 189 return ret0, ret1 190 } 191 192 // DoForInbound indicates an expected call of DoForInbound 193 func (mr *MockVersionedHandshakerMockRecorder) DoForInbound(ctx interface{}) *gomock.Call { 194 mr.mock.ctrl.T.Helper() 195 return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "DoForInbound", reflect.TypeOf((*MockVersionedHandshaker)(nil).DoForInbound), ctx) 196 } 197 198 // GetMsgRW mocks base method 199 func (m *MockVersionedHandshaker) GetMsgRW() p2pcommon.MsgReadWriter { 200 m.ctrl.T.Helper() 201 ret := m.ctrl.Call(m, "GetMsgRW") 202 ret0, _ := ret[0].(p2pcommon.MsgReadWriter) 203 return ret0 204 } 205 206 // GetMsgRW indicates an expected call of GetMsgRW 207 func (mr *MockVersionedHandshakerMockRecorder) GetMsgRW() *gomock.Call { 208 mr.mock.ctrl.T.Helper() 209 return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "GetMsgRW", reflect.TypeOf((*MockVersionedHandshaker)(nil).GetMsgRW)) 210 }