-
Notifications
You must be signed in to change notification settings - Fork 62
/
Copy pathRevisionRepo.go
737 lines (608 loc) · 24.7 KB
/
RevisionRepo.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
734
735
736
737
// Code generated by mockery v2.43.0. DO NOT EDIT.
package mocks
import (
context "context"
model "github.com/bangumi/server/internal/model"
mock "github.com/stretchr/testify/mock"
)
// RevisionRepo is an autogenerated mock type for the Repo type
type RevisionRepo struct {
mock.Mock
}
type RevisionRepo_Expecter struct {
mock *mock.Mock
}
func (_m *RevisionRepo) EXPECT() *RevisionRepo_Expecter {
return &RevisionRepo_Expecter{mock: &_m.Mock}
}
// CountCharacterRelated provides a mock function with given fields: ctx, characterID
func (_m *RevisionRepo) CountCharacterRelated(ctx context.Context, characterID uint32) (int64, error) {
ret := _m.Called(ctx, characterID)
if len(ret) == 0 {
panic("no return value specified for CountCharacterRelated")
}
var r0 int64
var r1 error
if rf, ok := ret.Get(0).(func(context.Context, uint32) (int64, error)); ok {
return rf(ctx, characterID)
}
if rf, ok := ret.Get(0).(func(context.Context, uint32) int64); ok {
r0 = rf(ctx, characterID)
} else {
r0 = ret.Get(0).(int64)
}
if rf, ok := ret.Get(1).(func(context.Context, uint32) error); ok {
r1 = rf(ctx, characterID)
} else {
r1 = ret.Error(1)
}
return r0, r1
}
// RevisionRepo_CountCharacterRelated_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'CountCharacterRelated'
type RevisionRepo_CountCharacterRelated_Call struct {
*mock.Call
}
// CountCharacterRelated is a helper method to define mock.On call
// - ctx context.Context
// - characterID uint32
func (_e *RevisionRepo_Expecter) CountCharacterRelated(ctx interface{}, characterID interface{}) *RevisionRepo_CountCharacterRelated_Call {
return &RevisionRepo_CountCharacterRelated_Call{Call: _e.mock.On("CountCharacterRelated", ctx, characterID)}
}
func (_c *RevisionRepo_CountCharacterRelated_Call) Run(run func(ctx context.Context, characterID uint32)) *RevisionRepo_CountCharacterRelated_Call {
_c.Call.Run(func(args mock.Arguments) {
run(args[0].(context.Context), args[1].(uint32))
})
return _c
}
func (_c *RevisionRepo_CountCharacterRelated_Call) Return(_a0 int64, _a1 error) *RevisionRepo_CountCharacterRelated_Call {
_c.Call.Return(_a0, _a1)
return _c
}
func (_c *RevisionRepo_CountCharacterRelated_Call) RunAndReturn(run func(context.Context, uint32) (int64, error)) *RevisionRepo_CountCharacterRelated_Call {
_c.Call.Return(run)
return _c
}
// CountEpisodeRelated provides a mock function with given fields: ctx, episodeID
func (_m *RevisionRepo) CountEpisodeRelated(ctx context.Context, episodeID uint32) (int64, error) {
ret := _m.Called(ctx, episodeID)
if len(ret) == 0 {
panic("no return value specified for CountEpisodeRelated")
}
var r0 int64
var r1 error
if rf, ok := ret.Get(0).(func(context.Context, uint32) (int64, error)); ok {
return rf(ctx, episodeID)
}
if rf, ok := ret.Get(0).(func(context.Context, uint32) int64); ok {
r0 = rf(ctx, episodeID)
} else {
r0 = ret.Get(0).(int64)
}
if rf, ok := ret.Get(1).(func(context.Context, uint32) error); ok {
r1 = rf(ctx, episodeID)
} else {
r1 = ret.Error(1)
}
return r0, r1
}
// RevisionRepo_CountEpisodeRelated_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'CountEpisodeRelated'
type RevisionRepo_CountEpisodeRelated_Call struct {
*mock.Call
}
// CountEpisodeRelated is a helper method to define mock.On call
// - ctx context.Context
// - episodeID uint32
func (_e *RevisionRepo_Expecter) CountEpisodeRelated(ctx interface{}, episodeID interface{}) *RevisionRepo_CountEpisodeRelated_Call {
return &RevisionRepo_CountEpisodeRelated_Call{Call: _e.mock.On("CountEpisodeRelated", ctx, episodeID)}
}
func (_c *RevisionRepo_CountEpisodeRelated_Call) Run(run func(ctx context.Context, episodeID uint32)) *RevisionRepo_CountEpisodeRelated_Call {
_c.Call.Run(func(args mock.Arguments) {
run(args[0].(context.Context), args[1].(uint32))
})
return _c
}
func (_c *RevisionRepo_CountEpisodeRelated_Call) Return(_a0 int64, _a1 error) *RevisionRepo_CountEpisodeRelated_Call {
_c.Call.Return(_a0, _a1)
return _c
}
func (_c *RevisionRepo_CountEpisodeRelated_Call) RunAndReturn(run func(context.Context, uint32) (int64, error)) *RevisionRepo_CountEpisodeRelated_Call {
_c.Call.Return(run)
return _c
}
// CountPersonRelated provides a mock function with given fields: ctx, personID
func (_m *RevisionRepo) CountPersonRelated(ctx context.Context, personID uint32) (int64, error) {
ret := _m.Called(ctx, personID)
if len(ret) == 0 {
panic("no return value specified for CountPersonRelated")
}
var r0 int64
var r1 error
if rf, ok := ret.Get(0).(func(context.Context, uint32) (int64, error)); ok {
return rf(ctx, personID)
}
if rf, ok := ret.Get(0).(func(context.Context, uint32) int64); ok {
r0 = rf(ctx, personID)
} else {
r0 = ret.Get(0).(int64)
}
if rf, ok := ret.Get(1).(func(context.Context, uint32) error); ok {
r1 = rf(ctx, personID)
} else {
r1 = ret.Error(1)
}
return r0, r1
}
// RevisionRepo_CountPersonRelated_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'CountPersonRelated'
type RevisionRepo_CountPersonRelated_Call struct {
*mock.Call
}
// CountPersonRelated is a helper method to define mock.On call
// - ctx context.Context
// - personID uint32
func (_e *RevisionRepo_Expecter) CountPersonRelated(ctx interface{}, personID interface{}) *RevisionRepo_CountPersonRelated_Call {
return &RevisionRepo_CountPersonRelated_Call{Call: _e.mock.On("CountPersonRelated", ctx, personID)}
}
func (_c *RevisionRepo_CountPersonRelated_Call) Run(run func(ctx context.Context, personID uint32)) *RevisionRepo_CountPersonRelated_Call {
_c.Call.Run(func(args mock.Arguments) {
run(args[0].(context.Context), args[1].(uint32))
})
return _c
}
func (_c *RevisionRepo_CountPersonRelated_Call) Return(_a0 int64, _a1 error) *RevisionRepo_CountPersonRelated_Call {
_c.Call.Return(_a0, _a1)
return _c
}
func (_c *RevisionRepo_CountPersonRelated_Call) RunAndReturn(run func(context.Context, uint32) (int64, error)) *RevisionRepo_CountPersonRelated_Call {
_c.Call.Return(run)
return _c
}
// CountSubjectRelated provides a mock function with given fields: ctx, id
func (_m *RevisionRepo) CountSubjectRelated(ctx context.Context, id uint32) (int64, error) {
ret := _m.Called(ctx, id)
if len(ret) == 0 {
panic("no return value specified for CountSubjectRelated")
}
var r0 int64
var r1 error
if rf, ok := ret.Get(0).(func(context.Context, uint32) (int64, error)); ok {
return rf(ctx, id)
}
if rf, ok := ret.Get(0).(func(context.Context, uint32) int64); ok {
r0 = rf(ctx, id)
} else {
r0 = ret.Get(0).(int64)
}
if rf, ok := ret.Get(1).(func(context.Context, uint32) error); ok {
r1 = rf(ctx, id)
} else {
r1 = ret.Error(1)
}
return r0, r1
}
// RevisionRepo_CountSubjectRelated_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'CountSubjectRelated'
type RevisionRepo_CountSubjectRelated_Call struct {
*mock.Call
}
// CountSubjectRelated is a helper method to define mock.On call
// - ctx context.Context
// - id uint32
func (_e *RevisionRepo_Expecter) CountSubjectRelated(ctx interface{}, id interface{}) *RevisionRepo_CountSubjectRelated_Call {
return &RevisionRepo_CountSubjectRelated_Call{Call: _e.mock.On("CountSubjectRelated", ctx, id)}
}
func (_c *RevisionRepo_CountSubjectRelated_Call) Run(run func(ctx context.Context, id uint32)) *RevisionRepo_CountSubjectRelated_Call {
_c.Call.Run(func(args mock.Arguments) {
run(args[0].(context.Context), args[1].(uint32))
})
return _c
}
func (_c *RevisionRepo_CountSubjectRelated_Call) Return(_a0 int64, _a1 error) *RevisionRepo_CountSubjectRelated_Call {
_c.Call.Return(_a0, _a1)
return _c
}
func (_c *RevisionRepo_CountSubjectRelated_Call) RunAndReturn(run func(context.Context, uint32) (int64, error)) *RevisionRepo_CountSubjectRelated_Call {
_c.Call.Return(run)
return _c
}
// GetCharacterRelated provides a mock function with given fields: ctx, id
func (_m *RevisionRepo) GetCharacterRelated(ctx context.Context, id uint32) (model.CharacterRevision, error) {
ret := _m.Called(ctx, id)
if len(ret) == 0 {
panic("no return value specified for GetCharacterRelated")
}
var r0 model.CharacterRevision
var r1 error
if rf, ok := ret.Get(0).(func(context.Context, uint32) (model.CharacterRevision, error)); ok {
return rf(ctx, id)
}
if rf, ok := ret.Get(0).(func(context.Context, uint32) model.CharacterRevision); ok {
r0 = rf(ctx, id)
} else {
r0 = ret.Get(0).(model.CharacterRevision)
}
if rf, ok := ret.Get(1).(func(context.Context, uint32) error); ok {
r1 = rf(ctx, id)
} else {
r1 = ret.Error(1)
}
return r0, r1
}
// RevisionRepo_GetCharacterRelated_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'GetCharacterRelated'
type RevisionRepo_GetCharacterRelated_Call struct {
*mock.Call
}
// GetCharacterRelated is a helper method to define mock.On call
// - ctx context.Context
// - id uint32
func (_e *RevisionRepo_Expecter) GetCharacterRelated(ctx interface{}, id interface{}) *RevisionRepo_GetCharacterRelated_Call {
return &RevisionRepo_GetCharacterRelated_Call{Call: _e.mock.On("GetCharacterRelated", ctx, id)}
}
func (_c *RevisionRepo_GetCharacterRelated_Call) Run(run func(ctx context.Context, id uint32)) *RevisionRepo_GetCharacterRelated_Call {
_c.Call.Run(func(args mock.Arguments) {
run(args[0].(context.Context), args[1].(uint32))
})
return _c
}
func (_c *RevisionRepo_GetCharacterRelated_Call) Return(_a0 model.CharacterRevision, _a1 error) *RevisionRepo_GetCharacterRelated_Call {
_c.Call.Return(_a0, _a1)
return _c
}
func (_c *RevisionRepo_GetCharacterRelated_Call) RunAndReturn(run func(context.Context, uint32) (model.CharacterRevision, error)) *RevisionRepo_GetCharacterRelated_Call {
_c.Call.Return(run)
return _c
}
// GetEpisodeRelated provides a mock function with given fields: ctx, id
func (_m *RevisionRepo) GetEpisodeRelated(ctx context.Context, id uint32) (model.EpisodeRevision, error) {
ret := _m.Called(ctx, id)
if len(ret) == 0 {
panic("no return value specified for GetEpisodeRelated")
}
var r0 model.EpisodeRevision
var r1 error
if rf, ok := ret.Get(0).(func(context.Context, uint32) (model.EpisodeRevision, error)); ok {
return rf(ctx, id)
}
if rf, ok := ret.Get(0).(func(context.Context, uint32) model.EpisodeRevision); ok {
r0 = rf(ctx, id)
} else {
r0 = ret.Get(0).(model.EpisodeRevision)
}
if rf, ok := ret.Get(1).(func(context.Context, uint32) error); ok {
r1 = rf(ctx, id)
} else {
r1 = ret.Error(1)
}
return r0, r1
}
// RevisionRepo_GetEpisodeRelated_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'GetEpisodeRelated'
type RevisionRepo_GetEpisodeRelated_Call struct {
*mock.Call
}
// GetEpisodeRelated is a helper method to define mock.On call
// - ctx context.Context
// - id uint32
func (_e *RevisionRepo_Expecter) GetEpisodeRelated(ctx interface{}, id interface{}) *RevisionRepo_GetEpisodeRelated_Call {
return &RevisionRepo_GetEpisodeRelated_Call{Call: _e.mock.On("GetEpisodeRelated", ctx, id)}
}
func (_c *RevisionRepo_GetEpisodeRelated_Call) Run(run func(ctx context.Context, id uint32)) *RevisionRepo_GetEpisodeRelated_Call {
_c.Call.Run(func(args mock.Arguments) {
run(args[0].(context.Context), args[1].(uint32))
})
return _c
}
func (_c *RevisionRepo_GetEpisodeRelated_Call) Return(_a0 model.EpisodeRevision, _a1 error) *RevisionRepo_GetEpisodeRelated_Call {
_c.Call.Return(_a0, _a1)
return _c
}
func (_c *RevisionRepo_GetEpisodeRelated_Call) RunAndReturn(run func(context.Context, uint32) (model.EpisodeRevision, error)) *RevisionRepo_GetEpisodeRelated_Call {
_c.Call.Return(run)
return _c
}
// GetPersonRelated provides a mock function with given fields: ctx, id
func (_m *RevisionRepo) GetPersonRelated(ctx context.Context, id uint32) (model.PersonRevision, error) {
ret := _m.Called(ctx, id)
if len(ret) == 0 {
panic("no return value specified for GetPersonRelated")
}
var r0 model.PersonRevision
var r1 error
if rf, ok := ret.Get(0).(func(context.Context, uint32) (model.PersonRevision, error)); ok {
return rf(ctx, id)
}
if rf, ok := ret.Get(0).(func(context.Context, uint32) model.PersonRevision); ok {
r0 = rf(ctx, id)
} else {
r0 = ret.Get(0).(model.PersonRevision)
}
if rf, ok := ret.Get(1).(func(context.Context, uint32) error); ok {
r1 = rf(ctx, id)
} else {
r1 = ret.Error(1)
}
return r0, r1
}
// RevisionRepo_GetPersonRelated_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'GetPersonRelated'
type RevisionRepo_GetPersonRelated_Call struct {
*mock.Call
}
// GetPersonRelated is a helper method to define mock.On call
// - ctx context.Context
// - id uint32
func (_e *RevisionRepo_Expecter) GetPersonRelated(ctx interface{}, id interface{}) *RevisionRepo_GetPersonRelated_Call {
return &RevisionRepo_GetPersonRelated_Call{Call: _e.mock.On("GetPersonRelated", ctx, id)}
}
func (_c *RevisionRepo_GetPersonRelated_Call) Run(run func(ctx context.Context, id uint32)) *RevisionRepo_GetPersonRelated_Call {
_c.Call.Run(func(args mock.Arguments) {
run(args[0].(context.Context), args[1].(uint32))
})
return _c
}
func (_c *RevisionRepo_GetPersonRelated_Call) Return(_a0 model.PersonRevision, _a1 error) *RevisionRepo_GetPersonRelated_Call {
_c.Call.Return(_a0, _a1)
return _c
}
func (_c *RevisionRepo_GetPersonRelated_Call) RunAndReturn(run func(context.Context, uint32) (model.PersonRevision, error)) *RevisionRepo_GetPersonRelated_Call {
_c.Call.Return(run)
return _c
}
// GetSubjectRelated provides a mock function with given fields: ctx, id
func (_m *RevisionRepo) GetSubjectRelated(ctx context.Context, id uint32) (model.SubjectRevision, error) {
ret := _m.Called(ctx, id)
if len(ret) == 0 {
panic("no return value specified for GetSubjectRelated")
}
var r0 model.SubjectRevision
var r1 error
if rf, ok := ret.Get(0).(func(context.Context, uint32) (model.SubjectRevision, error)); ok {
return rf(ctx, id)
}
if rf, ok := ret.Get(0).(func(context.Context, uint32) model.SubjectRevision); ok {
r0 = rf(ctx, id)
} else {
r0 = ret.Get(0).(model.SubjectRevision)
}
if rf, ok := ret.Get(1).(func(context.Context, uint32) error); ok {
r1 = rf(ctx, id)
} else {
r1 = ret.Error(1)
}
return r0, r1
}
// RevisionRepo_GetSubjectRelated_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'GetSubjectRelated'
type RevisionRepo_GetSubjectRelated_Call struct {
*mock.Call
}
// GetSubjectRelated is a helper method to define mock.On call
// - ctx context.Context
// - id uint32
func (_e *RevisionRepo_Expecter) GetSubjectRelated(ctx interface{}, id interface{}) *RevisionRepo_GetSubjectRelated_Call {
return &RevisionRepo_GetSubjectRelated_Call{Call: _e.mock.On("GetSubjectRelated", ctx, id)}
}
func (_c *RevisionRepo_GetSubjectRelated_Call) Run(run func(ctx context.Context, id uint32)) *RevisionRepo_GetSubjectRelated_Call {
_c.Call.Run(func(args mock.Arguments) {
run(args[0].(context.Context), args[1].(uint32))
})
return _c
}
func (_c *RevisionRepo_GetSubjectRelated_Call) Return(_a0 model.SubjectRevision, _a1 error) *RevisionRepo_GetSubjectRelated_Call {
_c.Call.Return(_a0, _a1)
return _c
}
func (_c *RevisionRepo_GetSubjectRelated_Call) RunAndReturn(run func(context.Context, uint32) (model.SubjectRevision, error)) *RevisionRepo_GetSubjectRelated_Call {
_c.Call.Return(run)
return _c
}
// ListCharacterRelated provides a mock function with given fields: ctx, characterID, limit, offset
func (_m *RevisionRepo) ListCharacterRelated(ctx context.Context, characterID uint32, limit int, offset int) ([]model.CharacterRevision, error) {
ret := _m.Called(ctx, characterID, limit, offset)
if len(ret) == 0 {
panic("no return value specified for ListCharacterRelated")
}
var r0 []model.CharacterRevision
var r1 error
if rf, ok := ret.Get(0).(func(context.Context, uint32, int, int) ([]model.CharacterRevision, error)); ok {
return rf(ctx, characterID, limit, offset)
}
if rf, ok := ret.Get(0).(func(context.Context, uint32, int, int) []model.CharacterRevision); ok {
r0 = rf(ctx, characterID, limit, offset)
} else {
if ret.Get(0) != nil {
r0 = ret.Get(0).([]model.CharacterRevision)
}
}
if rf, ok := ret.Get(1).(func(context.Context, uint32, int, int) error); ok {
r1 = rf(ctx, characterID, limit, offset)
} else {
r1 = ret.Error(1)
}
return r0, r1
}
// RevisionRepo_ListCharacterRelated_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'ListCharacterRelated'
type RevisionRepo_ListCharacterRelated_Call struct {
*mock.Call
}
// ListCharacterRelated is a helper method to define mock.On call
// - ctx context.Context
// - characterID uint32
// - limit int
// - offset int
func (_e *RevisionRepo_Expecter) ListCharacterRelated(ctx interface{}, characterID interface{}, limit interface{}, offset interface{}) *RevisionRepo_ListCharacterRelated_Call {
return &RevisionRepo_ListCharacterRelated_Call{Call: _e.mock.On("ListCharacterRelated", ctx, characterID, limit, offset)}
}
func (_c *RevisionRepo_ListCharacterRelated_Call) Run(run func(ctx context.Context, characterID uint32, limit int, offset int)) *RevisionRepo_ListCharacterRelated_Call {
_c.Call.Run(func(args mock.Arguments) {
run(args[0].(context.Context), args[1].(uint32), args[2].(int), args[3].(int))
})
return _c
}
func (_c *RevisionRepo_ListCharacterRelated_Call) Return(_a0 []model.CharacterRevision, _a1 error) *RevisionRepo_ListCharacterRelated_Call {
_c.Call.Return(_a0, _a1)
return _c
}
func (_c *RevisionRepo_ListCharacterRelated_Call) RunAndReturn(run func(context.Context, uint32, int, int) ([]model.CharacterRevision, error)) *RevisionRepo_ListCharacterRelated_Call {
_c.Call.Return(run)
return _c
}
// ListEpisodeRelated provides a mock function with given fields: ctx, episodeID, limit, offset
func (_m *RevisionRepo) ListEpisodeRelated(ctx context.Context, episodeID uint32, limit int, offset int) ([]model.EpisodeRevision, error) {
ret := _m.Called(ctx, episodeID, limit, offset)
if len(ret) == 0 {
panic("no return value specified for ListEpisodeRelated")
}
var r0 []model.EpisodeRevision
var r1 error
if rf, ok := ret.Get(0).(func(context.Context, uint32, int, int) ([]model.EpisodeRevision, error)); ok {
return rf(ctx, episodeID, limit, offset)
}
if rf, ok := ret.Get(0).(func(context.Context, uint32, int, int) []model.EpisodeRevision); ok {
r0 = rf(ctx, episodeID, limit, offset)
} else {
if ret.Get(0) != nil {
r0 = ret.Get(0).([]model.EpisodeRevision)
}
}
if rf, ok := ret.Get(1).(func(context.Context, uint32, int, int) error); ok {
r1 = rf(ctx, episodeID, limit, offset)
} else {
r1 = ret.Error(1)
}
return r0, r1
}
// RevisionRepo_ListEpisodeRelated_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'ListEpisodeRelated'
type RevisionRepo_ListEpisodeRelated_Call struct {
*mock.Call
}
// ListEpisodeRelated is a helper method to define mock.On call
// - ctx context.Context
// - episodeID uint32
// - limit int
// - offset int
func (_e *RevisionRepo_Expecter) ListEpisodeRelated(ctx interface{}, episodeID interface{}, limit interface{}, offset interface{}) *RevisionRepo_ListEpisodeRelated_Call {
return &RevisionRepo_ListEpisodeRelated_Call{Call: _e.mock.On("ListEpisodeRelated", ctx, episodeID, limit, offset)}
}
func (_c *RevisionRepo_ListEpisodeRelated_Call) Run(run func(ctx context.Context, episodeID uint32, limit int, offset int)) *RevisionRepo_ListEpisodeRelated_Call {
_c.Call.Run(func(args mock.Arguments) {
run(args[0].(context.Context), args[1].(uint32), args[2].(int), args[3].(int))
})
return _c
}
func (_c *RevisionRepo_ListEpisodeRelated_Call) Return(_a0 []model.EpisodeRevision, _a1 error) *RevisionRepo_ListEpisodeRelated_Call {
_c.Call.Return(_a0, _a1)
return _c
}
func (_c *RevisionRepo_ListEpisodeRelated_Call) RunAndReturn(run func(context.Context, uint32, int, int) ([]model.EpisodeRevision, error)) *RevisionRepo_ListEpisodeRelated_Call {
_c.Call.Return(run)
return _c
}
// ListPersonRelated provides a mock function with given fields: ctx, personID, limit, offset
func (_m *RevisionRepo) ListPersonRelated(ctx context.Context, personID uint32, limit int, offset int) ([]model.PersonRevision, error) {
ret := _m.Called(ctx, personID, limit, offset)
if len(ret) == 0 {
panic("no return value specified for ListPersonRelated")
}
var r0 []model.PersonRevision
var r1 error
if rf, ok := ret.Get(0).(func(context.Context, uint32, int, int) ([]model.PersonRevision, error)); ok {
return rf(ctx, personID, limit, offset)
}
if rf, ok := ret.Get(0).(func(context.Context, uint32, int, int) []model.PersonRevision); ok {
r0 = rf(ctx, personID, limit, offset)
} else {
if ret.Get(0) != nil {
r0 = ret.Get(0).([]model.PersonRevision)
}
}
if rf, ok := ret.Get(1).(func(context.Context, uint32, int, int) error); ok {
r1 = rf(ctx, personID, limit, offset)
} else {
r1 = ret.Error(1)
}
return r0, r1
}
// RevisionRepo_ListPersonRelated_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'ListPersonRelated'
type RevisionRepo_ListPersonRelated_Call struct {
*mock.Call
}
// ListPersonRelated is a helper method to define mock.On call
// - ctx context.Context
// - personID uint32
// - limit int
// - offset int
func (_e *RevisionRepo_Expecter) ListPersonRelated(ctx interface{}, personID interface{}, limit interface{}, offset interface{}) *RevisionRepo_ListPersonRelated_Call {
return &RevisionRepo_ListPersonRelated_Call{Call: _e.mock.On("ListPersonRelated", ctx, personID, limit, offset)}
}
func (_c *RevisionRepo_ListPersonRelated_Call) Run(run func(ctx context.Context, personID uint32, limit int, offset int)) *RevisionRepo_ListPersonRelated_Call {
_c.Call.Run(func(args mock.Arguments) {
run(args[0].(context.Context), args[1].(uint32), args[2].(int), args[3].(int))
})
return _c
}
func (_c *RevisionRepo_ListPersonRelated_Call) Return(_a0 []model.PersonRevision, _a1 error) *RevisionRepo_ListPersonRelated_Call {
_c.Call.Return(_a0, _a1)
return _c
}
func (_c *RevisionRepo_ListPersonRelated_Call) RunAndReturn(run func(context.Context, uint32, int, int) ([]model.PersonRevision, error)) *RevisionRepo_ListPersonRelated_Call {
_c.Call.Return(run)
return _c
}
// ListSubjectRelated provides a mock function with given fields: ctx, id, limit, offset
func (_m *RevisionRepo) ListSubjectRelated(ctx context.Context, id uint32, limit int, offset int) ([]model.SubjectRevision, error) {
ret := _m.Called(ctx, id, limit, offset)
if len(ret) == 0 {
panic("no return value specified for ListSubjectRelated")
}
var r0 []model.SubjectRevision
var r1 error
if rf, ok := ret.Get(0).(func(context.Context, uint32, int, int) ([]model.SubjectRevision, error)); ok {
return rf(ctx, id, limit, offset)
}
if rf, ok := ret.Get(0).(func(context.Context, uint32, int, int) []model.SubjectRevision); ok {
r0 = rf(ctx, id, limit, offset)
} else {
if ret.Get(0) != nil {
r0 = ret.Get(0).([]model.SubjectRevision)
}
}
if rf, ok := ret.Get(1).(func(context.Context, uint32, int, int) error); ok {
r1 = rf(ctx, id, limit, offset)
} else {
r1 = ret.Error(1)
}
return r0, r1
}
// RevisionRepo_ListSubjectRelated_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'ListSubjectRelated'
type RevisionRepo_ListSubjectRelated_Call struct {
*mock.Call
}
// ListSubjectRelated is a helper method to define mock.On call
// - ctx context.Context
// - id uint32
// - limit int
// - offset int
func (_e *RevisionRepo_Expecter) ListSubjectRelated(ctx interface{}, id interface{}, limit interface{}, offset interface{}) *RevisionRepo_ListSubjectRelated_Call {
return &RevisionRepo_ListSubjectRelated_Call{Call: _e.mock.On("ListSubjectRelated", ctx, id, limit, offset)}
}
func (_c *RevisionRepo_ListSubjectRelated_Call) Run(run func(ctx context.Context, id uint32, limit int, offset int)) *RevisionRepo_ListSubjectRelated_Call {
_c.Call.Run(func(args mock.Arguments) {
run(args[0].(context.Context), args[1].(uint32), args[2].(int), args[3].(int))
})
return _c
}
func (_c *RevisionRepo_ListSubjectRelated_Call) Return(_a0 []model.SubjectRevision, _a1 error) *RevisionRepo_ListSubjectRelated_Call {
_c.Call.Return(_a0, _a1)
return _c
}
func (_c *RevisionRepo_ListSubjectRelated_Call) RunAndReturn(run func(context.Context, uint32, int, int) ([]model.SubjectRevision, error)) *RevisionRepo_ListSubjectRelated_Call {
_c.Call.Return(run)
return _c
}
// NewRevisionRepo creates a new instance of RevisionRepo. It also registers a testing interface on the mock and a cleanup function to assert the mocks expectations.
// The first argument is typically a *testing.T value.
func NewRevisionRepo(t interface {
mock.TestingT
Cleanup(func())
}) *RevisionRepo {
mock := &RevisionRepo{}
mock.Mock.Test(t)
t.Cleanup(func() { mock.AssertExpectations(t) })
return mock
}