-
Notifications
You must be signed in to change notification settings - Fork 10
/
store_mock.go
448 lines (381 loc) · 13.9 KB
/
store_mock.go
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
// Code generated by MockGen. DO NOT EDIT.
// Source: store.go
// Package main is a generated GoMock package.
package main
import (
reflect "reflect"
time "time"
gomock "github.com/golang/mock/gomock"
opt "github.com/syndtr/goleveldb/leveldb/opt"
util "github.com/syndtr/goleveldb/leveldb/util"
)
// Mockstorer is a mock of storer interface.
type Mockstorer struct {
ctrl *gomock.Controller
recorder *MockstorerMockRecorder
}
// MockstorerMockRecorder is the mock recorder for Mockstorer.
type MockstorerMockRecorder struct {
mock *Mockstorer
}
// NewMockstorer creates a new mock instance.
func NewMockstorer(ctrl *gomock.Controller) *Mockstorer {
mock := &Mockstorer{ctrl: ctrl}
mock.recorder = &MockstorerMockRecorder{mock}
return mock
}
// EXPECT returns an object that allows the caller to indicate expected use.
func (m *Mockstorer) EXPECT() *MockstorerMockRecorder {
return m.recorder
}
// Ack mocks base method.
func (m *Mockstorer) Ack(topic string, ackOffset int) error {
m.ctrl.T.Helper()
ret := m.ctrl.Call(m, "Ack", topic, ackOffset)
ret0, _ := ret[0].(error)
return ret0
}
// Ack indicates an expected call of Ack.
func (mr *MockstorerMockRecorder) Ack(topic, ackOffset interface{}) *gomock.Call {
mr.mock.ctrl.T.Helper()
return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Ack", reflect.TypeOf((*Mockstorer)(nil).Ack), topic, ackOffset)
}
// Back mocks base method.
func (m *Mockstorer) Back(topic string, ackOffset int) error {
m.ctrl.T.Helper()
ret := m.ctrl.Call(m, "Back", topic, ackOffset)
ret0, _ := ret[0].(error)
return ret0
}
// Back indicates an expected call of Back.
func (mr *MockstorerMockRecorder) Back(topic, ackOffset interface{}) *gomock.Call {
mr.mock.ctrl.T.Helper()
return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Back", reflect.TypeOf((*Mockstorer)(nil).Back), topic, ackOffset)
}
// Close mocks base method.
func (m *Mockstorer) Close() error {
m.ctrl.T.Helper()
ret := m.ctrl.Call(m, "Close")
ret0, _ := ret[0].(error)
return ret0
}
// Close indicates an expected call of Close.
func (mr *MockstorerMockRecorder) Close() *gomock.Call {
mr.mock.ctrl.T.Helper()
return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Close", reflect.TypeOf((*Mockstorer)(nil).Close))
}
// Dack mocks base method.
func (m *Mockstorer) Dack(topic string, ackOffset, delaySeconds int) error {
m.ctrl.T.Helper()
ret := m.ctrl.Call(m, "Dack", topic, ackOffset, delaySeconds)
ret0, _ := ret[0].(error)
return ret0
}
// Dack indicates an expected call of Dack.
func (mr *MockstorerMockRecorder) Dack(topic, ackOffset, delaySeconds interface{}) *gomock.Call {
mr.mock.ctrl.T.Helper()
return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Dack", reflect.TypeOf((*Mockstorer)(nil).Dack), topic, ackOffset, delaySeconds)
}
// Destroy mocks base method.
func (m *Mockstorer) Destroy() {
m.ctrl.T.Helper()
m.ctrl.Call(m, "Destroy")
}
// Destroy indicates an expected call of Destroy.
func (mr *MockstorerMockRecorder) Destroy() *gomock.Call {
mr.mock.ctrl.T.Helper()
return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Destroy", reflect.TypeOf((*Mockstorer)(nil).Destroy))
}
// GetDelayed mocks base method.
func (m *Mockstorer) GetDelayed(topic string) (delayedIterator, func() error) {
m.ctrl.T.Helper()
ret := m.ctrl.Call(m, "GetDelayed", topic)
ret0, _ := ret[0].(delayedIterator)
ret1, _ := ret[1].(func() error)
return ret0, ret1
}
// GetDelayed indicates an expected call of GetDelayed.
func (mr *MockstorerMockRecorder) GetDelayed(topic interface{}) *gomock.Call {
mr.mock.ctrl.T.Helper()
return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "GetDelayed", reflect.TypeOf((*Mockstorer)(nil).GetDelayed), topic)
}
// GetNext mocks base method.
func (m *Mockstorer) GetNext(topic string) (*value, int, error) {
m.ctrl.T.Helper()
ret := m.ctrl.Call(m, "GetNext", topic)
ret0, _ := ret[0].(*value)
ret1, _ := ret[1].(int)
ret2, _ := ret[2].(error)
return ret0, ret1, ret2
}
// GetNext indicates an expected call of GetNext.
func (mr *MockstorerMockRecorder) GetNext(topic interface{}) *gomock.Call {
mr.mock.ctrl.T.Helper()
return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "GetNext", reflect.TypeOf((*Mockstorer)(nil).GetNext), topic)
}
// Insert mocks base method.
func (m *Mockstorer) Insert(topic string, val *value) error {
m.ctrl.T.Helper()
ret := m.ctrl.Call(m, "Insert", topic, val)
ret0, _ := ret[0].(error)
return ret0
}
// Insert indicates an expected call of Insert.
func (mr *MockstorerMockRecorder) Insert(topic, val interface{}) *gomock.Call {
mr.mock.ctrl.T.Helper()
return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Insert", reflect.TypeOf((*Mockstorer)(nil).Insert), topic, val)
}
// Meta mocks base method.
func (m *Mockstorer) Meta() (*metadata, error) {
m.ctrl.T.Helper()
ret := m.ctrl.Call(m, "Meta")
ret0, _ := ret[0].(*metadata)
ret1, _ := ret[1].(error)
return ret0, ret1
}
// Meta indicates an expected call of Meta.
func (mr *MockstorerMockRecorder) Meta() *gomock.Call {
mr.mock.ctrl.T.Helper()
return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Meta", reflect.TypeOf((*Mockstorer)(nil).Meta))
}
// Nack mocks base method.
func (m *Mockstorer) Nack(topic string, ackOffset int) error {
m.ctrl.T.Helper()
ret := m.ctrl.Call(m, "Nack", topic, ackOffset)
ret0, _ := ret[0].(error)
return ret0
}
// Nack indicates an expected call of Nack.
func (mr *MockstorerMockRecorder) Nack(topic, ackOffset interface{}) *gomock.Call {
mr.mock.ctrl.T.Helper()
return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Nack", reflect.TypeOf((*Mockstorer)(nil).Nack), topic, ackOffset)
}
// Purge mocks base method.
func (m *Mockstorer) Purge(topic string) error {
m.ctrl.T.Helper()
ret := m.ctrl.Call(m, "Purge", topic)
ret0, _ := ret[0].(error)
return ret0
}
// Purge indicates an expected call of Purge.
func (mr *MockstorerMockRecorder) Purge(topic interface{}) *gomock.Call {
mr.mock.ctrl.T.Helper()
return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Purge", reflect.TypeOf((*Mockstorer)(nil).Purge), topic)
}
// ReturnDelayed mocks base method.
func (m *Mockstorer) ReturnDelayed(topic string, before time.Time) (int, error) {
m.ctrl.T.Helper()
ret := m.ctrl.Call(m, "ReturnDelayed", topic, before)
ret0, _ := ret[0].(int)
ret1, _ := ret[1].(error)
return ret0, ret1
}
// ReturnDelayed indicates an expected call of ReturnDelayed.
func (mr *MockstorerMockRecorder) ReturnDelayed(topic, before interface{}) *gomock.Call {
mr.mock.ctrl.T.Helper()
return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "ReturnDelayed", reflect.TypeOf((*Mockstorer)(nil).ReturnDelayed), topic, before)
}
// MockdelayedIterator is a mock of delayedIterator interface.
type MockdelayedIterator struct {
ctrl *gomock.Controller
recorder *MockdelayedIteratorMockRecorder
}
// MockdelayedIteratorMockRecorder is the mock recorder for MockdelayedIterator.
type MockdelayedIteratorMockRecorder struct {
mock *MockdelayedIterator
}
// NewMockdelayedIterator creates a new mock instance.
func NewMockdelayedIterator(ctrl *gomock.Controller) *MockdelayedIterator {
mock := &MockdelayedIterator{ctrl: ctrl}
mock.recorder = &MockdelayedIteratorMockRecorder{mock}
return mock
}
// EXPECT returns an object that allows the caller to indicate expected use.
func (m *MockdelayedIterator) EXPECT() *MockdelayedIteratorMockRecorder {
return m.recorder
}
// Error mocks base method.
func (m *MockdelayedIterator) Error() error {
m.ctrl.T.Helper()
ret := m.ctrl.Call(m, "Error")
ret0, _ := ret[0].(error)
return ret0
}
// Error indicates an expected call of Error.
func (mr *MockdelayedIteratorMockRecorder) Error() *gomock.Call {
mr.mock.ctrl.T.Helper()
return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Error", reflect.TypeOf((*MockdelayedIterator)(nil).Error))
}
// First mocks base method.
func (m *MockdelayedIterator) First() bool {
m.ctrl.T.Helper()
ret := m.ctrl.Call(m, "First")
ret0, _ := ret[0].(bool)
return ret0
}
// First indicates an expected call of First.
func (mr *MockdelayedIteratorMockRecorder) First() *gomock.Call {
mr.mock.ctrl.T.Helper()
return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "First", reflect.TypeOf((*MockdelayedIterator)(nil).First))
}
// Key mocks base method.
func (m *MockdelayedIterator) Key() []byte {
m.ctrl.T.Helper()
ret := m.ctrl.Call(m, "Key")
ret0, _ := ret[0].([]byte)
return ret0
}
// Key indicates an expected call of Key.
func (mr *MockdelayedIteratorMockRecorder) Key() *gomock.Call {
mr.mock.ctrl.T.Helper()
return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Key", reflect.TypeOf((*MockdelayedIterator)(nil).Key))
}
// Last mocks base method.
func (m *MockdelayedIterator) Last() bool {
m.ctrl.T.Helper()
ret := m.ctrl.Call(m, "Last")
ret0, _ := ret[0].(bool)
return ret0
}
// Last indicates an expected call of Last.
func (mr *MockdelayedIteratorMockRecorder) Last() *gomock.Call {
mr.mock.ctrl.T.Helper()
return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Last", reflect.TypeOf((*MockdelayedIterator)(nil).Last))
}
// Next mocks base method.
func (m *MockdelayedIterator) Next() bool {
m.ctrl.T.Helper()
ret := m.ctrl.Call(m, "Next")
ret0, _ := ret[0].(bool)
return ret0
}
// Next indicates an expected call of Next.
func (mr *MockdelayedIteratorMockRecorder) Next() *gomock.Call {
mr.mock.ctrl.T.Helper()
return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Next", reflect.TypeOf((*MockdelayedIterator)(nil).Next))
}
// Prev mocks base method.
func (m *MockdelayedIterator) Prev() bool {
m.ctrl.T.Helper()
ret := m.ctrl.Call(m, "Prev")
ret0, _ := ret[0].(bool)
return ret0
}
// Prev indicates an expected call of Prev.
func (mr *MockdelayedIteratorMockRecorder) Prev() *gomock.Call {
mr.mock.ctrl.T.Helper()
return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Prev", reflect.TypeOf((*MockdelayedIterator)(nil).Prev))
}
// Release mocks base method.
func (m *MockdelayedIterator) Release() {
m.ctrl.T.Helper()
m.ctrl.Call(m, "Release")
}
// Release indicates an expected call of Release.
func (mr *MockdelayedIteratorMockRecorder) Release() *gomock.Call {
mr.mock.ctrl.T.Helper()
return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Release", reflect.TypeOf((*MockdelayedIterator)(nil).Release))
}
// Seek mocks base method.
func (m *MockdelayedIterator) Seek(key []byte) bool {
m.ctrl.T.Helper()
ret := m.ctrl.Call(m, "Seek", key)
ret0, _ := ret[0].(bool)
return ret0
}
// Seek indicates an expected call of Seek.
func (mr *MockdelayedIteratorMockRecorder) Seek(key interface{}) *gomock.Call {
mr.mock.ctrl.T.Helper()
return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Seek", reflect.TypeOf((*MockdelayedIterator)(nil).Seek), key)
}
// SetReleaser mocks base method.
func (m *MockdelayedIterator) SetReleaser(releaser util.Releaser) {
m.ctrl.T.Helper()
m.ctrl.Call(m, "SetReleaser", releaser)
}
// SetReleaser indicates an expected call of SetReleaser.
func (mr *MockdelayedIteratorMockRecorder) SetReleaser(releaser interface{}) *gomock.Call {
mr.mock.ctrl.T.Helper()
return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "SetReleaser", reflect.TypeOf((*MockdelayedIterator)(nil).SetReleaser), releaser)
}
// Valid mocks base method.
func (m *MockdelayedIterator) Valid() bool {
m.ctrl.T.Helper()
ret := m.ctrl.Call(m, "Valid")
ret0, _ := ret[0].(bool)
return ret0
}
// Valid indicates an expected call of Valid.
func (mr *MockdelayedIteratorMockRecorder) Valid() *gomock.Call {
mr.mock.ctrl.T.Helper()
return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Valid", reflect.TypeOf((*MockdelayedIterator)(nil).Valid))
}
// Value mocks base method.
func (m *MockdelayedIterator) Value() []byte {
m.ctrl.T.Helper()
ret := m.ctrl.Call(m, "Value")
ret0, _ := ret[0].([]byte)
return ret0
}
// Value indicates an expected call of Value.
func (mr *MockdelayedIteratorMockRecorder) Value() *gomock.Call {
mr.mock.ctrl.T.Helper()
return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Value", reflect.TypeOf((*MockdelayedIterator)(nil).Value))
}
// Mockleveldber is a mock of leveldber interface.
type Mockleveldber struct {
ctrl *gomock.Controller
recorder *MockleveldberMockRecorder
}
// MockleveldberMockRecorder is the mock recorder for Mockleveldber.
type MockleveldberMockRecorder struct {
mock *Mockleveldber
}
// NewMockleveldber creates a new mock instance.
func NewMockleveldber(ctrl *gomock.Controller) *Mockleveldber {
mock := &Mockleveldber{ctrl: ctrl}
mock.recorder = &MockleveldberMockRecorder{mock}
return mock
}
// EXPECT returns an object that allows the caller to indicate expected use.
func (m *Mockleveldber) EXPECT() *MockleveldberMockRecorder {
return m.recorder
}
// Get mocks base method.
func (m *Mockleveldber) Get(key []byte, ro *opt.ReadOptions) ([]byte, error) {
m.ctrl.T.Helper()
ret := m.ctrl.Call(m, "Get", key, ro)
ret0, _ := ret[0].([]byte)
ret1, _ := ret[1].(error)
return ret0, ret1
}
// Get indicates an expected call of Get.
func (mr *MockleveldberMockRecorder) Get(key, ro interface{}) *gomock.Call {
mr.mock.ctrl.T.Helper()
return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Get", reflect.TypeOf((*Mockleveldber)(nil).Get), key, ro)
}
// Has mocks base method.
func (m *Mockleveldber) Has(key []byte, ro *opt.ReadOptions) (bool, error) {
m.ctrl.T.Helper()
ret := m.ctrl.Call(m, "Has", key, ro)
ret0, _ := ret[0].(bool)
ret1, _ := ret[1].(error)
return ret0, ret1
}
// Has indicates an expected call of Has.
func (mr *MockleveldberMockRecorder) Has(key, ro interface{}) *gomock.Call {
mr.mock.ctrl.T.Helper()
return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Has", reflect.TypeOf((*Mockleveldber)(nil).Has), key, ro)
}
// Put mocks base method.
func (m *Mockleveldber) Put(key, value []byte, wo *opt.WriteOptions) error {
m.ctrl.T.Helper()
ret := m.ctrl.Call(m, "Put", key, value, wo)
ret0, _ := ret[0].(error)
return ret0
}
// Put indicates an expected call of Put.
func (mr *MockleveldberMockRecorder) Put(key, value, wo interface{}) *gomock.Call {
mr.mock.ctrl.T.Helper()
return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Put", reflect.TypeOf((*Mockleveldber)(nil).Put), key, value, wo)
}