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