-
Notifications
You must be signed in to change notification settings - Fork 0
/
repository_mock.go
716 lines (584 loc) · 23.3 KB
/
repository_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
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
// Code generated by mockery v2.43.1. DO NOT EDIT.
package user
import (
context "context"
mock "github.com/stretchr/testify/mock"
)
// MockRepository is an autogenerated mock type for the Repository type
type MockRepository struct {
mock.Mock
}
type MockRepository_Expecter struct {
mock *mock.Mock
}
func (_m *MockRepository) EXPECT() *MockRepository_Expecter {
return &MockRepository_Expecter{mock: &_m.Mock}
}
// CreateUser provides a mock function with given fields: ctx, orgID, email, passwordHash, isOwner
func (_m *MockRepository) CreateUser(ctx context.Context, orgID int64, email string, passwordHash string, isOwner bool) (User, error) {
ret := _m.Called(ctx, orgID, email, passwordHash, isOwner)
if len(ret) == 0 {
panic("no return value specified for CreateUser")
}
var r0 User
var r1 error
if rf, ok := ret.Get(0).(func(context.Context, int64, string, string, bool) (User, error)); ok {
return rf(ctx, orgID, email, passwordHash, isOwner)
}
if rf, ok := ret.Get(0).(func(context.Context, int64, string, string, bool) User); ok {
r0 = rf(ctx, orgID, email, passwordHash, isOwner)
} else {
r0 = ret.Get(0).(User)
}
if rf, ok := ret.Get(1).(func(context.Context, int64, string, string, bool) error); ok {
r1 = rf(ctx, orgID, email, passwordHash, isOwner)
} else {
r1 = ret.Error(1)
}
return r0, r1
}
// MockRepository_CreateUser_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'CreateUser'
type MockRepository_CreateUser_Call struct {
*mock.Call
}
// CreateUser is a helper method to define mock.On call
// - ctx context.Context
// - orgID int64
// - email string
// - passwordHash string
// - isOwner bool
func (_e *MockRepository_Expecter) CreateUser(ctx interface{}, orgID interface{}, email interface{}, passwordHash interface{}, isOwner interface{}) *MockRepository_CreateUser_Call {
return &MockRepository_CreateUser_Call{Call: _e.mock.On("CreateUser", ctx, orgID, email, passwordHash, isOwner)}
}
func (_c *MockRepository_CreateUser_Call) Run(run func(ctx context.Context, orgID int64, email string, passwordHash string, isOwner bool)) *MockRepository_CreateUser_Call {
_c.Call.Run(func(args mock.Arguments) {
run(args[0].(context.Context), args[1].(int64), args[2].(string), args[3].(string), args[4].(bool))
})
return _c
}
func (_c *MockRepository_CreateUser_Call) Return(_a0 User, _a1 error) *MockRepository_CreateUser_Call {
_c.Call.Return(_a0, _a1)
return _c
}
func (_c *MockRepository_CreateUser_Call) RunAndReturn(run func(context.Context, int64, string, string, bool) (User, error)) *MockRepository_CreateUser_Call {
_c.Call.Return(run)
return _c
}
// DeleteUser provides a mock function with given fields: ctx, id
func (_m *MockRepository) DeleteUser(ctx context.Context, id int64) error {
ret := _m.Called(ctx, id)
if len(ret) == 0 {
panic("no return value specified for DeleteUser")
}
var r0 error
if rf, ok := ret.Get(0).(func(context.Context, int64) error); ok {
r0 = rf(ctx, id)
} else {
r0 = ret.Error(0)
}
return r0
}
// MockRepository_DeleteUser_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'DeleteUser'
type MockRepository_DeleteUser_Call struct {
*mock.Call
}
// DeleteUser is a helper method to define mock.On call
// - ctx context.Context
// - id int64
func (_e *MockRepository_Expecter) DeleteUser(ctx interface{}, id interface{}) *MockRepository_DeleteUser_Call {
return &MockRepository_DeleteUser_Call{Call: _e.mock.On("DeleteUser", ctx, id)}
}
func (_c *MockRepository_DeleteUser_Call) Run(run func(ctx context.Context, id int64)) *MockRepository_DeleteUser_Call {
_c.Call.Run(func(args mock.Arguments) {
run(args[0].(context.Context), args[1].(int64))
})
return _c
}
func (_c *MockRepository_DeleteUser_Call) Return(_a0 error) *MockRepository_DeleteUser_Call {
_c.Call.Return(_a0)
return _c
}
func (_c *MockRepository_DeleteUser_Call) RunAndReturn(run func(context.Context, int64) error) *MockRepository_DeleteUser_Call {
_c.Call.Return(run)
return _c
}
// DisableUser provides a mock function with given fields: ctx, id, comment
func (_m *MockRepository) DisableUser(ctx context.Context, id int64, comment string) error {
ret := _m.Called(ctx, id, comment)
if len(ret) == 0 {
panic("no return value specified for DisableUser")
}
var r0 error
if rf, ok := ret.Get(0).(func(context.Context, int64, string) error); ok {
r0 = rf(ctx, id, comment)
} else {
r0 = ret.Error(0)
}
return r0
}
// MockRepository_DisableUser_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'DisableUser'
type MockRepository_DisableUser_Call struct {
*mock.Call
}
// DisableUser is a helper method to define mock.On call
// - ctx context.Context
// - id int64
// - comment string
func (_e *MockRepository_Expecter) DisableUser(ctx interface{}, id interface{}, comment interface{}) *MockRepository_DisableUser_Call {
return &MockRepository_DisableUser_Call{Call: _e.mock.On("DisableUser", ctx, id, comment)}
}
func (_c *MockRepository_DisableUser_Call) Run(run func(ctx context.Context, id int64, comment string)) *MockRepository_DisableUser_Call {
_c.Call.Run(func(args mock.Arguments) {
run(args[0].(context.Context), args[1].(int64), args[2].(string))
})
return _c
}
func (_c *MockRepository_DisableUser_Call) Return(_a0 error) *MockRepository_DisableUser_Call {
_c.Call.Return(_a0)
return _c
}
func (_c *MockRepository_DisableUser_Call) RunAndReturn(run func(context.Context, int64, string) error) *MockRepository_DisableUser_Call {
_c.Call.Return(run)
return _c
}
// EnableUser provides a mock function with given fields: ctx, id, comment
func (_m *MockRepository) EnableUser(ctx context.Context, id int64, comment string) error {
ret := _m.Called(ctx, id, comment)
if len(ret) == 0 {
panic("no return value specified for EnableUser")
}
var r0 error
if rf, ok := ret.Get(0).(func(context.Context, int64, string) error); ok {
r0 = rf(ctx, id, comment)
} else {
r0 = ret.Error(0)
}
return r0
}
// MockRepository_EnableUser_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'EnableUser'
type MockRepository_EnableUser_Call struct {
*mock.Call
}
// EnableUser is a helper method to define mock.On call
// - ctx context.Context
// - id int64
// - comment string
func (_e *MockRepository_Expecter) EnableUser(ctx interface{}, id interface{}, comment interface{}) *MockRepository_EnableUser_Call {
return &MockRepository_EnableUser_Call{Call: _e.mock.On("EnableUser", ctx, id, comment)}
}
func (_c *MockRepository_EnableUser_Call) Run(run func(ctx context.Context, id int64, comment string)) *MockRepository_EnableUser_Call {
_c.Call.Run(func(args mock.Arguments) {
run(args[0].(context.Context), args[1].(int64), args[2].(string))
})
return _c
}
func (_c *MockRepository_EnableUser_Call) Return(_a0 error) *MockRepository_EnableUser_Call {
_c.Call.Return(_a0)
return _c
}
func (_c *MockRepository_EnableUser_Call) RunAndReturn(run func(context.Context, int64, string) error) *MockRepository_EnableUser_Call {
_c.Call.Return(run)
return _c
}
// GenerateAPIToken provides a mock function with given fields: ctx, id
func (_m *MockRepository) GenerateAPIToken(ctx context.Context, id int64) error {
ret := _m.Called(ctx, id)
if len(ret) == 0 {
panic("no return value specified for GenerateAPIToken")
}
var r0 error
if rf, ok := ret.Get(0).(func(context.Context, int64) error); ok {
r0 = rf(ctx, id)
} else {
r0 = ret.Error(0)
}
return r0
}
// MockRepository_GenerateAPIToken_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'GenerateAPIToken'
type MockRepository_GenerateAPIToken_Call struct {
*mock.Call
}
// GenerateAPIToken is a helper method to define mock.On call
// - ctx context.Context
// - id int64
func (_e *MockRepository_Expecter) GenerateAPIToken(ctx interface{}, id interface{}) *MockRepository_GenerateAPIToken_Call {
return &MockRepository_GenerateAPIToken_Call{Call: _e.mock.On("GenerateAPIToken", ctx, id)}
}
func (_c *MockRepository_GenerateAPIToken_Call) Run(run func(ctx context.Context, id int64)) *MockRepository_GenerateAPIToken_Call {
_c.Call.Run(func(args mock.Arguments) {
run(args[0].(context.Context), args[1].(int64))
})
return _c
}
func (_c *MockRepository_GenerateAPIToken_Call) Return(_a0 error) *MockRepository_GenerateAPIToken_Call {
_c.Call.Return(_a0)
return _c
}
func (_c *MockRepository_GenerateAPIToken_Call) RunAndReturn(run func(context.Context, int64) error) *MockRepository_GenerateAPIToken_Call {
_c.Call.Return(run)
return _c
}
// GetUserByAPIToken provides a mock function with given fields: ctx, apiToken
func (_m *MockRepository) GetUserByAPIToken(ctx context.Context, apiToken string) (User, error) {
ret := _m.Called(ctx, apiToken)
if len(ret) == 0 {
panic("no return value specified for GetUserByAPIToken")
}
var r0 User
var r1 error
if rf, ok := ret.Get(0).(func(context.Context, string) (User, error)); ok {
return rf(ctx, apiToken)
}
if rf, ok := ret.Get(0).(func(context.Context, string) User); ok {
r0 = rf(ctx, apiToken)
} else {
r0 = ret.Get(0).(User)
}
if rf, ok := ret.Get(1).(func(context.Context, string) error); ok {
r1 = rf(ctx, apiToken)
} else {
r1 = ret.Error(1)
}
return r0, r1
}
// MockRepository_GetUserByAPIToken_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'GetUserByAPIToken'
type MockRepository_GetUserByAPIToken_Call struct {
*mock.Call
}
// GetUserByAPIToken is a helper method to define mock.On call
// - ctx context.Context
// - apiToken string
func (_e *MockRepository_Expecter) GetUserByAPIToken(ctx interface{}, apiToken interface{}) *MockRepository_GetUserByAPIToken_Call {
return &MockRepository_GetUserByAPIToken_Call{Call: _e.mock.On("GetUserByAPIToken", ctx, apiToken)}
}
func (_c *MockRepository_GetUserByAPIToken_Call) Run(run func(ctx context.Context, apiToken string)) *MockRepository_GetUserByAPIToken_Call {
_c.Call.Run(func(args mock.Arguments) {
run(args[0].(context.Context), args[1].(string))
})
return _c
}
func (_c *MockRepository_GetUserByAPIToken_Call) Return(_a0 User, _a1 error) *MockRepository_GetUserByAPIToken_Call {
_c.Call.Return(_a0, _a1)
return _c
}
func (_c *MockRepository_GetUserByAPIToken_Call) RunAndReturn(run func(context.Context, string) (User, error)) *MockRepository_GetUserByAPIToken_Call {
_c.Call.Return(run)
return _c
}
// GetUserByID provides a mock function with given fields: ctx, id
func (_m *MockRepository) GetUserByID(ctx context.Context, id int64) (User, error) {
ret := _m.Called(ctx, id)
if len(ret) == 0 {
panic("no return value specified for GetUserByID")
}
var r0 User
var r1 error
if rf, ok := ret.Get(0).(func(context.Context, int64) (User, error)); ok {
return rf(ctx, id)
}
if rf, ok := ret.Get(0).(func(context.Context, int64) User); ok {
r0 = rf(ctx, id)
} else {
r0 = ret.Get(0).(User)
}
if rf, ok := ret.Get(1).(func(context.Context, int64) error); ok {
r1 = rf(ctx, id)
} else {
r1 = ret.Error(1)
}
return r0, r1
}
// MockRepository_GetUserByID_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'GetUserByID'
type MockRepository_GetUserByID_Call struct {
*mock.Call
}
// GetUserByID is a helper method to define mock.On call
// - ctx context.Context
// - id int64
func (_e *MockRepository_Expecter) GetUserByID(ctx interface{}, id interface{}) *MockRepository_GetUserByID_Call {
return &MockRepository_GetUserByID_Call{Call: _e.mock.On("GetUserByID", ctx, id)}
}
func (_c *MockRepository_GetUserByID_Call) Run(run func(ctx context.Context, id int64)) *MockRepository_GetUserByID_Call {
_c.Call.Run(func(args mock.Arguments) {
run(args[0].(context.Context), args[1].(int64))
})
return _c
}
func (_c *MockRepository_GetUserByID_Call) Return(_a0 User, _a1 error) *MockRepository_GetUserByID_Call {
_c.Call.Return(_a0, _a1)
return _c
}
func (_c *MockRepository_GetUserByID_Call) RunAndReturn(run func(context.Context, int64) (User, error)) *MockRepository_GetUserByID_Call {
_c.Call.Return(run)
return _c
}
// GetUserByOrgIDEmail provides a mock function with given fields: ctx, orgID, email
func (_m *MockRepository) GetUserByOrgIDEmail(ctx context.Context, orgID int64, email string) (User, error) {
ret := _m.Called(ctx, orgID, email)
if len(ret) == 0 {
panic("no return value specified for GetUserByOrgIDEmail")
}
var r0 User
var r1 error
if rf, ok := ret.Get(0).(func(context.Context, int64, string) (User, error)); ok {
return rf(ctx, orgID, email)
}
if rf, ok := ret.Get(0).(func(context.Context, int64, string) User); ok {
r0 = rf(ctx, orgID, email)
} else {
r0 = ret.Get(0).(User)
}
if rf, ok := ret.Get(1).(func(context.Context, int64, string) error); ok {
r1 = rf(ctx, orgID, email)
} else {
r1 = ret.Error(1)
}
return r0, r1
}
// MockRepository_GetUserByOrgIDEmail_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'GetUserByOrgIDEmail'
type MockRepository_GetUserByOrgIDEmail_Call struct {
*mock.Call
}
// GetUserByOrgIDEmail is a helper method to define mock.On call
// - ctx context.Context
// - orgID int64
// - email string
func (_e *MockRepository_Expecter) GetUserByOrgIDEmail(ctx interface{}, orgID interface{}, email interface{}) *MockRepository_GetUserByOrgIDEmail_Call {
return &MockRepository_GetUserByOrgIDEmail_Call{Call: _e.mock.On("GetUserByOrgIDEmail", ctx, orgID, email)}
}
func (_c *MockRepository_GetUserByOrgIDEmail_Call) Run(run func(ctx context.Context, orgID int64, email string)) *MockRepository_GetUserByOrgIDEmail_Call {
_c.Call.Run(func(args mock.Arguments) {
run(args[0].(context.Context), args[1].(int64), args[2].(string))
})
return _c
}
func (_c *MockRepository_GetUserByOrgIDEmail_Call) Return(_a0 User, _a1 error) *MockRepository_GetUserByOrgIDEmail_Call {
_c.Call.Return(_a0, _a1)
return _c
}
func (_c *MockRepository_GetUserByOrgIDEmail_Call) RunAndReturn(run func(context.Context, int64, string) (User, error)) *MockRepository_GetUserByOrgIDEmail_Call {
_c.Call.Return(run)
return _c
}
// GetUserByOrgSubdomainAPIToken provides a mock function with given fields: ctx, orgSubdomain, apiToken
func (_m *MockRepository) GetUserByOrgSubdomainAPIToken(ctx context.Context, orgSubdomain string, apiToken string) (User, error) {
ret := _m.Called(ctx, orgSubdomain, apiToken)
if len(ret) == 0 {
panic("no return value specified for GetUserByOrgSubdomainAPIToken")
}
var r0 User
var r1 error
if rf, ok := ret.Get(0).(func(context.Context, string, string) (User, error)); ok {
return rf(ctx, orgSubdomain, apiToken)
}
if rf, ok := ret.Get(0).(func(context.Context, string, string) User); ok {
r0 = rf(ctx, orgSubdomain, apiToken)
} else {
r0 = ret.Get(0).(User)
}
if rf, ok := ret.Get(1).(func(context.Context, string, string) error); ok {
r1 = rf(ctx, orgSubdomain, apiToken)
} else {
r1 = ret.Error(1)
}
return r0, r1
}
// MockRepository_GetUserByOrgSubdomainAPIToken_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'GetUserByOrgSubdomainAPIToken'
type MockRepository_GetUserByOrgSubdomainAPIToken_Call struct {
*mock.Call
}
// GetUserByOrgSubdomainAPIToken is a helper method to define mock.On call
// - ctx context.Context
// - orgSubdomain string
// - apiToken string
func (_e *MockRepository_Expecter) GetUserByOrgSubdomainAPIToken(ctx interface{}, orgSubdomain interface{}, apiToken interface{}) *MockRepository_GetUserByOrgSubdomainAPIToken_Call {
return &MockRepository_GetUserByOrgSubdomainAPIToken_Call{Call: _e.mock.On("GetUserByOrgSubdomainAPIToken", ctx, orgSubdomain, apiToken)}
}
func (_c *MockRepository_GetUserByOrgSubdomainAPIToken_Call) Run(run func(ctx context.Context, orgSubdomain string, apiToken string)) *MockRepository_GetUserByOrgSubdomainAPIToken_Call {
_c.Call.Run(func(args mock.Arguments) {
run(args[0].(context.Context), args[1].(string), args[2].(string))
})
return _c
}
func (_c *MockRepository_GetUserByOrgSubdomainAPIToken_Call) Return(_a0 User, _a1 error) *MockRepository_GetUserByOrgSubdomainAPIToken_Call {
_c.Call.Return(_a0, _a1)
return _c
}
func (_c *MockRepository_GetUserByOrgSubdomainAPIToken_Call) RunAndReturn(run func(context.Context, string, string) (User, error)) *MockRepository_GetUserByOrgSubdomainAPIToken_Call {
_c.Call.Return(run)
return _c
}
// GetUserByOrgSubdomainEmail provides a mock function with given fields: ctx, orgSubdomain, email
func (_m *MockRepository) GetUserByOrgSubdomainEmail(ctx context.Context, orgSubdomain string, email string) (User, error) {
ret := _m.Called(ctx, orgSubdomain, email)
if len(ret) == 0 {
panic("no return value specified for GetUserByOrgSubdomainEmail")
}
var r0 User
var r1 error
if rf, ok := ret.Get(0).(func(context.Context, string, string) (User, error)); ok {
return rf(ctx, orgSubdomain, email)
}
if rf, ok := ret.Get(0).(func(context.Context, string, string) User); ok {
r0 = rf(ctx, orgSubdomain, email)
} else {
r0 = ret.Get(0).(User)
}
if rf, ok := ret.Get(1).(func(context.Context, string, string) error); ok {
r1 = rf(ctx, orgSubdomain, email)
} else {
r1 = ret.Error(1)
}
return r0, r1
}
// MockRepository_GetUserByOrgSubdomainEmail_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'GetUserByOrgSubdomainEmail'
type MockRepository_GetUserByOrgSubdomainEmail_Call struct {
*mock.Call
}
// GetUserByOrgSubdomainEmail is a helper method to define mock.On call
// - ctx context.Context
// - orgSubdomain string
// - email string
func (_e *MockRepository_Expecter) GetUserByOrgSubdomainEmail(ctx interface{}, orgSubdomain interface{}, email interface{}) *MockRepository_GetUserByOrgSubdomainEmail_Call {
return &MockRepository_GetUserByOrgSubdomainEmail_Call{Call: _e.mock.On("GetUserByOrgSubdomainEmail", ctx, orgSubdomain, email)}
}
func (_c *MockRepository_GetUserByOrgSubdomainEmail_Call) Run(run func(ctx context.Context, orgSubdomain string, email string)) *MockRepository_GetUserByOrgSubdomainEmail_Call {
_c.Call.Run(func(args mock.Arguments) {
run(args[0].(context.Context), args[1].(string), args[2].(string))
})
return _c
}
func (_c *MockRepository_GetUserByOrgSubdomainEmail_Call) Return(_a0 User, _a1 error) *MockRepository_GetUserByOrgSubdomainEmail_Call {
_c.Call.Return(_a0, _a1)
return _c
}
func (_c *MockRepository_GetUserByOrgSubdomainEmail_Call) RunAndReturn(run func(context.Context, string, string) (User, error)) *MockRepository_GetUserByOrgSubdomainEmail_Call {
_c.Call.Return(run)
return _c
}
// ResetAPIToken provides a mock function with given fields: ctx, id
func (_m *MockRepository) ResetAPIToken(ctx context.Context, id int64) error {
ret := _m.Called(ctx, id)
if len(ret) == 0 {
panic("no return value specified for ResetAPIToken")
}
var r0 error
if rf, ok := ret.Get(0).(func(context.Context, int64) error); ok {
r0 = rf(ctx, id)
} else {
r0 = ret.Error(0)
}
return r0
}
// MockRepository_ResetAPIToken_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'ResetAPIToken'
type MockRepository_ResetAPIToken_Call struct {
*mock.Call
}
// ResetAPIToken is a helper method to define mock.On call
// - ctx context.Context
// - id int64
func (_e *MockRepository_Expecter) ResetAPIToken(ctx interface{}, id interface{}) *MockRepository_ResetAPIToken_Call {
return &MockRepository_ResetAPIToken_Call{Call: _e.mock.On("ResetAPIToken", ctx, id)}
}
func (_c *MockRepository_ResetAPIToken_Call) Run(run func(ctx context.Context, id int64)) *MockRepository_ResetAPIToken_Call {
_c.Call.Run(func(args mock.Arguments) {
run(args[0].(context.Context), args[1].(int64))
})
return _c
}
func (_c *MockRepository_ResetAPIToken_Call) Return(_a0 error) *MockRepository_ResetAPIToken_Call {
_c.Call.Return(_a0)
return _c
}
func (_c *MockRepository_ResetAPIToken_Call) RunAndReturn(run func(context.Context, int64) error) *MockRepository_ResetAPIToken_Call {
_c.Call.Return(run)
return _c
}
// ResetPassword provides a mock function with given fields: ctx, id, passwordHash
func (_m *MockRepository) ResetPassword(ctx context.Context, id int64, passwordHash string) error {
ret := _m.Called(ctx, id, passwordHash)
if len(ret) == 0 {
panic("no return value specified for ResetPassword")
}
var r0 error
if rf, ok := ret.Get(0).(func(context.Context, int64, string) error); ok {
r0 = rf(ctx, id, passwordHash)
} else {
r0 = ret.Error(0)
}
return r0
}
// MockRepository_ResetPassword_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'ResetPassword'
type MockRepository_ResetPassword_Call struct {
*mock.Call
}
// ResetPassword is a helper method to define mock.On call
// - ctx context.Context
// - id int64
// - passwordHash string
func (_e *MockRepository_Expecter) ResetPassword(ctx interface{}, id interface{}, passwordHash interface{}) *MockRepository_ResetPassword_Call {
return &MockRepository_ResetPassword_Call{Call: _e.mock.On("ResetPassword", ctx, id, passwordHash)}
}
func (_c *MockRepository_ResetPassword_Call) Run(run func(ctx context.Context, id int64, passwordHash string)) *MockRepository_ResetPassword_Call {
_c.Call.Run(func(args mock.Arguments) {
run(args[0].(context.Context), args[1].(int64), args[2].(string))
})
return _c
}
func (_c *MockRepository_ResetPassword_Call) Return(_a0 error) *MockRepository_ResetPassword_Call {
_c.Call.Return(_a0)
return _c
}
func (_c *MockRepository_ResetPassword_Call) RunAndReturn(run func(context.Context, int64, string) error) *MockRepository_ResetPassword_Call {
_c.Call.Return(run)
return _c
}
// SetEmailVerified provides a mock function with given fields: ctx, id
func (_m *MockRepository) SetEmailVerified(ctx context.Context, id int64) error {
ret := _m.Called(ctx, id)
if len(ret) == 0 {
panic("no return value specified for SetEmailVerified")
}
var r0 error
if rf, ok := ret.Get(0).(func(context.Context, int64) error); ok {
r0 = rf(ctx, id)
} else {
r0 = ret.Error(0)
}
return r0
}
// MockRepository_SetEmailVerified_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'SetEmailVerified'
type MockRepository_SetEmailVerified_Call struct {
*mock.Call
}
// SetEmailVerified is a helper method to define mock.On call
// - ctx context.Context
// - id int64
func (_e *MockRepository_Expecter) SetEmailVerified(ctx interface{}, id interface{}) *MockRepository_SetEmailVerified_Call {
return &MockRepository_SetEmailVerified_Call{Call: _e.mock.On("SetEmailVerified", ctx, id)}
}
func (_c *MockRepository_SetEmailVerified_Call) Run(run func(ctx context.Context, id int64)) *MockRepository_SetEmailVerified_Call {
_c.Call.Run(func(args mock.Arguments) {
run(args[0].(context.Context), args[1].(int64))
})
return _c
}
func (_c *MockRepository_SetEmailVerified_Call) Return(_a0 error) *MockRepository_SetEmailVerified_Call {
_c.Call.Return(_a0)
return _c
}
func (_c *MockRepository_SetEmailVerified_Call) RunAndReturn(run func(context.Context, int64) error) *MockRepository_SetEmailVerified_Call {
_c.Call.Return(run)
return _c
}
// NewMockRepository creates a new instance of MockRepository. 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 NewMockRepository(t interface {
mock.TestingT
Cleanup(func())
}) *MockRepository {
mock := &MockRepository{}
mock.Mock.Test(t)
t.Cleanup(func() { mock.AssertExpectations(t) })
return mock
}