-
Notifications
You must be signed in to change notification settings - Fork 458
/
Copy pathindex_mock.go
400 lines (341 loc) · 12.9 KB
/
index_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
// Code generated by MockGen. DO NOT EDIT.
// Source: github.com/m3db/m3/src/dbnode/storage/index (interfaces: Results,Block,OnIndexSeries)
// Copyright (c) 2019 Uber Technologies, Inc.
//
// Permission is hereby granted, free of charge, to any person obtaining a copy
// of this software and associated documentation files (the "Software"), to deal
// in the Software without restriction, including without limitation the rights
// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
// copies of the Software, and to permit persons to whom the Software is
// furnished to do so, subject to the following conditions:
//
// The above copyright notice and this permission notice shall be included in
// all copies or substantial portions of the Software.
//
// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
// THE SOFTWARE.
// Package index is a generated GoMock package.
package index
import (
"reflect"
"time"
"github.com/m3db/m3/src/dbnode/storage/bootstrap/result"
"github.com/m3db/m3/src/m3ninx/doc"
"github.com/m3db/m3x/context"
"github.com/m3db/m3x/ident"
time0 "github.com/m3db/m3x/time"
"github.com/golang/mock/gomock"
)
// MockResults is a mock of Results interface
type MockResults struct {
ctrl *gomock.Controller
recorder *MockResultsMockRecorder
}
// MockResultsMockRecorder is the mock recorder for MockResults
type MockResultsMockRecorder struct {
mock *MockResults
}
// NewMockResults creates a new mock instance
func NewMockResults(ctrl *gomock.Controller) *MockResults {
mock := &MockResults{ctrl: ctrl}
mock.recorder = &MockResultsMockRecorder{mock}
return mock
}
// EXPECT returns an object that allows the caller to indicate expected use
func (m *MockResults) EXPECT() *MockResultsMockRecorder {
return m.recorder
}
// AddDocument mocks base method
func (m *MockResults) AddDocument(arg0 doc.Document) (bool, int, error) {
m.ctrl.T.Helper()
ret := m.ctrl.Call(m, "AddDocument", arg0)
ret0, _ := ret[0].(bool)
ret1, _ := ret[1].(int)
ret2, _ := ret[2].(error)
return ret0, ret1, ret2
}
// AddDocument indicates an expected call of AddDocument
func (mr *MockResultsMockRecorder) AddDocument(arg0 interface{}) *gomock.Call {
mr.mock.ctrl.T.Helper()
return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "AddDocument", reflect.TypeOf((*MockResults)(nil).AddDocument), arg0)
}
// AddIDAndTags mocks base method
func (m *MockResults) AddIDAndTags(arg0 ident.ID, arg1 ident.Tags) (bool, int, error) {
m.ctrl.T.Helper()
ret := m.ctrl.Call(m, "AddIDAndTags", arg0, arg1)
ret0, _ := ret[0].(bool)
ret1, _ := ret[1].(int)
ret2, _ := ret[2].(error)
return ret0, ret1, ret2
}
// AddIDAndTags indicates an expected call of AddIDAndTags
func (mr *MockResultsMockRecorder) AddIDAndTags(arg0, arg1 interface{}) *gomock.Call {
mr.mock.ctrl.T.Helper()
return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "AddIDAndTags", reflect.TypeOf((*MockResults)(nil).AddIDAndTags), arg0, arg1)
}
// Finalize mocks base method
func (m *MockResults) Finalize() {
m.ctrl.T.Helper()
m.ctrl.Call(m, "Finalize")
}
// Finalize indicates an expected call of Finalize
func (mr *MockResultsMockRecorder) Finalize() *gomock.Call {
mr.mock.ctrl.T.Helper()
return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Finalize", reflect.TypeOf((*MockResults)(nil).Finalize))
}
// Map mocks base method
func (m *MockResults) Map() *ResultsMap {
m.ctrl.T.Helper()
ret := m.ctrl.Call(m, "Map")
ret0, _ := ret[0].(*ResultsMap)
return ret0
}
// Map indicates an expected call of Map
func (mr *MockResultsMockRecorder) Map() *gomock.Call {
mr.mock.ctrl.T.Helper()
return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Map", reflect.TypeOf((*MockResults)(nil).Map))
}
// Namespace mocks base method
func (m *MockResults) Namespace() ident.ID {
m.ctrl.T.Helper()
ret := m.ctrl.Call(m, "Namespace")
ret0, _ := ret[0].(ident.ID)
return ret0
}
// Namespace indicates an expected call of Namespace
func (mr *MockResultsMockRecorder) Namespace() *gomock.Call {
mr.mock.ctrl.T.Helper()
return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Namespace", reflect.TypeOf((*MockResults)(nil).Namespace))
}
// Reset mocks base method
func (m *MockResults) Reset(arg0 ident.ID) {
m.ctrl.T.Helper()
m.ctrl.Call(m, "Reset", arg0)
}
// Reset indicates an expected call of Reset
func (mr *MockResultsMockRecorder) Reset(arg0 interface{}) *gomock.Call {
mr.mock.ctrl.T.Helper()
return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Reset", reflect.TypeOf((*MockResults)(nil).Reset), arg0)
}
// Size mocks base method
func (m *MockResults) Size() int {
m.ctrl.T.Helper()
ret := m.ctrl.Call(m, "Size")
ret0, _ := ret[0].(int)
return ret0
}
// Size indicates an expected call of Size
func (mr *MockResultsMockRecorder) Size() *gomock.Call {
mr.mock.ctrl.T.Helper()
return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Size", reflect.TypeOf((*MockResults)(nil).Size))
}
// MockBlock is a mock of Block interface
type MockBlock struct {
ctrl *gomock.Controller
recorder *MockBlockMockRecorder
}
// MockBlockMockRecorder is the mock recorder for MockBlock
type MockBlockMockRecorder struct {
mock *MockBlock
}
// NewMockBlock creates a new mock instance
func NewMockBlock(ctrl *gomock.Controller) *MockBlock {
mock := &MockBlock{ctrl: ctrl}
mock.recorder = &MockBlockMockRecorder{mock}
return mock
}
// EXPECT returns an object that allows the caller to indicate expected use
func (m *MockBlock) EXPECT() *MockBlockMockRecorder {
return m.recorder
}
// AddResults mocks base method
func (m *MockBlock) AddResults(arg0 result.IndexBlock) error {
m.ctrl.T.Helper()
ret := m.ctrl.Call(m, "AddResults", arg0)
ret0, _ := ret[0].(error)
return ret0
}
// AddResults indicates an expected call of AddResults
func (mr *MockBlockMockRecorder) AddResults(arg0 interface{}) *gomock.Call {
mr.mock.ctrl.T.Helper()
return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "AddResults", reflect.TypeOf((*MockBlock)(nil).AddResults), arg0)
}
// Close mocks base method
func (m *MockBlock) 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 *MockBlockMockRecorder) Close() *gomock.Call {
mr.mock.ctrl.T.Helper()
return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Close", reflect.TypeOf((*MockBlock)(nil).Close))
}
// EndTime mocks base method
func (m *MockBlock) EndTime() time.Time {
m.ctrl.T.Helper()
ret := m.ctrl.Call(m, "EndTime")
ret0, _ := ret[0].(time.Time)
return ret0
}
// EndTime indicates an expected call of EndTime
func (mr *MockBlockMockRecorder) EndTime() *gomock.Call {
mr.mock.ctrl.T.Helper()
return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "EndTime", reflect.TypeOf((*MockBlock)(nil).EndTime))
}
// EvictMutableSegments mocks base method
func (m *MockBlock) EvictMutableSegments() error {
m.ctrl.T.Helper()
ret := m.ctrl.Call(m, "EvictMutableSegments")
ret0, _ := ret[0].(error)
return ret0
}
// EvictMutableSegments indicates an expected call of EvictMutableSegments
func (mr *MockBlockMockRecorder) EvictMutableSegments() *gomock.Call {
mr.mock.ctrl.T.Helper()
return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "EvictMutableSegments", reflect.TypeOf((*MockBlock)(nil).EvictMutableSegments))
}
// IsSealed mocks base method
func (m *MockBlock) IsSealed() bool {
m.ctrl.T.Helper()
ret := m.ctrl.Call(m, "IsSealed")
ret0, _ := ret[0].(bool)
return ret0
}
// IsSealed indicates an expected call of IsSealed
func (mr *MockBlockMockRecorder) IsSealed() *gomock.Call {
mr.mock.ctrl.T.Helper()
return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "IsSealed", reflect.TypeOf((*MockBlock)(nil).IsSealed))
}
// NeedsMutableSegmentsEvicted mocks base method
func (m *MockBlock) NeedsMutableSegmentsEvicted() bool {
m.ctrl.T.Helper()
ret := m.ctrl.Call(m, "NeedsMutableSegmentsEvicted")
ret0, _ := ret[0].(bool)
return ret0
}
// NeedsMutableSegmentsEvicted indicates an expected call of NeedsMutableSegmentsEvicted
func (mr *MockBlockMockRecorder) NeedsMutableSegmentsEvicted() *gomock.Call {
mr.mock.ctrl.T.Helper()
return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "NeedsMutableSegmentsEvicted", reflect.TypeOf((*MockBlock)(nil).NeedsMutableSegmentsEvicted))
}
// Query mocks base method
func (m *MockBlock) Query(arg0 Query, arg1 QueryOptions, arg2 Results) (bool, error) {
m.ctrl.T.Helper()
ret := m.ctrl.Call(m, "Query", arg0, arg1, arg2)
ret0, _ := ret[0].(bool)
ret1, _ := ret[1].(error)
return ret0, ret1
}
// Query indicates an expected call of Query
func (mr *MockBlockMockRecorder) Query(arg0, arg1, arg2 interface{}) *gomock.Call {
mr.mock.ctrl.T.Helper()
return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Query", reflect.TypeOf((*MockBlock)(nil).Query), arg0, arg1, arg2)
}
// Seal mocks base method
func (m *MockBlock) Seal() error {
m.ctrl.T.Helper()
ret := m.ctrl.Call(m, "Seal")
ret0, _ := ret[0].(error)
return ret0
}
// Seal indicates an expected call of Seal
func (mr *MockBlockMockRecorder) Seal() *gomock.Call {
mr.mock.ctrl.T.Helper()
return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Seal", reflect.TypeOf((*MockBlock)(nil).Seal))
}
// StartTime mocks base method
func (m *MockBlock) StartTime() time.Time {
m.ctrl.T.Helper()
ret := m.ctrl.Call(m, "StartTime")
ret0, _ := ret[0].(time.Time)
return ret0
}
// StartTime indicates an expected call of StartTime
func (mr *MockBlockMockRecorder) StartTime() *gomock.Call {
mr.mock.ctrl.T.Helper()
return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "StartTime", reflect.TypeOf((*MockBlock)(nil).StartTime))
}
// Stats mocks base method
func (m *MockBlock) Stats(arg0 BlockStatsReporter) error {
m.ctrl.T.Helper()
ret := m.ctrl.Call(m, "Stats", arg0)
ret0, _ := ret[0].(error)
return ret0
}
// Stats indicates an expected call of Stats
func (mr *MockBlockMockRecorder) Stats(arg0 interface{}) *gomock.Call {
mr.mock.ctrl.T.Helper()
return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Stats", reflect.TypeOf((*MockBlock)(nil).Stats), arg0)
}
// Tick mocks base method
func (m *MockBlock) Tick(arg0 context.Cancellable, arg1 time.Time) (BlockTickResult, error) {
m.ctrl.T.Helper()
ret := m.ctrl.Call(m, "Tick", arg0, arg1)
ret0, _ := ret[0].(BlockTickResult)
ret1, _ := ret[1].(error)
return ret0, ret1
}
// Tick indicates an expected call of Tick
func (mr *MockBlockMockRecorder) Tick(arg0, arg1 interface{}) *gomock.Call {
mr.mock.ctrl.T.Helper()
return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Tick", reflect.TypeOf((*MockBlock)(nil).Tick), arg0, arg1)
}
// WriteBatch mocks base method
func (m *MockBlock) WriteBatch(arg0 *WriteBatch) (WriteBatchResult, error) {
m.ctrl.T.Helper()
ret := m.ctrl.Call(m, "WriteBatch", arg0)
ret0, _ := ret[0].(WriteBatchResult)
ret1, _ := ret[1].(error)
return ret0, ret1
}
// WriteBatch indicates an expected call of WriteBatch
func (mr *MockBlockMockRecorder) WriteBatch(arg0 interface{}) *gomock.Call {
mr.mock.ctrl.T.Helper()
return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "WriteBatch", reflect.TypeOf((*MockBlock)(nil).WriteBatch), arg0)
}
// MockOnIndexSeries is a mock of OnIndexSeries interface
type MockOnIndexSeries struct {
ctrl *gomock.Controller
recorder *MockOnIndexSeriesMockRecorder
}
// MockOnIndexSeriesMockRecorder is the mock recorder for MockOnIndexSeries
type MockOnIndexSeriesMockRecorder struct {
mock *MockOnIndexSeries
}
// NewMockOnIndexSeries creates a new mock instance
func NewMockOnIndexSeries(ctrl *gomock.Controller) *MockOnIndexSeries {
mock := &MockOnIndexSeries{ctrl: ctrl}
mock.recorder = &MockOnIndexSeriesMockRecorder{mock}
return mock
}
// EXPECT returns an object that allows the caller to indicate expected use
func (m *MockOnIndexSeries) EXPECT() *MockOnIndexSeriesMockRecorder {
return m.recorder
}
// OnIndexFinalize mocks base method
func (m *MockOnIndexSeries) OnIndexFinalize(arg0 time0.UnixNano) {
m.ctrl.T.Helper()
m.ctrl.Call(m, "OnIndexFinalize", arg0)
}
// OnIndexFinalize indicates an expected call of OnIndexFinalize
func (mr *MockOnIndexSeriesMockRecorder) OnIndexFinalize(arg0 interface{}) *gomock.Call {
mr.mock.ctrl.T.Helper()
return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "OnIndexFinalize", reflect.TypeOf((*MockOnIndexSeries)(nil).OnIndexFinalize), arg0)
}
// OnIndexSuccess mocks base method
func (m *MockOnIndexSeries) OnIndexSuccess(arg0 time0.UnixNano) {
m.ctrl.T.Helper()
m.ctrl.Call(m, "OnIndexSuccess", arg0)
}
// OnIndexSuccess indicates an expected call of OnIndexSuccess
func (mr *MockOnIndexSeriesMockRecorder) OnIndexSuccess(arg0 interface{}) *gomock.Call {
mr.mock.ctrl.T.Helper()
return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "OnIndexSuccess", reflect.TypeOf((*MockOnIndexSeries)(nil).OnIndexSuccess), arg0)
}