github.com/prysmaticlabs/prysm@v1.4.4/shared/mock/event_service_mock.go (about) 1 // Code generated by MockGen. DO NOT EDIT. 2 // Source: github.com/prysmaticlabs/prysm/proto/eth/v1 (interfaces: EventsClient,Events_StreamEventsClient,Events_StreamEventsServer) 3 4 // Package mock is a generated GoMock package. 5 package mock 6 7 import ( 8 context "context" 9 reflect "reflect" 10 11 gomock "github.com/golang/mock/gomock" 12 gateway "github.com/grpc-ecosystem/grpc-gateway/v2/proto/gateway" 13 v1 "github.com/prysmaticlabs/prysm/proto/eth/v1" 14 grpc "google.golang.org/grpc" 15 metadata "google.golang.org/grpc/metadata" 16 ) 17 18 // MockEventsClient is a mock of EventsClient interface. 19 type MockEventsClient struct { 20 ctrl *gomock.Controller 21 recorder *MockEventsClientMockRecorder 22 } 23 24 // MockEventsClientMockRecorder is the mock recorder for MockEventsClient. 25 type MockEventsClientMockRecorder struct { 26 mock *MockEventsClient 27 } 28 29 // NewMockEventsClient creates a new mock instance. 30 func NewMockEventsClient(ctrl *gomock.Controller) *MockEventsClient { 31 mock := &MockEventsClient{ctrl: ctrl} 32 mock.recorder = &MockEventsClientMockRecorder{mock} 33 return mock 34 } 35 36 // EXPECT returns an object that allows the caller to indicate expected use. 37 func (m *MockEventsClient) EXPECT() *MockEventsClientMockRecorder { 38 return m.recorder 39 } 40 41 // StreamEvents mocks base method. 42 func (m *MockEventsClient) StreamEvents(arg0 context.Context, arg1 *v1.StreamEventsRequest, arg2 ...grpc.CallOption) (v1.Events_StreamEventsClient, error) { 43 m.ctrl.T.Helper() 44 varargs := []interface{}{arg0, arg1} 45 for _, a := range arg2 { 46 varargs = append(varargs, a) 47 } 48 ret := m.ctrl.Call(m, "StreamEvents", varargs...) 49 ret0, _ := ret[0].(v1.Events_StreamEventsClient) 50 ret1, _ := ret[1].(error) 51 return ret0, ret1 52 } 53 54 // StreamEvents indicates an expected call of StreamEvents. 55 func (mr *MockEventsClientMockRecorder) StreamEvents(arg0, arg1 interface{}, arg2 ...interface{}) *gomock.Call { 56 mr.mock.ctrl.T.Helper() 57 varargs := append([]interface{}{arg0, arg1}, arg2...) 58 return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "StreamEvents", reflect.TypeOf((*MockEventsClient)(nil).StreamEvents), varargs...) 59 } 60 61 // MockEvents_StreamEventsClient is a mock of Events_StreamEventsClient interface. 62 type MockEvents_StreamEventsClient struct { 63 ctrl *gomock.Controller 64 recorder *MockEvents_StreamEventsClientMockRecorder 65 } 66 67 // MockEvents_StreamEventsClientMockRecorder is the mock recorder for MockEvents_StreamEventsClient. 68 type MockEvents_StreamEventsClientMockRecorder struct { 69 mock *MockEvents_StreamEventsClient 70 } 71 72 // NewMockEvents_StreamEventsClient creates a new mock instance. 73 func NewMockEvents_StreamEventsClient(ctrl *gomock.Controller) *MockEvents_StreamEventsClient { 74 mock := &MockEvents_StreamEventsClient{ctrl: ctrl} 75 mock.recorder = &MockEvents_StreamEventsClientMockRecorder{mock} 76 return mock 77 } 78 79 // EXPECT returns an object that allows the caller to indicate expected use. 80 func (m *MockEvents_StreamEventsClient) EXPECT() *MockEvents_StreamEventsClientMockRecorder { 81 return m.recorder 82 } 83 84 // CloseSend mocks base method. 85 func (m *MockEvents_StreamEventsClient) CloseSend() error { 86 m.ctrl.T.Helper() 87 ret := m.ctrl.Call(m, "CloseSend") 88 ret0, _ := ret[0].(error) 89 return ret0 90 } 91 92 // CloseSend indicates an expected call of CloseSend. 93 func (mr *MockEvents_StreamEventsClientMockRecorder) CloseSend() *gomock.Call { 94 mr.mock.ctrl.T.Helper() 95 return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "CloseSend", reflect.TypeOf((*MockEvents_StreamEventsClient)(nil).CloseSend)) 96 } 97 98 // Context mocks base method. 99 func (m *MockEvents_StreamEventsClient) Context() context.Context { 100 m.ctrl.T.Helper() 101 ret := m.ctrl.Call(m, "Context") 102 ret0, _ := ret[0].(context.Context) 103 return ret0 104 } 105 106 // Context indicates an expected call of Context. 107 func (mr *MockEvents_StreamEventsClientMockRecorder) Context() *gomock.Call { 108 mr.mock.ctrl.T.Helper() 109 return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Context", reflect.TypeOf((*MockEvents_StreamEventsClient)(nil).Context)) 110 } 111 112 // Header mocks base method. 113 func (m *MockEvents_StreamEventsClient) Header() (metadata.MD, error) { 114 m.ctrl.T.Helper() 115 ret := m.ctrl.Call(m, "Header") 116 ret0, _ := ret[0].(metadata.MD) 117 ret1, _ := ret[1].(error) 118 return ret0, ret1 119 } 120 121 // Header indicates an expected call of Header. 122 func (mr *MockEvents_StreamEventsClientMockRecorder) Header() *gomock.Call { 123 mr.mock.ctrl.T.Helper() 124 return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Header", reflect.TypeOf((*MockEvents_StreamEventsClient)(nil).Header)) 125 } 126 127 // Recv mocks base method. 128 func (m *MockEvents_StreamEventsClient) Recv() (*gateway.EventSource, error) { 129 m.ctrl.T.Helper() 130 ret := m.ctrl.Call(m, "Recv") 131 ret0, _ := ret[0].(*gateway.EventSource) 132 ret1, _ := ret[1].(error) 133 return ret0, ret1 134 } 135 136 // Recv indicates an expected call of Recv. 137 func (mr *MockEvents_StreamEventsClientMockRecorder) Recv() *gomock.Call { 138 mr.mock.ctrl.T.Helper() 139 return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Recv", reflect.TypeOf((*MockEvents_StreamEventsClient)(nil).Recv)) 140 } 141 142 // RecvMsg mocks base method. 143 func (m *MockEvents_StreamEventsClient) RecvMsg(arg0 interface{}) error { 144 m.ctrl.T.Helper() 145 ret := m.ctrl.Call(m, "RecvMsg", arg0) 146 ret0, _ := ret[0].(error) 147 return ret0 148 } 149 150 // RecvMsg indicates an expected call of RecvMsg. 151 func (mr *MockEvents_StreamEventsClientMockRecorder) RecvMsg(arg0 interface{}) *gomock.Call { 152 mr.mock.ctrl.T.Helper() 153 return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "RecvMsg", reflect.TypeOf((*MockEvents_StreamEventsClient)(nil).RecvMsg), arg0) 154 } 155 156 // SendMsg mocks base method. 157 func (m *MockEvents_StreamEventsClient) SendMsg(arg0 interface{}) error { 158 m.ctrl.T.Helper() 159 ret := m.ctrl.Call(m, "SendMsg", arg0) 160 ret0, _ := ret[0].(error) 161 return ret0 162 } 163 164 // SendMsg indicates an expected call of SendMsg. 165 func (mr *MockEvents_StreamEventsClientMockRecorder) SendMsg(arg0 interface{}) *gomock.Call { 166 mr.mock.ctrl.T.Helper() 167 return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "SendMsg", reflect.TypeOf((*MockEvents_StreamEventsClient)(nil).SendMsg), arg0) 168 } 169 170 // Trailer mocks base method. 171 func (m *MockEvents_StreamEventsClient) Trailer() metadata.MD { 172 m.ctrl.T.Helper() 173 ret := m.ctrl.Call(m, "Trailer") 174 ret0, _ := ret[0].(metadata.MD) 175 return ret0 176 } 177 178 // Trailer indicates an expected call of Trailer. 179 func (mr *MockEvents_StreamEventsClientMockRecorder) Trailer() *gomock.Call { 180 mr.mock.ctrl.T.Helper() 181 return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Trailer", reflect.TypeOf((*MockEvents_StreamEventsClient)(nil).Trailer)) 182 } 183 184 // MockEvents_StreamEventsServer is a mock of Events_StreamEventsServer interface. 185 type MockEvents_StreamEventsServer struct { 186 ctrl *gomock.Controller 187 recorder *MockEvents_StreamEventsServerMockRecorder 188 } 189 190 // MockEvents_StreamEventsServerMockRecorder is the mock recorder for MockEvents_StreamEventsServer. 191 type MockEvents_StreamEventsServerMockRecorder struct { 192 mock *MockEvents_StreamEventsServer 193 } 194 195 // NewMockEvents_StreamEventsServer creates a new mock instance. 196 func NewMockEvents_StreamEventsServer(ctrl *gomock.Controller) *MockEvents_StreamEventsServer { 197 mock := &MockEvents_StreamEventsServer{ctrl: ctrl} 198 mock.recorder = &MockEvents_StreamEventsServerMockRecorder{mock} 199 return mock 200 } 201 202 // EXPECT returns an object that allows the caller to indicate expected use. 203 func (m *MockEvents_StreamEventsServer) EXPECT() *MockEvents_StreamEventsServerMockRecorder { 204 return m.recorder 205 } 206 207 // Context mocks base method. 208 func (m *MockEvents_StreamEventsServer) Context() context.Context { 209 m.ctrl.T.Helper() 210 ret := m.ctrl.Call(m, "Context") 211 ret0, _ := ret[0].(context.Context) 212 return ret0 213 } 214 215 // Context indicates an expected call of Context. 216 func (mr *MockEvents_StreamEventsServerMockRecorder) Context() *gomock.Call { 217 mr.mock.ctrl.T.Helper() 218 return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Context", reflect.TypeOf((*MockEvents_StreamEventsServer)(nil).Context)) 219 } 220 221 // RecvMsg mocks base method. 222 func (m *MockEvents_StreamEventsServer) RecvMsg(arg0 interface{}) error { 223 m.ctrl.T.Helper() 224 ret := m.ctrl.Call(m, "RecvMsg", arg0) 225 ret0, _ := ret[0].(error) 226 return ret0 227 } 228 229 // RecvMsg indicates an expected call of RecvMsg. 230 func (mr *MockEvents_StreamEventsServerMockRecorder) RecvMsg(arg0 interface{}) *gomock.Call { 231 mr.mock.ctrl.T.Helper() 232 return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "RecvMsg", reflect.TypeOf((*MockEvents_StreamEventsServer)(nil).RecvMsg), arg0) 233 } 234 235 // Send mocks base method. 236 func (m *MockEvents_StreamEventsServer) Send(arg0 *gateway.EventSource) error { 237 m.ctrl.T.Helper() 238 ret := m.ctrl.Call(m, "Send", arg0) 239 ret0, _ := ret[0].(error) 240 return ret0 241 } 242 243 // Send indicates an expected call of Send. 244 func (mr *MockEvents_StreamEventsServerMockRecorder) Send(arg0 interface{}) *gomock.Call { 245 mr.mock.ctrl.T.Helper() 246 return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Send", reflect.TypeOf((*MockEvents_StreamEventsServer)(nil).Send), arg0) 247 } 248 249 // SendHeader mocks base method. 250 func (m *MockEvents_StreamEventsServer) SendHeader(arg0 metadata.MD) error { 251 m.ctrl.T.Helper() 252 ret := m.ctrl.Call(m, "SendHeader", arg0) 253 ret0, _ := ret[0].(error) 254 return ret0 255 } 256 257 // SendHeader indicates an expected call of SendHeader. 258 func (mr *MockEvents_StreamEventsServerMockRecorder) SendHeader(arg0 interface{}) *gomock.Call { 259 mr.mock.ctrl.T.Helper() 260 return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "SendHeader", reflect.TypeOf((*MockEvents_StreamEventsServer)(nil).SendHeader), arg0) 261 } 262 263 // SendMsg mocks base method. 264 func (m *MockEvents_StreamEventsServer) SendMsg(arg0 interface{}) error { 265 m.ctrl.T.Helper() 266 ret := m.ctrl.Call(m, "SendMsg", arg0) 267 ret0, _ := ret[0].(error) 268 return ret0 269 } 270 271 // SendMsg indicates an expected call of SendMsg. 272 func (mr *MockEvents_StreamEventsServerMockRecorder) SendMsg(arg0 interface{}) *gomock.Call { 273 mr.mock.ctrl.T.Helper() 274 return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "SendMsg", reflect.TypeOf((*MockEvents_StreamEventsServer)(nil).SendMsg), arg0) 275 } 276 277 // SetHeader mocks base method. 278 func (m *MockEvents_StreamEventsServer) SetHeader(arg0 metadata.MD) error { 279 m.ctrl.T.Helper() 280 ret := m.ctrl.Call(m, "SetHeader", arg0) 281 ret0, _ := ret[0].(error) 282 return ret0 283 } 284 285 // SetHeader indicates an expected call of SetHeader. 286 func (mr *MockEvents_StreamEventsServerMockRecorder) SetHeader(arg0 interface{}) *gomock.Call { 287 mr.mock.ctrl.T.Helper() 288 return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "SetHeader", reflect.TypeOf((*MockEvents_StreamEventsServer)(nil).SetHeader), arg0) 289 } 290 291 // SetTrailer mocks base method. 292 func (m *MockEvents_StreamEventsServer) SetTrailer(arg0 metadata.MD) { 293 m.ctrl.T.Helper() 294 m.ctrl.Call(m, "SetTrailer", arg0) 295 } 296 297 // SetTrailer indicates an expected call of SetTrailer. 298 func (mr *MockEvents_StreamEventsServerMockRecorder) SetTrailer(arg0 interface{}) *gomock.Call { 299 mr.mock.ctrl.T.Helper() 300 return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "SetTrailer", reflect.TypeOf((*MockEvents_StreamEventsServer)(nil).SetTrailer), arg0) 301 }