code.vegaprotocol.io/vega@v0.79.0/datanode/broker/mocks/mocks.go (about) 1 // Code generated by MockGen. DO NOT EDIT. 2 // Source: code.vegaprotocol.io/vega/datanode/broker (interfaces: Subscriber,TestInterface,ChainInfoI) 3 4 // Package mocks is a generated GoMock package. 5 package mocks 6 7 import ( 8 "code.vegaprotocol.io/vega/libs/broker" 9 context "context" 10 reflect "reflect" 11 12 events "code.vegaprotocol.io/vega/core/events" 13 gomock "github.com/golang/mock/gomock" 14 ) 15 16 // MockSubscriber is a mock of Subscriber interface. 17 type MockSubscriber struct { 18 ctrl *gomock.Controller 19 recorder *MockSubscriberMockRecorder 20 } 21 22 // MockSubscriberMockRecorder is the mock recorder for MockSubscriber. 23 type MockSubscriberMockRecorder struct { 24 mock *MockSubscriber 25 } 26 27 // NewMockSubscriber creates a new mock instance. 28 func NewMockSubscriber(ctrl *gomock.Controller) *MockSubscriber { 29 mock := &MockSubscriber{ctrl: ctrl} 30 mock.recorder = &MockSubscriberMockRecorder{mock} 31 return mock 32 } 33 34 // EXPECT returns an object that allows the caller to indicate expected use. 35 func (m *MockSubscriber) EXPECT() *MockSubscriberMockRecorder { 36 return m.recorder 37 } 38 39 // Ack mocks base method. 40 func (m *MockSubscriber) Ack() bool { 41 m.ctrl.T.Helper() 42 ret := m.ctrl.Call(m, "Ack") 43 ret0, _ := ret[0].(bool) 44 return ret0 45 } 46 47 // Ack indicates an expected call of Ack. 48 func (mr *MockSubscriberMockRecorder) Ack() *gomock.Call { 49 mr.mock.ctrl.T.Helper() 50 return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Ack", reflect.TypeOf((*MockSubscriber)(nil).Ack)) 51 } 52 53 // C mocks base method. 54 func (m *MockSubscriber) C() chan<- []events.Event { 55 m.ctrl.T.Helper() 56 ret := m.ctrl.Call(m, "C") 57 ret0, _ := ret[0].(chan<- []events.Event) 58 return ret0 59 } 60 61 // C indicates an expected call of C. 62 func (mr *MockSubscriberMockRecorder) C() *gomock.Call { 63 mr.mock.ctrl.T.Helper() 64 return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "C", reflect.TypeOf((*MockSubscriber)(nil).C)) 65 } 66 67 // Closed mocks base method. 68 func (m *MockSubscriber) Closed() <-chan struct{} { 69 m.ctrl.T.Helper() 70 ret := m.ctrl.Call(m, "Closed") 71 ret0, _ := ret[0].(<-chan struct{}) 72 return ret0 73 } 74 75 // Closed indicates an expected call of Closed. 76 func (mr *MockSubscriberMockRecorder) Closed() *gomock.Call { 77 mr.mock.ctrl.T.Helper() 78 return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Closed", reflect.TypeOf((*MockSubscriber)(nil).Closed)) 79 } 80 81 // ID mocks base method. 82 func (m *MockSubscriber) ID() int { 83 m.ctrl.T.Helper() 84 ret := m.ctrl.Call(m, "ID") 85 ret0, _ := ret[0].(int) 86 return ret0 87 } 88 89 // ID indicates an expected call of ID. 90 func (mr *MockSubscriberMockRecorder) ID() *gomock.Call { 91 mr.mock.ctrl.T.Helper() 92 return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "ID", reflect.TypeOf((*MockSubscriber)(nil).ID)) 93 } 94 95 // Push mocks base method. 96 func (m *MockSubscriber) Push(arg0 ...events.Event) { 97 m.ctrl.T.Helper() 98 varargs := []interface{}{} 99 for _, a := range arg0 { 100 varargs = append(varargs, a) 101 } 102 m.ctrl.Call(m, "Push", varargs...) 103 } 104 105 // Push indicates an expected call of Push. 106 func (mr *MockSubscriberMockRecorder) Push(arg0 ...interface{}) *gomock.Call { 107 mr.mock.ctrl.T.Helper() 108 return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Push", reflect.TypeOf((*MockSubscriber)(nil).Push), arg0...) 109 } 110 111 // SetID mocks base method. 112 func (m *MockSubscriber) SetID(arg0 int) { 113 m.ctrl.T.Helper() 114 m.ctrl.Call(m, "SetID", arg0) 115 } 116 117 // SetID indicates an expected call of SetID. 118 func (mr *MockSubscriberMockRecorder) SetID(arg0 interface{}) *gomock.Call { 119 mr.mock.ctrl.T.Helper() 120 return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "SetID", reflect.TypeOf((*MockSubscriber)(nil).SetID), arg0) 121 } 122 123 // Skip mocks base method. 124 func (m *MockSubscriber) Skip() <-chan struct{} { 125 m.ctrl.T.Helper() 126 ret := m.ctrl.Call(m, "Skip") 127 ret0, _ := ret[0].(<-chan struct{}) 128 return ret0 129 } 130 131 // Skip indicates an expected call of Skip. 132 func (mr *MockSubscriberMockRecorder) Skip() *gomock.Call { 133 mr.mock.ctrl.T.Helper() 134 return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Skip", reflect.TypeOf((*MockSubscriber)(nil).Skip)) 135 } 136 137 // Types mocks base method. 138 func (m *MockSubscriber) Types() []events.Type { 139 m.ctrl.T.Helper() 140 ret := m.ctrl.Call(m, "Types") 141 ret0, _ := ret[0].([]events.Type) 142 return ret0 143 } 144 145 // Types indicates an expected call of Types. 146 func (mr *MockSubscriberMockRecorder) Types() *gomock.Call { 147 mr.mock.ctrl.T.Helper() 148 return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Types", reflect.TypeOf((*MockSubscriber)(nil).Types)) 149 } 150 151 // MockTestInterface is a mock of TestInterface interface. 152 type MockTestInterface struct { 153 ctrl *gomock.Controller 154 recorder *MockTestInterfaceMockRecorder 155 } 156 157 // MockTestInterfaceMockRecorder is the mock recorder for MockTestInterface. 158 type MockTestInterfaceMockRecorder struct { 159 mock *MockTestInterface 160 } 161 162 // NewMockTestInterface creates a new mock instance. 163 func NewMockTestInterface(ctrl *gomock.Controller) *MockTestInterface { 164 mock := &MockTestInterface{ctrl: ctrl} 165 mock.recorder = &MockTestInterfaceMockRecorder{mock} 166 return mock 167 } 168 169 // EXPECT returns an object that allows the caller to indicate expected use. 170 func (m *MockTestInterface) EXPECT() *MockTestInterfaceMockRecorder { 171 return m.recorder 172 } 173 174 // Receive mocks base method. 175 func (m *MockTestInterface) Receive(arg0 context.Context) error { 176 m.ctrl.T.Helper() 177 ret := m.ctrl.Call(m, "Receive", arg0) 178 ret0, _ := ret[0].(error) 179 return ret0 180 } 181 182 // Receive indicates an expected call of Receive. 183 func (mr *MockTestInterfaceMockRecorder) Receive(arg0 interface{}) *gomock.Call { 184 mr.mock.ctrl.T.Helper() 185 return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Receive", reflect.TypeOf((*MockTestInterface)(nil).Receive), arg0) 186 } 187 188 // Send mocks base method. 189 func (m *MockTestInterface) Send(arg0 events.Event) { 190 m.ctrl.T.Helper() 191 m.ctrl.Call(m, "Send", arg0) 192 } 193 194 // Send indicates an expected call of Send. 195 func (mr *MockTestInterfaceMockRecorder) Send(arg0 interface{}) *gomock.Call { 196 mr.mock.ctrl.T.Helper() 197 return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Send", reflect.TypeOf((*MockTestInterface)(nil).Send), arg0) 198 } 199 200 // Subscribe mocks base method. 201 func (m *MockTestInterface) Subscribe(arg0 broker.Subscriber) int { 202 m.ctrl.T.Helper() 203 ret := m.ctrl.Call(m, "Subscribe", arg0) 204 ret0, _ := ret[0].(int) 205 return ret0 206 } 207 208 // Subscribe indicates an expected call of Subscribe. 209 func (mr *MockTestInterfaceMockRecorder) Subscribe(arg0 interface{}) *gomock.Call { 210 mr.mock.ctrl.T.Helper() 211 return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Subscribe", reflect.TypeOf((*MockTestInterface)(nil).Subscribe), arg0) 212 } 213 214 // SubscribeBatch mocks base method. 215 func (m *MockTestInterface) SubscribeBatch(arg0 ...broker.Subscriber) { 216 m.ctrl.T.Helper() 217 varargs := []interface{}{} 218 for _, a := range arg0 { 219 varargs = append(varargs, a) 220 } 221 m.ctrl.Call(m, "SubscribeBatch", varargs...) 222 } 223 224 // SubscribeBatch indicates an expected call of SubscribeBatch. 225 func (mr *MockTestInterfaceMockRecorder) SubscribeBatch(arg0 ...interface{}) *gomock.Call { 226 mr.mock.ctrl.T.Helper() 227 return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "SubscribeBatch", reflect.TypeOf((*MockTestInterface)(nil).SubscribeBatch), arg0...) 228 } 229 230 // Unsubscribe mocks base method. 231 func (m *MockTestInterface) Unsubscribe(arg0 int) { 232 m.ctrl.T.Helper() 233 m.ctrl.Call(m, "Unsubscribe", arg0) 234 } 235 236 // Unsubscribe indicates an expected call of Unsubscribe. 237 func (mr *MockTestInterfaceMockRecorder) Unsubscribe(arg0 interface{}) *gomock.Call { 238 mr.mock.ctrl.T.Helper() 239 return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Unsubscribe", reflect.TypeOf((*MockTestInterface)(nil).Unsubscribe), arg0) 240 } 241 242 // MockChainInfoI is a mock of ChainInfoI interface. 243 type MockChainInfoI struct { 244 ctrl *gomock.Controller 245 recorder *MockChainInfoIMockRecorder 246 } 247 248 // MockChainInfoIMockRecorder is the mock recorder for MockChainInfoI. 249 type MockChainInfoIMockRecorder struct { 250 mock *MockChainInfoI 251 } 252 253 // NewMockChainInfoI creates a new mock instance. 254 func NewMockChainInfoI(ctrl *gomock.Controller) *MockChainInfoI { 255 mock := &MockChainInfoI{ctrl: ctrl} 256 mock.recorder = &MockChainInfoIMockRecorder{mock} 257 return mock 258 } 259 260 // EXPECT returns an object that allows the caller to indicate expected use. 261 func (m *MockChainInfoI) EXPECT() *MockChainInfoIMockRecorder { 262 return m.recorder 263 } 264 265 // GetChainID mocks base method. 266 func (m *MockChainInfoI) GetChainID() (string, error) { 267 m.ctrl.T.Helper() 268 ret := m.ctrl.Call(m, "GetChainID") 269 ret0, _ := ret[0].(string) 270 ret1, _ := ret[1].(error) 271 return ret0, ret1 272 } 273 274 // GetChainID indicates an expected call of GetChainID. 275 func (mr *MockChainInfoIMockRecorder) GetChainID() *gomock.Call { 276 mr.mock.ctrl.T.Helper() 277 return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "GetChainID", reflect.TypeOf((*MockChainInfoI)(nil).GetChainID)) 278 } 279 280 // SetChainID mocks base method. 281 func (m *MockChainInfoI) SetChainID(arg0 string) error { 282 m.ctrl.T.Helper() 283 ret := m.ctrl.Call(m, "SetChainID", arg0) 284 ret0, _ := ret[0].(error) 285 return ret0 286 } 287 288 // SetChainID indicates an expected call of SetChainID. 289 func (mr *MockChainInfoIMockRecorder) SetChainID(arg0 interface{}) *gomock.Call { 290 mr.mock.ctrl.T.Helper() 291 return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "SetChainID", reflect.TypeOf((*MockChainInfoI)(nil).SetChainID), arg0) 292 }