v2.15.1 c808592

mock_auth_service.go RawHistoryFolder

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

Keyboard shortcuts

Single-key shortcuts are on. ctrl k and esc work whatever this says.

ctrl k :
go to a section, branch, tag, file or repository
?
this list
j k
move the row cursor down / up
enter
open the row under the cursor; on Files, a directory opens or closes in place
↑ ↓ ← → home end
in the file tree (focus on a row): previous / next row, close / open a directory or go to its parent / first entry, first / last row. They never open a file
l h
on Files: open a directory or a file / close a directory or go up to its parent, then to the parent page. Elsewhere: into the side panel (on a merge request, its files) / back to the content; there j k move between its controls
g g G
first / last row
/
filter the list; on Files, find a file anywhere in the repository (esc clears, enter opens the best match)
b
switch branch or tag
g s g f g c g b g m g i g r g a
tabs: summary, files, commits, branches & tags, merge requests, issues, releases, actions (when available)
g h
home
w
wide mode: use the whole width of the screen, or not (remembered)
y
copy a permalink pinned to the commit
d u x
diff: split / unified / collapse or expand all
e E
diff: the whole file in view / every file, with the lines the hunks hide
n
merge request: next note in the diff
esc
close a dialog, leave a field

Branches 7

Tags 106

↑↓ moveenter openesc close