1// Code generated by mockery; DO NOT EDIT.
2// github.com/vektra/mockery
3// template: testify
4
5package mocks
6
7import (
8 "context"
9 "time"
10
11 "github.com/bnema/gordon/internal/domain"
12 mock "github.com/stretchr/testify/mock"
13)
14
15// NewMockAuthService creates a new instance of MockAuthService. It also registers a testing interface on the mock and a cleanup function to assert the mocks expectations.
16// The first argument is typically a *testing.T value.
17func NewMockAuthService(t interface {
18 mock.TestingT
19 Cleanup(func())
20}) *MockAuthService {
21 mock := &MockAuthService{}
22 mock.Mock.Test(t)
23
24 t.Cleanup(func() { mock.AssertExpectations(t) })
25
26 return mock
27}
28
29// MockAuthService is an autogenerated mock type for the AuthService type
30type MockAuthService struct {
31 mock.Mock
32}
33
34type MockAuthService_Expecter struct {
35 mock *mock.Mock
36}
37
38func (_m *MockAuthService) EXPECT() *MockAuthService_Expecter {
39 return &MockAuthService_Expecter{mock: &_m.Mock}
40}
41
42// ExtendToken provides a mock function for the type MockAuthService
43func (_mock *MockAuthService) ExtendToken(ctx context.Context, tokenString string) (string, error) {
44 ret := _mock.Called(ctx, tokenString)
45
46 if len(ret) == 0 {
47 panic("no return value specified for ExtendToken")
48 }
49
50 var r0 string
51 var r1 error
52 if returnFunc, ok := ret.Get(0).(func(context.Context, string) (string, error)); ok {
53 return returnFunc(ctx, tokenString)
54 }
55 if returnFunc, ok := ret.Get(0).(func(context.Context, string) string); ok {
56 r0 = returnFunc(ctx, tokenString)
57 } else {
58 r0 = ret.Get(0).(string)
59 }
60 if returnFunc, ok := ret.Get(1).(func(context.Context, string) error); ok {
61 r1 = returnFunc(ctx, tokenString)
62 } else {
63 r1 = ret.Error(1)
64 }
65 return r0, r1
66}
67
68// MockAuthService_ExtendToken_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'ExtendToken'
69type MockAuthService_ExtendToken_Call struct {
70 *mock.Call
71}
72
73// ExtendToken is a helper method to define mock.On call
74// - ctx context.Context
75// - tokenString string
76func (_e *MockAuthService_Expecter) ExtendToken(ctx interface{}, tokenString interface{}) *MockAuthService_ExtendToken_Call {
77 return &MockAuthService_ExtendToken_Call{Call: _e.mock.On("ExtendToken", ctx, tokenString)}
78}
79
80func (_c *MockAuthService_ExtendToken_Call) Run(run func(ctx context.Context, tokenString string)) *MockAuthService_ExtendToken_Call {
81 _c.Call.Run(func(args mock.Arguments) {
82 var arg0 context.Context
83 if args[0] != nil {
84 arg0 = args[0].(context.Context)
85 }
86 var arg1 string
87 if args[1] != nil {
88 arg1 = args[1].(string)
89 }
90 run(
91 arg0,
92 arg1,
93 )
94 })
95 return _c
96}
97
98func (_c *MockAuthService_ExtendToken_Call) Return(s string, err error) *MockAuthService_ExtendToken_Call {
99 _c.Call.Return(s, err)
100 return _c
101}
102
103func (_c *MockAuthService_ExtendToken_Call) RunAndReturn(run func(ctx context.Context, tokenString string) (string, error)) *MockAuthService_ExtendToken_Call {
104 _c.Call.Return(run)
105 return _c
106}
107
108// GenerateAccessToken provides a mock function for the type MockAuthService
109func (_mock *MockAuthService) GenerateAccessToken(ctx context.Context, subject string, scopes []string, expiry time.Duration) (string, error) {
110 ret := _mock.Called(ctx, subject, scopes, expiry)
111
112 if len(ret) == 0 {
113 panic("no return value specified for GenerateAccessToken")
114 }
115
116 var r0 string
117 var r1 error
118 if returnFunc, ok := ret.Get(0).(func(context.Context, string, []string, time.Duration) (string, error)); ok {
119 return returnFunc(ctx, subject, scopes, expiry)
120 }
121 if returnFunc, ok := ret.Get(0).(func(context.Context, string, []string, time.Duration) string); ok {
122 r0 = returnFunc(ctx, subject, scopes, expiry)
123 } else {
124 r0 = ret.Get(0).(string)
125 }
126 if returnFunc, ok := ret.Get(1).(func(context.Context, string, []string, time.Duration) error); ok {
127 r1 = returnFunc(ctx, subject, scopes, expiry)
128 } else {
129 r1 = ret.Error(1)
130 }
131 return r0, r1
132}
133
134// MockAuthService_GenerateAccessToken_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'GenerateAccessToken'
135type MockAuthService_GenerateAccessToken_Call struct {
136 *mock.Call
137}
138
139// GenerateAccessToken is a helper method to define mock.On call
140// - ctx context.Context
141// - subject string
142// - scopes []string
143// - expiry time.Duration
144func (_e *MockAuthService_Expecter) GenerateAccessToken(ctx interface{}, subject interface{}, scopes interface{}, expiry interface{}) *MockAuthService_GenerateAccessToken_Call {
145 return &MockAuthService_GenerateAccessToken_Call{Call: _e.mock.On("GenerateAccessToken", ctx, subject, scopes, expiry)}
146}
147
148func (_c *MockAuthService_GenerateAccessToken_Call) Run(run func(ctx context.Context, subject string, scopes []string, expiry time.Duration)) *MockAuthService_GenerateAccessToken_Call {
149 _c.Call.Run(func(args mock.Arguments) {
150 var arg0 context.Context
151 if args[0] != nil {
152 arg0 = args[0].(context.Context)
153 }
154 var arg1 string
155 if args[1] != nil {
156 arg1 = args[1].(string)
157 }
158 var arg2 []string
159 if args[2] != nil {
160 arg2 = args[2].([]string)
161 }
162 var arg3 time.Duration
163 if args[3] != nil {
164 arg3 = args[3].(time.Duration)
165 }
166 run(
167 arg0,
168 arg1,
169 arg2,
170 arg3,
171 )
172 })
173 return _c
174}
175
176func (_c *MockAuthService_GenerateAccessToken_Call) Return(s string, err error) *MockAuthService_GenerateAccessToken_Call {
177 _c.Call.Return(s, err)
178 return _c
179}
180
181func (_c *MockAuthService_GenerateAccessToken_Call) RunAndReturn(run func(ctx context.Context, subject string, scopes []string, expiry time.Duration) (string, error)) *MockAuthService_GenerateAccessToken_Call {
182 _c.Call.Return(run)
183 return _c
184}
185
186// GenerateToken provides a mock function for the type MockAuthService
187func (_mock *MockAuthService) GenerateToken(ctx context.Context, subject string, scopes []string, expiry time.Duration) (string, error) {
188 ret := _mock.Called(ctx, subject, scopes, expiry)
189
190 if len(ret) == 0 {
191 panic("no return value specified for GenerateToken")
192 }
193
194 var r0 string
195 var r1 error
196 if returnFunc, ok := ret.Get(0).(func(context.Context, string, []string, time.Duration) (string, error)); ok {
197 return returnFunc(ctx, subject, scopes, expiry)
198 }
199 if returnFunc, ok := ret.Get(0).(func(context.Context, string, []string, time.Duration) string); ok {
200 r0 = returnFunc(ctx, subject, scopes, expiry)
201 } else {
202 r0 = ret.Get(0).(string)
203 }
204 if returnFunc, ok := ret.Get(1).(func(context.Context, string, []string, time.Duration) error); ok {
205 r1 = returnFunc(ctx, subject, scopes, expiry)
206 } else {
207 r1 = ret.Error(1)
208 }
209 return r0, r1
210}
211
212// MockAuthService_GenerateToken_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'GenerateToken'
213type MockAuthService_GenerateToken_Call struct {
214 *mock.Call
215}
216
217// GenerateToken is a helper method to define mock.On call
218// - ctx context.Context
219// - subject string
220// - scopes []string
221// - expiry time.Duration
222func (_e *MockAuthService_Expecter) GenerateToken(ctx interface{}, subject interface{}, scopes interface{}, expiry interface{}) *MockAuthService_GenerateToken_Call {
223 return &MockAuthService_GenerateToken_Call{Call: _e.mock.On("GenerateToken", ctx, subject, scopes, expiry)}
224}
225
226func (_c *MockAuthService_GenerateToken_Call) Run(run func(ctx context.Context, subject string, scopes []string, expiry time.Duration)) *MockAuthService_GenerateToken_Call {
227 _c.Call.Run(func(args mock.Arguments) {
228 var arg0 context.Context
229 if args[0] != nil {
230 arg0 = args[0].(context.Context)
231 }
232 var arg1 string
233 if args[1] != nil {
234 arg1 = args[1].(string)
235 }
236 var arg2 []string
237 if args[2] != nil {
238 arg2 = args[2].([]string)
239 }
240 var arg3 time.Duration
241 if args[3] != nil {
242 arg3 = args[3].(time.Duration)
243 }
244 run(
245 arg0,
246 arg1,
247 arg2,
248 arg3,
249 )
250 })
251 return _c
252}
253
254func (_c *MockAuthService_GenerateToken_Call) Return(s string, err error) *MockAuthService_GenerateToken_Call {
255 _c.Call.Return(s, err)
256 return _c
257}
258
259func (_c *MockAuthService_GenerateToken_Call) RunAndReturn(run func(ctx context.Context, subject string, scopes []string, expiry time.Duration) (string, error)) *MockAuthService_GenerateToken_Call {
260 _c.Call.Return(run)
261 return _c
262}
263
264// GetAccessTokenTTL provides a mock function for the type MockAuthService
265func (_mock *MockAuthService) GetAccessTokenTTL() time.Duration {
266 ret := _mock.Called()
267
268 if len(ret) == 0 {
269 panic("no return value specified for GetAccessTokenTTL")
270 }
271
272 var r0 time.Duration
273 if returnFunc, ok := ret.Get(0).(func() time.Duration); ok {
274 r0 = returnFunc()
275 } else {
276 r0 = ret.Get(0).(time.Duration)
277 }
278 return r0
279}
280
281// MockAuthService_GetAccessTokenTTL_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'GetAccessTokenTTL'
282type MockAuthService_GetAccessTokenTTL_Call struct {
283 *mock.Call
284}
285
286// GetAccessTokenTTL is a helper method to define mock.On call
287func (_e *MockAuthService_Expecter) GetAccessTokenTTL() *MockAuthService_GetAccessTokenTTL_Call {
288 return &MockAuthService_GetAccessTokenTTL_Call{Call: _e.mock.On("GetAccessTokenTTL")}
289}
290
291func (_c *MockAuthService_GetAccessTokenTTL_Call) Run(run func()) *MockAuthService_GetAccessTokenTTL_Call {
292 _c.Call.Run(func(args mock.Arguments) {
293 run()
294 })
295 return _c
296}
297
298func (_c *MockAuthService_GetAccessTokenTTL_Call) Return(duration time.Duration) *MockAuthService_GetAccessTokenTTL_Call {
299 _c.Call.Return(duration)
300 return _c
301}
302
303func (_c *MockAuthService_GetAccessTokenTTL_Call) RunAndReturn(run func() time.Duration) *MockAuthService_GetAccessTokenTTL_Call {
304 _c.Call.Return(run)
305 return _c
306}
307
308// GetAuthStatus provides a mock function for the type MockAuthService
309func (_mock *MockAuthService) GetAuthStatus(ctx context.Context) (*domain.AuthStatus, error) {
310 ret := _mock.Called(ctx)
311
312 if len(ret) == 0 {
313 panic("no return value specified for GetAuthStatus")
314 }
315
316 var r0 *domain.AuthStatus
317 var r1 error
318 if returnFunc, ok := ret.Get(0).(func(context.Context) (*domain.AuthStatus, error)); ok {
319 return returnFunc(ctx)
320 }
321 if returnFunc, ok := ret.Get(0).(func(context.Context) *domain.AuthStatus); ok {
322 r0 = returnFunc(ctx)
323 } else {
324 if ret.Get(0) != nil {
325 r0 = ret.Get(0).(*domain.AuthStatus)
326 }
327 }
328 if returnFunc, ok := ret.Get(1).(func(context.Context) error); ok {
329 r1 = returnFunc(ctx)
330 } else {
331 r1 = ret.Error(1)
332 }
333 return r0, r1
334}
335
336// MockAuthService_GetAuthStatus_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'GetAuthStatus'
337type MockAuthService_GetAuthStatus_Call struct {
338 *mock.Call
339}
340
341// GetAuthStatus is a helper method to define mock.On call
342// - ctx context.Context
343func (_e *MockAuthService_Expecter) GetAuthStatus(ctx interface{}) *MockAuthService_GetAuthStatus_Call {
344 return &MockAuthService_GetAuthStatus_Call{Call: _e.mock.On("GetAuthStatus", ctx)}
345}
346
347func (_c *MockAuthService_GetAuthStatus_Call) Run(run func(ctx context.Context)) *MockAuthService_GetAuthStatus_Call {
348 _c.Call.Run(func(args mock.Arguments) {
349 var arg0 context.Context
350 if args[0] != nil {
351 arg0 = args[0].(context.Context)
352 }
353 run(
354 arg0,
355 )
356 })
357 return _c
358}
359
360func (_c *MockAuthService_GetAuthStatus_Call) Return(authStatus *domain.AuthStatus, err error) *MockAuthService_GetAuthStatus_Call {
361 _c.Call.Return(authStatus, err)
362 return _c
363}
364
365func (_c *MockAuthService_GetAuthStatus_Call) RunAndReturn(run func(ctx context.Context) (*domain.AuthStatus, error)) *MockAuthService_GetAuthStatus_Call {
366 _c.Call.Return(run)
367 return _c
368}
369
370// GetAuthType provides a mock function for the type MockAuthService
371func (_mock *MockAuthService) GetAuthType() domain.AuthType {
372 ret := _mock.Called()
373
374 if len(ret) == 0 {
375 panic("no return value specified for GetAuthType")
376 }
377
378 var r0 domain.AuthType
379 if returnFunc, ok := ret.Get(0).(func() domain.AuthType); ok {
380 r0 = returnFunc()
381 } else {
382 r0 = ret.Get(0).(domain.AuthType)
383 }
384 return r0
385}
386
387// MockAuthService_GetAuthType_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'GetAuthType'
388type MockAuthService_GetAuthType_Call struct {
389 *mock.Call
390}
391
392// GetAuthType is a helper method to define mock.On call
393func (_e *MockAuthService_Expecter) GetAuthType() *MockAuthService_GetAuthType_Call {
394 return &MockAuthService_GetAuthType_Call{Call: _e.mock.On("GetAuthType")}
395}
396
397func (_c *MockAuthService_GetAuthType_Call) Run(run func()) *MockAuthService_GetAuthType_Call {
398 _c.Call.Run(func(args mock.Arguments) {
399 run()
400 })
401 return _c
402}
403
404func (_c *MockAuthService_GetAuthType_Call) Return(authType domain.AuthType) *MockAuthService_GetAuthType_Call {
405 _c.Call.Return(authType)
406 return _c
407}
408
409func (_c *MockAuthService_GetAuthType_Call) RunAndReturn(run func() domain.AuthType) *MockAuthService_GetAuthType_Call {
410 _c.Call.Return(run)
411 return _c
412}
413
414// IsEnabled provides a mock function for the type MockAuthService
415func (_mock *MockAuthService) IsEnabled() bool {
416 ret := _mock.Called()
417
418 if len(ret) == 0 {
419 panic("no return value specified for IsEnabled")
420 }
421
422 var r0 bool
423 if returnFunc, ok := ret.Get(0).(func() bool); ok {
424 r0 = returnFunc()
425 } else {
426 r0 = ret.Get(0).(bool)
427 }
428 return r0
429}
430
431// MockAuthService_IsEnabled_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'IsEnabled'
432type MockAuthService_IsEnabled_Call struct {
433 *mock.Call
434}
435
436// IsEnabled is a helper method to define mock.On call
437func (_e *MockAuthService_Expecter) IsEnabled() *MockAuthService_IsEnabled_Call {
438 return &MockAuthService_IsEnabled_Call{Call: _e.mock.On("IsEnabled")}
439}
440
441func (_c *MockAuthService_IsEnabled_Call) Run(run func()) *MockAuthService_IsEnabled_Call {
442 _c.Call.Run(func(args mock.Arguments) {
443 run()
444 })
445 return _c
446}
447
448func (_c *MockAuthService_IsEnabled_Call) Return(b bool) *MockAuthService_IsEnabled_Call {
449 _c.Call.Return(b)
450 return _c
451}
452
453func (_c *MockAuthService_IsEnabled_Call) RunAndReturn(run func() bool) *MockAuthService_IsEnabled_Call {
454 _c.Call.Return(run)
455 return _c
456}
457
458// ListTokens provides a mock function for the type MockAuthService
459func (_mock *MockAuthService) ListTokens(ctx context.Context) ([]domain.Token, error) {
460 ret := _mock.Called(ctx)
461
462 if len(ret) == 0 {
463 panic("no return value specified for ListTokens")
464 }
465
466 var r0 []domain.Token
467 var r1 error
468 if returnFunc, ok := ret.Get(0).(func(context.Context) ([]domain.Token, error)); ok {
469 return returnFunc(ctx)
470 }
471 if returnFunc, ok := ret.Get(0).(func(context.Context) []domain.Token); ok {
472 r0 = returnFunc(ctx)
473 } else {
474 if ret.Get(0) != nil {
475 r0 = ret.Get(0).([]domain.Token)
476 }
477 }
478 if returnFunc, ok := ret.Get(1).(func(context.Context) error); ok {
479 r1 = returnFunc(ctx)
480 } else {
481 r1 = ret.Error(1)
482 }
483 return r0, r1
484}
485
486// MockAuthService_ListTokens_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'ListTokens'
487type MockAuthService_ListTokens_Call struct {
488 *mock.Call
489}
490
491// ListTokens is a helper method to define mock.On call
492// - ctx context.Context
493func (_e *MockAuthService_Expecter) ListTokens(ctx interface{}) *MockAuthService_ListTokens_Call {
494 return &MockAuthService_ListTokens_Call{Call: _e.mock.On("ListTokens", ctx)}
495}
496
497func (_c *MockAuthService_ListTokens_Call) Run(run func(ctx context.Context)) *MockAuthService_ListTokens_Call {
498 _c.Call.Run(func(args mock.Arguments) {
499 var arg0 context.Context
500 if args[0] != nil {
501 arg0 = args[0].(context.Context)
502 }
503 run(
504 arg0,
505 )
506 })
507 return _c
508}
509
510func (_c *MockAuthService_ListTokens_Call) Return(tokens []domain.Token, err error) *MockAuthService_ListTokens_Call {
511 _c.Call.Return(tokens, err)
512 return _c
513}
514
515func (_c *MockAuthService_ListTokens_Call) RunAndReturn(run func(ctx context.Context) ([]domain.Token, error)) *MockAuthService_ListTokens_Call {
516 _c.Call.Return(run)
517 return _c
518}
519
520// RevokeAllTokens provides a mock function for the type MockAuthService
521func (_mock *MockAuthService) RevokeAllTokens(ctx context.Context) (int, error) {
522 ret := _mock.Called(ctx)
523
524 if len(ret) == 0 {
525 panic("no return value specified for RevokeAllTokens")
526 }
527
528 var r0 int
529 var r1 error
530 if returnFunc, ok := ret.Get(0).(func(context.Context) (int, error)); ok {
531 return returnFunc(ctx)
532 }
533 if returnFunc, ok := ret.Get(0).(func(context.Context) int); ok {
534 r0 = returnFunc(ctx)
535 } else {
536 r0 = ret.Get(0).(int)
537 }
538 if returnFunc, ok := ret.Get(1).(func(context.Context) error); ok {
539 r1 = returnFunc(ctx)
540 } else {
541 r1 = ret.Error(1)
542 }
543 return r0, r1
544}
545
546// MockAuthService_RevokeAllTokens_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'RevokeAllTokens'
547type MockAuthService_RevokeAllTokens_Call struct {
548 *mock.Call
549}
550
551// RevokeAllTokens is a helper method to define mock.On call
552// - ctx context.Context
553func (_e *MockAuthService_Expecter) RevokeAllTokens(ctx interface{}) *MockAuthService_RevokeAllTokens_Call {
554 return &MockAuthService_RevokeAllTokens_Call{Call: _e.mock.On("RevokeAllTokens", ctx)}
555}
556
557func (_c *MockAuthService_RevokeAllTokens_Call) Run(run func(ctx context.Context)) *MockAuthService_RevokeAllTokens_Call {
558 _c.Call.Run(func(args mock.Arguments) {
559 var arg0 context.Context
560 if args[0] != nil {
561 arg0 = args[0].(context.Context)
562 }
563 run(
564 arg0,
565 )
566 })
567 return _c
568}
569
570func (_c *MockAuthService_RevokeAllTokens_Call) Return(n int, err error) *MockAuthService_RevokeAllTokens_Call {
571 _c.Call.Return(n, err)
572 return _c
573}
574
575func (_c *MockAuthService_RevokeAllTokens_Call) RunAndReturn(run func(ctx context.Context) (int, error)) *MockAuthService_RevokeAllTokens_Call {
576 _c.Call.Return(run)
577 return _c
578}
579
580// RevokeToken provides a mock function for the type MockAuthService
581func (_mock *MockAuthService) RevokeToken(ctx context.Context, tokenID string) error {
582 ret := _mock.Called(ctx, tokenID)
583
584 if len(ret) == 0 {
585 panic("no return value specified for RevokeToken")
586 }
587
588 var r0 error
589 if returnFunc, ok := ret.Get(0).(func(context.Context, string) error); ok {
590 r0 = returnFunc(ctx, tokenID)
591 } else {
592 r0 = ret.Error(0)
593 }
594 return r0
595}
596
597// MockAuthService_RevokeToken_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'RevokeToken'
598type MockAuthService_RevokeToken_Call struct {
599 *mock.Call
600}
601
602// RevokeToken is a helper method to define mock.On call
603// - ctx context.Context
604// - tokenID string
605func (_e *MockAuthService_Expecter) RevokeToken(ctx interface{}, tokenID interface{}) *MockAuthService_RevokeToken_Call {
606 return &MockAuthService_RevokeToken_Call{Call: _e.mock.On("RevokeToken", ctx, tokenID)}
607}
608
609func (_c *MockAuthService_RevokeToken_Call) Run(run func(ctx context.Context, tokenID string)) *MockAuthService_RevokeToken_Call {
610 _c.Call.Run(func(args mock.Arguments) {
611 var arg0 context.Context
612 if args[0] != nil {
613 arg0 = args[0].(context.Context)
614 }
615 var arg1 string
616 if args[1] != nil {
617 arg1 = args[1].(string)
618 }
619 run(
620 arg0,
621 arg1,
622 )
623 })
624 return _c
625}
626
627func (_c *MockAuthService_RevokeToken_Call) Return(err error) *MockAuthService_RevokeToken_Call {
628 _c.Call.Return(err)
629 return _c
630}
631
632func (_c *MockAuthService_RevokeToken_Call) RunAndReturn(run func(ctx context.Context, tokenID string) error) *MockAuthService_RevokeToken_Call {
633 _c.Call.Return(run)
634 return _c
635}
636
637// ValidateToken provides a mock function for the type MockAuthService
638func (_mock *MockAuthService) ValidateToken(ctx context.Context, tokenString string) (*domain.TokenClaims, error) {
639 ret := _mock.Called(ctx, tokenString)
640
641 if len(ret) == 0 {
642 panic("no return value specified for ValidateToken")
643 }
644
645 var r0 *domain.TokenClaims
646 var r1 error
647 if returnFunc, ok := ret.Get(0).(func(context.Context, string) (*domain.TokenClaims, error)); ok {
648 return returnFunc(ctx, tokenString)
649 }
650 if returnFunc, ok := ret.Get(0).(func(context.Context, string) *domain.TokenClaims); ok {
651 r0 = returnFunc(ctx, tokenString)
652 } else {
653 if ret.Get(0) != nil {
654 r0 = ret.Get(0).(*domain.TokenClaims)
655 }
656 }
657 if returnFunc, ok := ret.Get(1).(func(context.Context, string) error); ok {
658 r1 = returnFunc(ctx, tokenString)
659 } else {
660 r1 = ret.Error(1)
661 }
662 return r0, r1
663}
664
665// MockAuthService_ValidateToken_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'ValidateToken'
666type MockAuthService_ValidateToken_Call struct {
667 *mock.Call
668}
669
670// ValidateToken is a helper method to define mock.On call
671// - ctx context.Context
672// - tokenString string
673func (_e *MockAuthService_Expecter) ValidateToken(ctx interface{}, tokenString interface{}) *MockAuthService_ValidateToken_Call {
674 return &MockAuthService_ValidateToken_Call{Call: _e.mock.On("ValidateToken", ctx, tokenString)}
675}
676
677func (_c *MockAuthService_ValidateToken_Call) Run(run func(ctx context.Context, tokenString string)) *MockAuthService_ValidateToken_Call {
678 _c.Call.Run(func(args mock.Arguments) {
679 var arg0 context.Context
680 if args[0] != nil {
681 arg0 = args[0].(context.Context)
682 }
683 var arg1 string
684 if args[1] != nil {
685 arg1 = args[1].(string)
686 }
687 run(
688 arg0,
689 arg1,
690 )
691 })
692 return _c
693}
694
695func (_c *MockAuthService_ValidateToken_Call) Return(tokenClaims *domain.TokenClaims, err error) *MockAuthService_ValidateToken_Call {
696 _c.Call.Return(tokenClaims, err)
697 return _c
698}
699
700func (_c *MockAuthService_ValidateToken_Call) RunAndReturn(run func(ctx context.Context, tokenString string) (*domain.TokenClaims, error)) *MockAuthService_ValidateToken_Call {
701 _c.Call.Return(run)
702 return _c
703}