-
Notifications
You must be signed in to change notification settings - Fork 1.2k
/
data_mocks_test.go
733 lines (622 loc) · 27.4 KB
/
data_mocks_test.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
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
657
658
659
660
661
662
663
664
665
666
667
668
669
670
671
672
673
674
675
676
677
678
679
680
681
682
683
684
685
686
687
688
689
690
691
692
693
694
695
696
697
698
699
700
701
702
703
704
705
706
707
708
709
710
711
712
713
714
715
716
717
718
719
720
721
722
723
724
725
726
727
728
729
730
731
732
733
// Code generated by MockGen. DO NOT EDIT.
// Source: github.com/keybase/client/go/kbfs/data (interfaces: BlockCache,BlockSplitter,BlockWithPtrs,DirtyBlockCache)
// Package libkbfs is a generated GoMock package.
package libkbfs
import (
context "context"
reflect "reflect"
gomock "github.com/golang/mock/gomock"
data "github.com/keybase/client/go/kbfs/data"
kbfsblock "github.com/keybase/client/go/kbfs/kbfsblock"
tlf "github.com/keybase/client/go/kbfs/tlf"
)
// MockBlockCache is a mock of BlockCache interface.
type MockBlockCache struct {
ctrl *gomock.Controller
recorder *MockBlockCacheMockRecorder
}
// MockBlockCacheMockRecorder is the mock recorder for MockBlockCache.
type MockBlockCacheMockRecorder struct {
mock *MockBlockCache
}
// NewMockBlockCache creates a new mock instance.
func NewMockBlockCache(ctrl *gomock.Controller) *MockBlockCache {
mock := &MockBlockCache{ctrl: ctrl}
mock.recorder = &MockBlockCacheMockRecorder{mock}
return mock
}
// EXPECT returns an object that allows the caller to indicate expected use.
func (m *MockBlockCache) EXPECT() *MockBlockCacheMockRecorder {
return m.recorder
}
// CheckForKnownPtr mocks base method.
func (m *MockBlockCache) CheckForKnownPtr(arg0 tlf.ID, arg1 *data.FileBlock, arg2 data.BlockCacheHashBehavior) (data.BlockPointer, error) {
m.ctrl.T.Helper()
ret := m.ctrl.Call(m, "CheckForKnownPtr", arg0, arg1, arg2)
ret0, _ := ret[0].(data.BlockPointer)
ret1, _ := ret[1].(error)
return ret0, ret1
}
// CheckForKnownPtr indicates an expected call of CheckForKnownPtr.
func (mr *MockBlockCacheMockRecorder) CheckForKnownPtr(arg0, arg1, arg2 interface{}) *gomock.Call {
mr.mock.ctrl.T.Helper()
return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "CheckForKnownPtr", reflect.TypeOf((*MockBlockCache)(nil).CheckForKnownPtr), arg0, arg1, arg2)
}
// DeleteKnownPtr mocks base method.
func (m *MockBlockCache) DeleteKnownPtr(arg0 tlf.ID, arg1 *data.FileBlock) error {
m.ctrl.T.Helper()
ret := m.ctrl.Call(m, "DeleteKnownPtr", arg0, arg1)
ret0, _ := ret[0].(error)
return ret0
}
// DeleteKnownPtr indicates an expected call of DeleteKnownPtr.
func (mr *MockBlockCacheMockRecorder) DeleteKnownPtr(arg0, arg1 interface{}) *gomock.Call {
mr.mock.ctrl.T.Helper()
return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "DeleteKnownPtr", reflect.TypeOf((*MockBlockCache)(nil).DeleteKnownPtr), arg0, arg1)
}
// DeletePermanent mocks base method.
func (m *MockBlockCache) DeletePermanent(arg0 kbfsblock.ID) error {
m.ctrl.T.Helper()
ret := m.ctrl.Call(m, "DeletePermanent", arg0)
ret0, _ := ret[0].(error)
return ret0
}
// DeletePermanent indicates an expected call of DeletePermanent.
func (mr *MockBlockCacheMockRecorder) DeletePermanent(arg0 interface{}) *gomock.Call {
mr.mock.ctrl.T.Helper()
return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "DeletePermanent", reflect.TypeOf((*MockBlockCache)(nil).DeletePermanent), arg0)
}
// DeleteTransient mocks base method.
func (m *MockBlockCache) DeleteTransient(arg0 kbfsblock.ID, arg1 tlf.ID) error {
m.ctrl.T.Helper()
ret := m.ctrl.Call(m, "DeleteTransient", arg0, arg1)
ret0, _ := ret[0].(error)
return ret0
}
// DeleteTransient indicates an expected call of DeleteTransient.
func (mr *MockBlockCacheMockRecorder) DeleteTransient(arg0, arg1 interface{}) *gomock.Call {
mr.mock.ctrl.T.Helper()
return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "DeleteTransient", reflect.TypeOf((*MockBlockCache)(nil).DeleteTransient), arg0, arg1)
}
// Get mocks base method.
func (m *MockBlockCache) Get(arg0 data.BlockPointer) (data.Block, error) {
m.ctrl.T.Helper()
ret := m.ctrl.Call(m, "Get", arg0)
ret0, _ := ret[0].(data.Block)
ret1, _ := ret[1].(error)
return ret0, ret1
}
// Get indicates an expected call of Get.
func (mr *MockBlockCacheMockRecorder) Get(arg0 interface{}) *gomock.Call {
mr.mock.ctrl.T.Helper()
return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Get", reflect.TypeOf((*MockBlockCache)(nil).Get), arg0)
}
// GetCleanBytesCapacity mocks base method.
func (m *MockBlockCache) GetCleanBytesCapacity() uint64 {
m.ctrl.T.Helper()
ret := m.ctrl.Call(m, "GetCleanBytesCapacity")
ret0, _ := ret[0].(uint64)
return ret0
}
// GetCleanBytesCapacity indicates an expected call of GetCleanBytesCapacity.
func (mr *MockBlockCacheMockRecorder) GetCleanBytesCapacity() *gomock.Call {
mr.mock.ctrl.T.Helper()
return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "GetCleanBytesCapacity", reflect.TypeOf((*MockBlockCache)(nil).GetCleanBytesCapacity))
}
// GetWithLifetime mocks base method.
func (m *MockBlockCache) GetWithLifetime(arg0 data.BlockPointer) (data.Block, data.BlockCacheLifetime, error) {
m.ctrl.T.Helper()
ret := m.ctrl.Call(m, "GetWithLifetime", arg0)
ret0, _ := ret[0].(data.Block)
ret1, _ := ret[1].(data.BlockCacheLifetime)
ret2, _ := ret[2].(error)
return ret0, ret1, ret2
}
// GetWithLifetime indicates an expected call of GetWithLifetime.
func (mr *MockBlockCacheMockRecorder) GetWithLifetime(arg0 interface{}) *gomock.Call {
mr.mock.ctrl.T.Helper()
return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "GetWithLifetime", reflect.TypeOf((*MockBlockCache)(nil).GetWithLifetime), arg0)
}
// Put mocks base method.
func (m *MockBlockCache) Put(arg0 data.BlockPointer, arg1 tlf.ID, arg2 data.Block, arg3 data.BlockCacheLifetime, arg4 data.BlockCacheHashBehavior) error {
m.ctrl.T.Helper()
ret := m.ctrl.Call(m, "Put", arg0, arg1, arg2, arg3, arg4)
ret0, _ := ret[0].(error)
return ret0
}
// Put indicates an expected call of Put.
func (mr *MockBlockCacheMockRecorder) Put(arg0, arg1, arg2, arg3, arg4 interface{}) *gomock.Call {
mr.mock.ctrl.T.Helper()
return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Put", reflect.TypeOf((*MockBlockCache)(nil).Put), arg0, arg1, arg2, arg3, arg4)
}
// SetCleanBytesCapacity mocks base method.
func (m *MockBlockCache) SetCleanBytesCapacity(arg0 uint64) {
m.ctrl.T.Helper()
m.ctrl.Call(m, "SetCleanBytesCapacity", arg0)
}
// SetCleanBytesCapacity indicates an expected call of SetCleanBytesCapacity.
func (mr *MockBlockCacheMockRecorder) SetCleanBytesCapacity(arg0 interface{}) *gomock.Call {
mr.mock.ctrl.T.Helper()
return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "SetCleanBytesCapacity", reflect.TypeOf((*MockBlockCache)(nil).SetCleanBytesCapacity), arg0)
}
// MockBlockSplitter is a mock of BlockSplitter interface.
type MockBlockSplitter struct {
ctrl *gomock.Controller
recorder *MockBlockSplitterMockRecorder
}
// MockBlockSplitterMockRecorder is the mock recorder for MockBlockSplitter.
type MockBlockSplitterMockRecorder struct {
mock *MockBlockSplitter
}
// NewMockBlockSplitter creates a new mock instance.
func NewMockBlockSplitter(ctrl *gomock.Controller) *MockBlockSplitter {
mock := &MockBlockSplitter{ctrl: ctrl}
mock.recorder = &MockBlockSplitterMockRecorder{mock}
return mock
}
// EXPECT returns an object that allows the caller to indicate expected use.
func (m *MockBlockSplitter) EXPECT() *MockBlockSplitterMockRecorder {
return m.recorder
}
// CheckSplit mocks base method.
func (m *MockBlockSplitter) CheckSplit(arg0 *data.FileBlock) int64 {
m.ctrl.T.Helper()
ret := m.ctrl.Call(m, "CheckSplit", arg0)
ret0, _ := ret[0].(int64)
return ret0
}
// CheckSplit indicates an expected call of CheckSplit.
func (mr *MockBlockSplitterMockRecorder) CheckSplit(arg0 interface{}) *gomock.Call {
mr.mock.ctrl.T.Helper()
return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "CheckSplit", reflect.TypeOf((*MockBlockSplitter)(nil).CheckSplit), arg0)
}
// CopyUntilSplit mocks base method.
func (m *MockBlockSplitter) CopyUntilSplit(arg0 *data.FileBlock, arg1 bool, arg2 []byte, arg3 int64) int64 {
m.ctrl.T.Helper()
ret := m.ctrl.Call(m, "CopyUntilSplit", arg0, arg1, arg2, arg3)
ret0, _ := ret[0].(int64)
return ret0
}
// CopyUntilSplit indicates an expected call of CopyUntilSplit.
func (mr *MockBlockSplitterMockRecorder) CopyUntilSplit(arg0, arg1, arg2, arg3 interface{}) *gomock.Call {
mr.mock.ctrl.T.Helper()
return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "CopyUntilSplit", reflect.TypeOf((*MockBlockSplitter)(nil).CopyUntilSplit), arg0, arg1, arg2, arg3)
}
// MaxPtrsPerBlock mocks base method.
func (m *MockBlockSplitter) MaxPtrsPerBlock() int {
m.ctrl.T.Helper()
ret := m.ctrl.Call(m, "MaxPtrsPerBlock")
ret0, _ := ret[0].(int)
return ret0
}
// MaxPtrsPerBlock indicates an expected call of MaxPtrsPerBlock.
func (mr *MockBlockSplitterMockRecorder) MaxPtrsPerBlock() *gomock.Call {
mr.mock.ctrl.T.Helper()
return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "MaxPtrsPerBlock", reflect.TypeOf((*MockBlockSplitter)(nil).MaxPtrsPerBlock))
}
// ShouldEmbedData mocks base method.
func (m *MockBlockSplitter) ShouldEmbedData(arg0 uint64) bool {
m.ctrl.T.Helper()
ret := m.ctrl.Call(m, "ShouldEmbedData", arg0)
ret0, _ := ret[0].(bool)
return ret0
}
// ShouldEmbedData indicates an expected call of ShouldEmbedData.
func (mr *MockBlockSplitterMockRecorder) ShouldEmbedData(arg0 interface{}) *gomock.Call {
mr.mock.ctrl.T.Helper()
return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "ShouldEmbedData", reflect.TypeOf((*MockBlockSplitter)(nil).ShouldEmbedData), arg0)
}
// SplitDirIfNeeded mocks base method.
func (m *MockBlockSplitter) SplitDirIfNeeded(arg0 *data.DirBlock) ([]*data.DirBlock, *data.StringOffset) {
m.ctrl.T.Helper()
ret := m.ctrl.Call(m, "SplitDirIfNeeded", arg0)
ret0, _ := ret[0].([]*data.DirBlock)
ret1, _ := ret[1].(*data.StringOffset)
return ret0, ret1
}
// SplitDirIfNeeded indicates an expected call of SplitDirIfNeeded.
func (mr *MockBlockSplitterMockRecorder) SplitDirIfNeeded(arg0 interface{}) *gomock.Call {
mr.mock.ctrl.T.Helper()
return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "SplitDirIfNeeded", reflect.TypeOf((*MockBlockSplitter)(nil).SplitDirIfNeeded), arg0)
}
// MockBlockWithPtrs is a mock of BlockWithPtrs interface.
type MockBlockWithPtrs struct {
ctrl *gomock.Controller
recorder *MockBlockWithPtrsMockRecorder
}
// MockBlockWithPtrsMockRecorder is the mock recorder for MockBlockWithPtrs.
type MockBlockWithPtrsMockRecorder struct {
mock *MockBlockWithPtrs
}
// NewMockBlockWithPtrs creates a new mock instance.
func NewMockBlockWithPtrs(ctrl *gomock.Controller) *MockBlockWithPtrs {
mock := &MockBlockWithPtrs{ctrl: ctrl}
mock.recorder = &MockBlockWithPtrsMockRecorder{mock}
return mock
}
// EXPECT returns an object that allows the caller to indicate expected use.
func (m *MockBlockWithPtrs) EXPECT() *MockBlockWithPtrsMockRecorder {
return m.recorder
}
// AppendNewIndirectPtr mocks base method.
func (m *MockBlockWithPtrs) AppendNewIndirectPtr(arg0 data.BlockPointer, arg1 data.Offset) {
m.ctrl.T.Helper()
m.ctrl.Call(m, "AppendNewIndirectPtr", arg0, arg1)
}
// AppendNewIndirectPtr indicates an expected call of AppendNewIndirectPtr.
func (mr *MockBlockWithPtrsMockRecorder) AppendNewIndirectPtr(arg0, arg1 interface{}) *gomock.Call {
mr.mock.ctrl.T.Helper()
return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "AppendNewIndirectPtr", reflect.TypeOf((*MockBlockWithPtrs)(nil).AppendNewIndirectPtr), arg0, arg1)
}
// BytesCanBeDirtied mocks base method.
func (m *MockBlockWithPtrs) BytesCanBeDirtied() int64 {
m.ctrl.T.Helper()
ret := m.ctrl.Call(m, "BytesCanBeDirtied")
ret0, _ := ret[0].(int64)
return ret0
}
// BytesCanBeDirtied indicates an expected call of BytesCanBeDirtied.
func (mr *MockBlockWithPtrsMockRecorder) BytesCanBeDirtied() *gomock.Call {
mr.mock.ctrl.T.Helper()
return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "BytesCanBeDirtied", reflect.TypeOf((*MockBlockWithPtrs)(nil).BytesCanBeDirtied))
}
// ClearIndirectPtrSize mocks base method.
func (m *MockBlockWithPtrs) ClearIndirectPtrSize(arg0 int) {
m.ctrl.T.Helper()
m.ctrl.Call(m, "ClearIndirectPtrSize", arg0)
}
// ClearIndirectPtrSize indicates an expected call of ClearIndirectPtrSize.
func (mr *MockBlockWithPtrsMockRecorder) ClearIndirectPtrSize(arg0 interface{}) *gomock.Call {
mr.mock.ctrl.T.Helper()
return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "ClearIndirectPtrSize", reflect.TypeOf((*MockBlockWithPtrs)(nil).ClearIndirectPtrSize), arg0)
}
// DataVersion mocks base method.
func (m *MockBlockWithPtrs) DataVersion() data.Ver {
m.ctrl.T.Helper()
ret := m.ctrl.Call(m, "DataVersion")
ret0, _ := ret[0].(data.Ver)
return ret0
}
// DataVersion indicates an expected call of DataVersion.
func (mr *MockBlockWithPtrsMockRecorder) DataVersion() *gomock.Call {
mr.mock.ctrl.T.Helper()
return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "DataVersion", reflect.TypeOf((*MockBlockWithPtrs)(nil).DataVersion))
}
// FirstOffset mocks base method.
func (m *MockBlockWithPtrs) FirstOffset() data.Offset {
m.ctrl.T.Helper()
ret := m.ctrl.Call(m, "FirstOffset")
ret0, _ := ret[0].(data.Offset)
return ret0
}
// FirstOffset indicates an expected call of FirstOffset.
func (mr *MockBlockWithPtrsMockRecorder) FirstOffset() *gomock.Call {
mr.mock.ctrl.T.Helper()
return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "FirstOffset", reflect.TypeOf((*MockBlockWithPtrs)(nil).FirstOffset))
}
// GetEncodedSize mocks base method.
func (m *MockBlockWithPtrs) GetEncodedSize() uint32 {
m.ctrl.T.Helper()
ret := m.ctrl.Call(m, "GetEncodedSize")
ret0, _ := ret[0].(uint32)
return ret0
}
// GetEncodedSize indicates an expected call of GetEncodedSize.
func (mr *MockBlockWithPtrsMockRecorder) GetEncodedSize() *gomock.Call {
mr.mock.ctrl.T.Helper()
return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "GetEncodedSize", reflect.TypeOf((*MockBlockWithPtrs)(nil).GetEncodedSize))
}
// IndirectPtr mocks base method.
func (m *MockBlockWithPtrs) IndirectPtr(arg0 int) (data.BlockInfo, data.Offset) {
m.ctrl.T.Helper()
ret := m.ctrl.Call(m, "IndirectPtr", arg0)
ret0, _ := ret[0].(data.BlockInfo)
ret1, _ := ret[1].(data.Offset)
return ret0, ret1
}
// IndirectPtr indicates an expected call of IndirectPtr.
func (mr *MockBlockWithPtrsMockRecorder) IndirectPtr(arg0 interface{}) *gomock.Call {
mr.mock.ctrl.T.Helper()
return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "IndirectPtr", reflect.TypeOf((*MockBlockWithPtrs)(nil).IndirectPtr), arg0)
}
// IsIndirect mocks base method.
func (m *MockBlockWithPtrs) IsIndirect() bool {
m.ctrl.T.Helper()
ret := m.ctrl.Call(m, "IsIndirect")
ret0, _ := ret[0].(bool)
return ret0
}
// IsIndirect indicates an expected call of IsIndirect.
func (mr *MockBlockWithPtrsMockRecorder) IsIndirect() *gomock.Call {
mr.mock.ctrl.T.Helper()
return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "IsIndirect", reflect.TypeOf((*MockBlockWithPtrs)(nil).IsIndirect))
}
// IsTail mocks base method.
func (m *MockBlockWithPtrs) IsTail() bool {
m.ctrl.T.Helper()
ret := m.ctrl.Call(m, "IsTail")
ret0, _ := ret[0].(bool)
return ret0
}
// IsTail indicates an expected call of IsTail.
func (mr *MockBlockWithPtrsMockRecorder) IsTail() *gomock.Call {
mr.mock.ctrl.T.Helper()
return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "IsTail", reflect.TypeOf((*MockBlockWithPtrs)(nil).IsTail))
}
// NewEmptier mocks base method.
func (m *MockBlockWithPtrs) NewEmptier() func() data.Block {
m.ctrl.T.Helper()
ret := m.ctrl.Call(m, "NewEmptier")
ret0, _ := ret[0].(func() data.Block)
return ret0
}
// NewEmptier indicates an expected call of NewEmptier.
func (mr *MockBlockWithPtrsMockRecorder) NewEmptier() *gomock.Call {
mr.mock.ctrl.T.Helper()
return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "NewEmptier", reflect.TypeOf((*MockBlockWithPtrs)(nil).NewEmptier))
}
// NewEmpty mocks base method.
func (m *MockBlockWithPtrs) NewEmpty() data.Block {
m.ctrl.T.Helper()
ret := m.ctrl.Call(m, "NewEmpty")
ret0, _ := ret[0].(data.Block)
return ret0
}
// NewEmpty indicates an expected call of NewEmpty.
func (mr *MockBlockWithPtrsMockRecorder) NewEmpty() *gomock.Call {
mr.mock.ctrl.T.Helper()
return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "NewEmpty", reflect.TypeOf((*MockBlockWithPtrs)(nil).NewEmpty))
}
// NumIndirectPtrs mocks base method.
func (m *MockBlockWithPtrs) NumIndirectPtrs() int {
m.ctrl.T.Helper()
ret := m.ctrl.Call(m, "NumIndirectPtrs")
ret0, _ := ret[0].(int)
return ret0
}
// NumIndirectPtrs indicates an expected call of NumIndirectPtrs.
func (mr *MockBlockWithPtrsMockRecorder) NumIndirectPtrs() *gomock.Call {
mr.mock.ctrl.T.Helper()
return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "NumIndirectPtrs", reflect.TypeOf((*MockBlockWithPtrs)(nil).NumIndirectPtrs))
}
// OffsetExceedsData mocks base method.
func (m *MockBlockWithPtrs) OffsetExceedsData(arg0, arg1 data.Offset) bool {
m.ctrl.T.Helper()
ret := m.ctrl.Call(m, "OffsetExceedsData", arg0, arg1)
ret0, _ := ret[0].(bool)
return ret0
}
// OffsetExceedsData indicates an expected call of OffsetExceedsData.
func (mr *MockBlockWithPtrsMockRecorder) OffsetExceedsData(arg0, arg1 interface{}) *gomock.Call {
mr.mock.ctrl.T.Helper()
return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "OffsetExceedsData", reflect.TypeOf((*MockBlockWithPtrs)(nil).OffsetExceedsData), arg0, arg1)
}
// Set mocks base method.
func (m *MockBlockWithPtrs) Set(arg0 data.Block) {
m.ctrl.T.Helper()
m.ctrl.Call(m, "Set", arg0)
}
// Set indicates an expected call of Set.
func (mr *MockBlockWithPtrsMockRecorder) Set(arg0 interface{}) *gomock.Call {
mr.mock.ctrl.T.Helper()
return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Set", reflect.TypeOf((*MockBlockWithPtrs)(nil).Set), arg0)
}
// SetEncodedSize mocks base method.
func (m *MockBlockWithPtrs) SetEncodedSize(arg0 uint32) {
m.ctrl.T.Helper()
m.ctrl.Call(m, "SetEncodedSize", arg0)
}
// SetEncodedSize indicates an expected call of SetEncodedSize.
func (mr *MockBlockWithPtrsMockRecorder) SetEncodedSize(arg0 interface{}) *gomock.Call {
mr.mock.ctrl.T.Helper()
return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "SetEncodedSize", reflect.TypeOf((*MockBlockWithPtrs)(nil).SetEncodedSize), arg0)
}
// SetIndirectPtrInfo mocks base method.
func (m *MockBlockWithPtrs) SetIndirectPtrInfo(arg0 int, arg1 data.BlockInfo) {
m.ctrl.T.Helper()
m.ctrl.Call(m, "SetIndirectPtrInfo", arg0, arg1)
}
// SetIndirectPtrInfo indicates an expected call of SetIndirectPtrInfo.
func (mr *MockBlockWithPtrsMockRecorder) SetIndirectPtrInfo(arg0, arg1 interface{}) *gomock.Call {
mr.mock.ctrl.T.Helper()
return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "SetIndirectPtrInfo", reflect.TypeOf((*MockBlockWithPtrs)(nil).SetIndirectPtrInfo), arg0, arg1)
}
// SetIndirectPtrOff mocks base method.
func (m *MockBlockWithPtrs) SetIndirectPtrOff(arg0 int, arg1 data.Offset) {
m.ctrl.T.Helper()
m.ctrl.Call(m, "SetIndirectPtrOff", arg0, arg1)
}
// SetIndirectPtrOff indicates an expected call of SetIndirectPtrOff.
func (mr *MockBlockWithPtrsMockRecorder) SetIndirectPtrOff(arg0, arg1 interface{}) *gomock.Call {
mr.mock.ctrl.T.Helper()
return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "SetIndirectPtrOff", reflect.TypeOf((*MockBlockWithPtrs)(nil).SetIndirectPtrOff), arg0, arg1)
}
// SetIndirectPtrType mocks base method.
func (m *MockBlockWithPtrs) SetIndirectPtrType(arg0 int, arg1 data.BlockDirectType) {
m.ctrl.T.Helper()
m.ctrl.Call(m, "SetIndirectPtrType", arg0, arg1)
}
// SetIndirectPtrType indicates an expected call of SetIndirectPtrType.
func (mr *MockBlockWithPtrsMockRecorder) SetIndirectPtrType(arg0, arg1 interface{}) *gomock.Call {
mr.mock.ctrl.T.Helper()
return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "SetIndirectPtrType", reflect.TypeOf((*MockBlockWithPtrs)(nil).SetIndirectPtrType), arg0, arg1)
}
// SwapIndirectPtrs mocks base method.
func (m *MockBlockWithPtrs) SwapIndirectPtrs(arg0 int, arg1 data.BlockWithPtrs, arg2 int) {
m.ctrl.T.Helper()
m.ctrl.Call(m, "SwapIndirectPtrs", arg0, arg1, arg2)
}
// SwapIndirectPtrs indicates an expected call of SwapIndirectPtrs.
func (mr *MockBlockWithPtrsMockRecorder) SwapIndirectPtrs(arg0, arg1, arg2 interface{}) *gomock.Call {
mr.mock.ctrl.T.Helper()
return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "SwapIndirectPtrs", reflect.TypeOf((*MockBlockWithPtrs)(nil).SwapIndirectPtrs), arg0, arg1, arg2)
}
// ToCommonBlock mocks base method.
func (m *MockBlockWithPtrs) ToCommonBlock() *data.CommonBlock {
m.ctrl.T.Helper()
ret := m.ctrl.Call(m, "ToCommonBlock")
ret0, _ := ret[0].(*data.CommonBlock)
return ret0
}
// ToCommonBlock indicates an expected call of ToCommonBlock.
func (mr *MockBlockWithPtrsMockRecorder) ToCommonBlock() *gomock.Call {
mr.mock.ctrl.T.Helper()
return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "ToCommonBlock", reflect.TypeOf((*MockBlockWithPtrs)(nil).ToCommonBlock))
}
// MockDirtyBlockCache is a mock of DirtyBlockCache interface.
type MockDirtyBlockCache struct {
ctrl *gomock.Controller
recorder *MockDirtyBlockCacheMockRecorder
}
// MockDirtyBlockCacheMockRecorder is the mock recorder for MockDirtyBlockCache.
type MockDirtyBlockCacheMockRecorder struct {
mock *MockDirtyBlockCache
}
// NewMockDirtyBlockCache creates a new mock instance.
func NewMockDirtyBlockCache(ctrl *gomock.Controller) *MockDirtyBlockCache {
mock := &MockDirtyBlockCache{ctrl: ctrl}
mock.recorder = &MockDirtyBlockCacheMockRecorder{mock}
return mock
}
// EXPECT returns an object that allows the caller to indicate expected use.
func (m *MockDirtyBlockCache) EXPECT() *MockDirtyBlockCacheMockRecorder {
return m.recorder
}
// BlockSyncFinished mocks base method.
func (m *MockDirtyBlockCache) BlockSyncFinished(arg0 tlf.ID, arg1 int64) {
m.ctrl.T.Helper()
m.ctrl.Call(m, "BlockSyncFinished", arg0, arg1)
}
// BlockSyncFinished indicates an expected call of BlockSyncFinished.
func (mr *MockDirtyBlockCacheMockRecorder) BlockSyncFinished(arg0, arg1 interface{}) *gomock.Call {
mr.mock.ctrl.T.Helper()
return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "BlockSyncFinished", reflect.TypeOf((*MockDirtyBlockCache)(nil).BlockSyncFinished), arg0, arg1)
}
// Delete mocks base method.
func (m *MockDirtyBlockCache) Delete(arg0 tlf.ID, arg1 data.BlockPointer, arg2 data.BranchName) error {
m.ctrl.T.Helper()
ret := m.ctrl.Call(m, "Delete", arg0, arg1, arg2)
ret0, _ := ret[0].(error)
return ret0
}
// Delete indicates an expected call of Delete.
func (mr *MockDirtyBlockCacheMockRecorder) Delete(arg0, arg1, arg2 interface{}) *gomock.Call {
mr.mock.ctrl.T.Helper()
return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Delete", reflect.TypeOf((*MockDirtyBlockCache)(nil).Delete), arg0, arg1, arg2)
}
// Get mocks base method.
func (m *MockDirtyBlockCache) Get(arg0 context.Context, arg1 tlf.ID, arg2 data.BlockPointer, arg3 data.BranchName) (data.Block, error) {
m.ctrl.T.Helper()
ret := m.ctrl.Call(m, "Get", arg0, arg1, arg2, arg3)
ret0, _ := ret[0].(data.Block)
ret1, _ := ret[1].(error)
return ret0, ret1
}
// Get indicates an expected call of Get.
func (mr *MockDirtyBlockCacheMockRecorder) Get(arg0, arg1, arg2, arg3 interface{}) *gomock.Call {
mr.mock.ctrl.T.Helper()
return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Get", reflect.TypeOf((*MockDirtyBlockCache)(nil).Get), arg0, arg1, arg2, arg3)
}
// IsAnyDirty mocks base method.
func (m *MockDirtyBlockCache) IsAnyDirty(arg0 tlf.ID) bool {
m.ctrl.T.Helper()
ret := m.ctrl.Call(m, "IsAnyDirty", arg0)
ret0, _ := ret[0].(bool)
return ret0
}
// IsAnyDirty indicates an expected call of IsAnyDirty.
func (mr *MockDirtyBlockCacheMockRecorder) IsAnyDirty(arg0 interface{}) *gomock.Call {
mr.mock.ctrl.T.Helper()
return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "IsAnyDirty", reflect.TypeOf((*MockDirtyBlockCache)(nil).IsAnyDirty), arg0)
}
// IsDirty mocks base method.
func (m *MockDirtyBlockCache) IsDirty(arg0 tlf.ID, arg1 data.BlockPointer, arg2 data.BranchName) bool {
m.ctrl.T.Helper()
ret := m.ctrl.Call(m, "IsDirty", arg0, arg1, arg2)
ret0, _ := ret[0].(bool)
return ret0
}
// IsDirty indicates an expected call of IsDirty.
func (mr *MockDirtyBlockCacheMockRecorder) IsDirty(arg0, arg1, arg2 interface{}) *gomock.Call {
mr.mock.ctrl.T.Helper()
return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "IsDirty", reflect.TypeOf((*MockDirtyBlockCache)(nil).IsDirty), arg0, arg1, arg2)
}
// Put mocks base method.
func (m *MockDirtyBlockCache) Put(arg0 context.Context, arg1 tlf.ID, arg2 data.BlockPointer, arg3 data.BranchName, arg4 data.Block) error {
m.ctrl.T.Helper()
ret := m.ctrl.Call(m, "Put", arg0, arg1, arg2, arg3, arg4)
ret0, _ := ret[0].(error)
return ret0
}
// Put indicates an expected call of Put.
func (mr *MockDirtyBlockCacheMockRecorder) Put(arg0, arg1, arg2, arg3, arg4 interface{}) *gomock.Call {
mr.mock.ctrl.T.Helper()
return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Put", reflect.TypeOf((*MockDirtyBlockCache)(nil).Put), arg0, arg1, arg2, arg3, arg4)
}
// RequestPermissionToDirty mocks base method.
func (m *MockDirtyBlockCache) RequestPermissionToDirty(arg0 context.Context, arg1 tlf.ID, arg2 int64) (data.DirtyPermChan, error) {
m.ctrl.T.Helper()
ret := m.ctrl.Call(m, "RequestPermissionToDirty", arg0, arg1, arg2)
ret0, _ := ret[0].(data.DirtyPermChan)
ret1, _ := ret[1].(error)
return ret0, ret1
}
// RequestPermissionToDirty indicates an expected call of RequestPermissionToDirty.
func (mr *MockDirtyBlockCacheMockRecorder) RequestPermissionToDirty(arg0, arg1, arg2 interface{}) *gomock.Call {
mr.mock.ctrl.T.Helper()
return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "RequestPermissionToDirty", reflect.TypeOf((*MockDirtyBlockCache)(nil).RequestPermissionToDirty), arg0, arg1, arg2)
}
// ShouldForceSync mocks base method.
func (m *MockDirtyBlockCache) ShouldForceSync(arg0 tlf.ID) bool {
m.ctrl.T.Helper()
ret := m.ctrl.Call(m, "ShouldForceSync", arg0)
ret0, _ := ret[0].(bool)
return ret0
}
// ShouldForceSync indicates an expected call of ShouldForceSync.
func (mr *MockDirtyBlockCacheMockRecorder) ShouldForceSync(arg0 interface{}) *gomock.Call {
mr.mock.ctrl.T.Helper()
return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "ShouldForceSync", reflect.TypeOf((*MockDirtyBlockCache)(nil).ShouldForceSync), arg0)
}
// Shutdown mocks base method.
func (m *MockDirtyBlockCache) Shutdown() error {
m.ctrl.T.Helper()
ret := m.ctrl.Call(m, "Shutdown")
ret0, _ := ret[0].(error)
return ret0
}
// Shutdown indicates an expected call of Shutdown.
func (mr *MockDirtyBlockCacheMockRecorder) Shutdown() *gomock.Call {
mr.mock.ctrl.T.Helper()
return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Shutdown", reflect.TypeOf((*MockDirtyBlockCache)(nil).Shutdown))
}
// SyncFinished mocks base method.
func (m *MockDirtyBlockCache) SyncFinished(arg0 tlf.ID, arg1 int64) {
m.ctrl.T.Helper()
m.ctrl.Call(m, "SyncFinished", arg0, arg1)
}
// SyncFinished indicates an expected call of SyncFinished.
func (mr *MockDirtyBlockCacheMockRecorder) SyncFinished(arg0, arg1 interface{}) *gomock.Call {
mr.mock.ctrl.T.Helper()
return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "SyncFinished", reflect.TypeOf((*MockDirtyBlockCache)(nil).SyncFinished), arg0, arg1)
}
// UpdateSyncingBytes mocks base method.
func (m *MockDirtyBlockCache) UpdateSyncingBytes(arg0 tlf.ID, arg1 int64) {
m.ctrl.T.Helper()
m.ctrl.Call(m, "UpdateSyncingBytes", arg0, arg1)
}
// UpdateSyncingBytes indicates an expected call of UpdateSyncingBytes.
func (mr *MockDirtyBlockCacheMockRecorder) UpdateSyncingBytes(arg0, arg1 interface{}) *gomock.Call {
mr.mock.ctrl.T.Helper()
return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "UpdateSyncingBytes", reflect.TypeOf((*MockDirtyBlockCache)(nil).UpdateSyncingBytes), arg0, arg1)
}
// UpdateUnsyncedBytes mocks base method.
func (m *MockDirtyBlockCache) UpdateUnsyncedBytes(arg0 tlf.ID, arg1 int64, arg2 bool) {
m.ctrl.T.Helper()
m.ctrl.Call(m, "UpdateUnsyncedBytes", arg0, arg1, arg2)
}
// UpdateUnsyncedBytes indicates an expected call of UpdateUnsyncedBytes.
func (mr *MockDirtyBlockCacheMockRecorder) UpdateUnsyncedBytes(arg0, arg1, arg2 interface{}) *gomock.Call {
mr.mock.ctrl.T.Helper()
return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "UpdateUnsyncedBytes", reflect.TypeOf((*MockDirtyBlockCache)(nil).UpdateUnsyncedBytes), arg0, arg1, arg2)
}