chore(mocks): regenerate mocks with mockery
- commit
- c84a77adbc15c2ae73cb859af8e7c1f4dd03a6a7
- author
- bnema · · 2026-02-25 01:27 UTC
- parent
- 56e2d9e
- signature
- unsigned
3 files · +104 -94
M internal/boundaries/in/mocks/mock_auth_service.go +66 -63
| @@ -39,6 +39,72 @@ func (_m *MockAuthService) EXPECT() *MockAuthService_Expecter { | |||
| 39 | 39 | return &MockAuthService_Expecter{mock: &_m.Mock} | |
| 40 | 40 | } | |
| 41 | 41 | ||
| 42 | + | // ExtendToken provides a mock function for the type MockAuthService | |
| 43 | + | func (_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' | |
| 69 | + | type 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 | |
| 76 | + | func (_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 | + | ||
| 80 | + | func (_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 | + | ||
| 98 | + | func (_c *MockAuthService_ExtendToken_Call) Return(s string, err error) *MockAuthService_ExtendToken_Call { | |
| 99 | + | _c.Call.Return(s, err) | |
| 100 | + | return _c | |
| 101 | + | } | |
| 102 | + | ||
| 103 | + | func (_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 | + | ||
| 42 | 108 | // GenerateAccessToken provides a mock function for the type MockAuthService | |
| 43 | 109 | func (_mock *MockAuthService) GenerateAccessToken(ctx context.Context, subject string, scopes []string, expiry time.Duration) (string, error) { | |
| 44 | 110 | ret := _mock.Called(ctx, subject, scopes, expiry) | |
| @@ -714,66 +780,3 @@ func (_c *MockAuthService_ValidateToken_Call) RunAndReturn(run func(ctx context. | |||
| 714 | 780 | _c.Call.Return(run) | |
| 715 | 781 | return _c | |
| 716 | 782 | } | |
| 717 | - | ||
| 718 | - | // ExtendToken provides a mock function for the type MockAuthService | |
| 719 | - | func (_mock *MockAuthService) ExtendToken(ctx context.Context, tokenString string) (string, error) { | |
| 720 | - | ret := _mock.Called(ctx, tokenString) | |
| 721 | - | ||
| 722 | - | if len(ret) == 0 { | |
| 723 | - | panic("no return value specified for ExtendToken") | |
| 724 | - | } | |
| 725 | - | ||
| 726 | - | var r0 string | |
| 727 | - | var r1 error | |
| 728 | - | if returnFunc, ok := ret.Get(0).(func(context.Context, string) (string, error)); ok { | |
| 729 | - | return returnFunc(ctx, tokenString) | |
| 730 | - | } | |
| 731 | - | if returnFunc, ok := ret.Get(0).(func(context.Context, string) string); ok { | |
| 732 | - | r0 = returnFunc(ctx, tokenString) | |
| 733 | - | } else { | |
| 734 | - | r0 = ret.Get(0).(string) | |
| 735 | - | } | |
| 736 | - | if returnFunc, ok := ret.Get(1).(func(context.Context, string) error); ok { | |
| 737 | - | r1 = returnFunc(ctx, tokenString) | |
| 738 | - | } else { | |
| 739 | - | r1 = ret.Error(1) | |
| 740 | - | } | |
| 741 | - | return r0, r1 | |
| 742 | - | } | |
| 743 | - | ||
| 744 | - | // MockAuthService_ExtendToken_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'ExtendToken' | |
| 745 | - | type MockAuthService_ExtendToken_Call struct { | |
| 746 | - | *mock.Call | |
| 747 | - | } | |
| 748 | - | ||
| 749 | - | // ExtendToken is a helper method to define mock.On call | |
| 750 | - | // - ctx context.Context | |
| 751 | - | // - tokenString string | |
| 752 | - | func (_e *MockAuthService_Expecter) ExtendToken(ctx interface{}, tokenString interface{}) *MockAuthService_ExtendToken_Call { | |
| 753 | - | return &MockAuthService_ExtendToken_Call{Call: _e.mock.On("ExtendToken", ctx, tokenString)} | |
| 754 | - | } | |
| 755 | - | ||
| 756 | - | func (_c *MockAuthService_ExtendToken_Call) Run(run func(ctx context.Context, tokenString string)) *MockAuthService_ExtendToken_Call { | |
| 757 | - | _c.Call.Run(func(args mock.Arguments) { | |
| 758 | - | var arg0 context.Context | |
| 759 | - | if args[0] != nil { | |
| 760 | - | arg0 = args[0].(context.Context) | |
| 761 | - | } | |
| 762 | - | var arg1 string | |
| 763 | - | if args[1] != nil { | |
| 764 | - | arg1 = args[1].(string) | |
| 765 | - | } | |
| 766 | - | run(arg0, arg1) | |
| 767 | - | }) | |
| 768 | - | return _c | |
| 769 | - | } | |
| 770 | - | ||
| 771 | - | func (_c *MockAuthService_ExtendToken_Call) Return(s string, err error) *MockAuthService_ExtendToken_Call { | |
| 772 | - | _c.Call.Return(s, err) | |
| 773 | - | return _c | |
| 774 | - | } | |
| 775 | - | ||
| 776 | - | func (_c *MockAuthService_ExtendToken_Call) RunAndReturn(run func(ctx context.Context, tokenString string) (string, error)) *MockAuthService_ExtendToken_Call { | |
| 777 | - | _c.Call.Return(run) | |
| 778 | - | return _c | |
| 779 | - | } | |
| @@ -39,6 +39,72 @@ func (_m *MockAuthService) EXPECT() *MockAuthService_Expecter { | |||||
| 39 | return &MockAuthService_Expecter{mock: &_m.Mock} | 39 | return &MockAuthService_Expecter{mock: &_m.Mock} | ||
| 40 | } | 40 | } | ||
| 41 | 41 | ||||
| 42 | + | // ExtendToken provides a mock function for the type MockAuthService | |||
| 43 | + | func (_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' | |||
| 69 | + | type 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 | |||
| 76 | + | func (_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 | + | ||||
| 80 | + | func (_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 | + | ||||
| 98 | + | func (_c *MockAuthService_ExtendToken_Call) Return(s string, err error) *MockAuthService_ExtendToken_Call { | |||
| 99 | + | _c.Call.Return(s, err) | |||
| 100 | + | return _c | |||
| 101 | + | } | |||
| 102 | + | ||||
| 103 | + | func (_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 | + | ||||
| 42 | // GenerateAccessToken provides a mock function for the type MockAuthService | 108 | // GenerateAccessToken provides a mock function for the type MockAuthService | ||
| 43 | func (_mock *MockAuthService) GenerateAccessToken(ctx context.Context, subject string, scopes []string, expiry time.Duration) (string, error) { | 109 | func (_mock *MockAuthService) GenerateAccessToken(ctx context.Context, subject string, scopes []string, expiry time.Duration) (string, error) { | ||
| 44 | ret := _mock.Called(ctx, subject, scopes, expiry) | 110 | ret := _mock.Called(ctx, subject, scopes, expiry) | ||
| @@ -714,66 +780,3 @@ func (_c *MockAuthService_ValidateToken_Call) RunAndReturn(run func(ctx context. | |||||
| 714 | _c.Call.Return(run) | 780 | _c.Call.Return(run) | ||
| 715 | return _c | 781 | return _c | ||
| 716 | } | 782 | } | ||
| 717 | - | ||||
| 718 | - | // ExtendToken provides a mock function for the type MockAuthService | |||
| 719 | - | func (_mock *MockAuthService) ExtendToken(ctx context.Context, tokenString string) (string, error) { | |||
| 720 | - | ret := _mock.Called(ctx, tokenString) | |||
| 721 | - | ||||
| 722 | - | if len(ret) == 0 { | |||
| 723 | - | panic("no return value specified for ExtendToken") | |||
| 724 | - | } | |||
| 725 | - | ||||
| 726 | - | var r0 string | |||
| 727 | - | var r1 error | |||
| 728 | - | if returnFunc, ok := ret.Get(0).(func(context.Context, string) (string, error)); ok { | |||
| 729 | - | return returnFunc(ctx, tokenString) | |||
| 730 | - | } | |||
| 731 | - | if returnFunc, ok := ret.Get(0).(func(context.Context, string) string); ok { | |||
| 732 | - | r0 = returnFunc(ctx, tokenString) | |||
| 733 | - | } else { | |||
| 734 | - | r0 = ret.Get(0).(string) | |||
| 735 | - | } | |||
| 736 | - | if returnFunc, ok := ret.Get(1).(func(context.Context, string) error); ok { | |||
| 737 | - | r1 = returnFunc(ctx, tokenString) | |||
| 738 | - | } else { | |||
| 739 | - | r1 = ret.Error(1) | |||
| 740 | - | } | |||
| 741 | - | return r0, r1 | |||
| 742 | - | } | |||
| 743 | - | ||||
| 744 | - | // MockAuthService_ExtendToken_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'ExtendToken' | |||
| 745 | - | type MockAuthService_ExtendToken_Call struct { | |||
| 746 | - | *mock.Call | |||
| 747 | - | } | |||
| 748 | - | ||||
| 749 | - | // ExtendToken is a helper method to define mock.On call | |||
| 750 | - | // - ctx context.Context | |||
| 751 | - | // - tokenString string | |||
| 752 | - | func (_e *MockAuthService_Expecter) ExtendToken(ctx interface{}, tokenString interface{}) *MockAuthService_ExtendToken_Call { | |||
| 753 | - | return &MockAuthService_ExtendToken_Call{Call: _e.mock.On("ExtendToken", ctx, tokenString)} | |||
| 754 | - | } | |||
| 755 | - | ||||
| 756 | - | func (_c *MockAuthService_ExtendToken_Call) Run(run func(ctx context.Context, tokenString string)) *MockAuthService_ExtendToken_Call { | |||
| 757 | - | _c.Call.Run(func(args mock.Arguments) { | |||
| 758 | - | var arg0 context.Context | |||
| 759 | - | if args[0] != nil { | |||
| 760 | - | arg0 = args[0].(context.Context) | |||
| 761 | - | } | |||
| 762 | - | var arg1 string | |||
| 763 | - | if args[1] != nil { | |||
| 764 | - | arg1 = args[1].(string) | |||
| 765 | - | } | |||
| 766 | - | run(arg0, arg1) | |||
| 767 | - | }) | |||
| 768 | - | return _c | |||
| 769 | - | } | |||
| 770 | - | ||||
| 771 | - | func (_c *MockAuthService_ExtendToken_Call) Return(s string, err error) *MockAuthService_ExtendToken_Call { | |||
| 772 | - | _c.Call.Return(s, err) | |||
| 773 | - | return _c | |||
| 774 | - | } | |||
| 775 | - | ||||
| 776 | - | func (_c *MockAuthService_ExtendToken_Call) RunAndReturn(run func(ctx context.Context, tokenString string) (string, error)) *MockAuthService_ExtendToken_Call { | |||
| 777 | - | _c.Call.Return(run) | |||
| 778 | - | return _c | |||
| 779 | - | } | |||
M internal/boundaries/in/mocks/mock_container_service.go +5 -2
| @@ -799,6 +799,7 @@ func (_c *MockContainerService_SyncContainers_Call) RunAndReturn(run func(ctx co | |||
| 799 | 799 | // UpdateAttachments provides a mock function for the type MockContainerService | |
| 800 | 800 | func (_mock *MockContainerService) UpdateAttachments(attachments map[string][]string) { | |
| 801 | 801 | _mock.Called(attachments) | |
| 802 | + | return | |
| 802 | 803 | } | |
| 803 | 804 | ||
| 804 | 805 | // MockContainerService_UpdateAttachments_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'UpdateAttachments' | |
| @@ -818,7 +819,9 @@ func (_c *MockContainerService_UpdateAttachments_Call) Run(run func(attachments | |||
| 818 | 819 | if args[0] != nil { | |
| 819 | 820 | arg0 = args[0].(map[string][]string) | |
| 820 | 821 | } | |
| 821 | - | run(arg0) | |
| 822 | + | run( | |
| 823 | + | arg0, | |
| 824 | + | ) | |
| 822 | 825 | }) | |
| 823 | 826 | return _c | |
| 824 | 827 | } | |
| @@ -829,6 +832,6 @@ func (_c *MockContainerService_UpdateAttachments_Call) Return() *MockContainerSe | |||
| 829 | 832 | } | |
| 830 | 833 | ||
| 831 | 834 | func (_c *MockContainerService_UpdateAttachments_Call) RunAndReturn(run func(attachments map[string][]string)) *MockContainerService_UpdateAttachments_Call { | |
| 832 | - | _c.Call.Return(run) | |
| 835 | + | _c.Run(run) | |
| 833 | 836 | return _c | |
| 834 | 837 | } | |
| @@ -799,6 +799,7 @@ func (_c *MockContainerService_SyncContainers_Call) RunAndReturn(run func(ctx co | |||||
| 799 | // UpdateAttachments provides a mock function for the type MockContainerService | 799 | // UpdateAttachments provides a mock function for the type MockContainerService | ||
| 800 | func (_mock *MockContainerService) UpdateAttachments(attachments map[string][]string) { | 800 | func (_mock *MockContainerService) UpdateAttachments(attachments map[string][]string) { | ||
| 801 | _mock.Called(attachments) | 801 | _mock.Called(attachments) | ||
| 802 | + | return | |||
| 802 | } | 803 | } | ||
| 803 | 804 | ||||
| 804 | // MockContainerService_UpdateAttachments_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'UpdateAttachments' | 805 | // MockContainerService_UpdateAttachments_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'UpdateAttachments' | ||
| @@ -818,7 +819,9 @@ func (_c *MockContainerService_UpdateAttachments_Call) Run(run func(attachments | |||||
| 818 | if args[0] != nil { | 819 | if args[0] != nil { | ||
| 819 | arg0 = args[0].(map[string][]string) | 820 | arg0 = args[0].(map[string][]string) | ||
| 820 | } | 821 | } | ||
| 821 | - | run(arg0) | 822 | + | run( |
| 823 | + | arg0, | |||
| 824 | + | ) | |||
| 822 | }) | 825 | }) | ||
| 823 | return _c | 826 | return _c | ||
| 824 | } | 827 | } | ||
| @@ -829,6 +832,6 @@ func (_c *MockContainerService_UpdateAttachments_Call) Return() *MockContainerSe | |||||
| 829 | } | 832 | } | ||
| 830 | 833 | ||||
| 831 | func (_c *MockContainerService_UpdateAttachments_Call) RunAndReturn(run func(attachments map[string][]string)) *MockContainerService_UpdateAttachments_Call { | 834 | func (_c *MockContainerService_UpdateAttachments_Call) RunAndReturn(run func(attachments map[string][]string)) *MockContainerService_UpdateAttachments_Call { | ||
| 832 | - | _c.Call.Return(run) | 835 | + | _c.Run(run) |
| 833 | return _c | 836 | return _c | ||
| 834 | } | 837 | } | ||
M internal/boundaries/out/mocks/mock_token_store.go +33 -29
| @@ -354,37 +354,37 @@ func (_c *MockTokenStore_Revoke_Call) RunAndReturn(run func(ctx context.Context, | |||
| 354 | 354 | return _c | |
| 355 | 355 | } | |
| 356 | 356 | ||
| 357 | - | // UpdateTokenExpiry provides a mock function for the type MockTokenStore | |
| 358 | - | func (_mock *MockTokenStore) UpdateTokenExpiry(ctx context.Context, token *domain.Token, newJWT string) error { | |
| 359 | - | ret := _mock.Called(ctx, token, newJWT) | |
| 357 | + | // SaveToken provides a mock function for the type MockTokenStore | |
| 358 | + | func (_mock *MockTokenStore) SaveToken(ctx context.Context, token *domain.Token, jwt string) error { | |
| 359 | + | ret := _mock.Called(ctx, token, jwt) | |
| 360 | 360 | ||
| 361 | 361 | if len(ret) == 0 { | |
| 362 | - | panic("no return value specified for UpdateTokenExpiry") | |
| 362 | + | panic("no return value specified for SaveToken") | |
| 363 | 363 | } | |
| 364 | 364 | ||
| 365 | 365 | var r0 error | |
| 366 | 366 | if returnFunc, ok := ret.Get(0).(func(context.Context, *domain.Token, string) error); ok { | |
| 367 | - | r0 = returnFunc(ctx, token, newJWT) | |
| 367 | + | r0 = returnFunc(ctx, token, jwt) | |
| 368 | 368 | } else { | |
| 369 | 369 | r0 = ret.Error(0) | |
| 370 | 370 | } | |
| 371 | 371 | return r0 | |
| 372 | 372 | } | |
| 373 | 373 | ||
| 374 | - | // MockTokenStore_UpdateTokenExpiry_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'UpdateTokenExpiry' | |
| 375 | - | type MockTokenStore_UpdateTokenExpiry_Call struct { | |
| 374 | + | // MockTokenStore_SaveToken_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'SaveToken' | |
| 375 | + | type MockTokenStore_SaveToken_Call struct { | |
| 376 | 376 | *mock.Call | |
| 377 | 377 | } | |
| 378 | 378 | ||
| 379 | - | // UpdateTokenExpiry is a helper method to define mock.On call | |
| 379 | + | // SaveToken is a helper method to define mock.On call | |
| 380 | 380 | // - ctx context.Context | |
| 381 | 381 | // - token *domain.Token | |
| 382 | - | // - newJWT string | |
| 383 | - | func (_e *MockTokenStore_Expecter) UpdateTokenExpiry(ctx interface{}, token interface{}, newJWT interface{}) *MockTokenStore_UpdateTokenExpiry_Call { | |
| 384 | - | return &MockTokenStore_UpdateTokenExpiry_Call{Call: _e.mock.On("UpdateTokenExpiry", ctx, token, newJWT)} | |
| 382 | + | // - jwt string | |
| 383 | + | func (_e *MockTokenStore_Expecter) SaveToken(ctx interface{}, token interface{}, jwt interface{}) *MockTokenStore_SaveToken_Call { | |
| 384 | + | return &MockTokenStore_SaveToken_Call{Call: _e.mock.On("SaveToken", ctx, token, jwt)} | |
| 385 | 385 | } | |
| 386 | 386 | ||
| 387 | - | func (_c *MockTokenStore_UpdateTokenExpiry_Call) Run(run func(ctx context.Context, token *domain.Token, newJWT string)) *MockTokenStore_UpdateTokenExpiry_Call { | |
| 387 | + | func (_c *MockTokenStore_SaveToken_Call) Run(run func(ctx context.Context, token *domain.Token, jwt string)) *MockTokenStore_SaveToken_Call { | |
| 388 | 388 | _c.Call.Run(func(args mock.Arguments) { | |
| 389 | 389 | var arg0 context.Context | |
| 390 | 390 | if args[0] != nil { | |
| @@ -398,52 +398,56 @@ func (_c *MockTokenStore_UpdateTokenExpiry_Call) Run(run func(ctx context.Contex | |||
| 398 | 398 | if args[2] != nil { | |
| 399 | 399 | arg2 = args[2].(string) | |
| 400 | 400 | } | |
| 401 | - | run(arg0, arg1, arg2) | |
| 401 | + | run( | |
| 402 | + | arg0, | |
| 403 | + | arg1, | |
| 404 | + | arg2, | |
| 405 | + | ) | |
| 402 | 406 | }) | |
| 403 | 407 | return _c | |
| 404 | 408 | } | |
| 405 | 409 | ||
| 406 | - | func (_c *MockTokenStore_UpdateTokenExpiry_Call) Return(err error) *MockTokenStore_UpdateTokenExpiry_Call { | |
| 410 | + | func (_c *MockTokenStore_SaveToken_Call) Return(err error) *MockTokenStore_SaveToken_Call { | |
| 407 | 411 | _c.Call.Return(err) | |
| 408 | 412 | return _c | |
| 409 | 413 | } | |
| 410 | 414 | ||
| 411 | - | func (_c *MockTokenStore_UpdateTokenExpiry_Call) RunAndReturn(run func(ctx context.Context, token *domain.Token, newJWT string) error) *MockTokenStore_UpdateTokenExpiry_Call { | |
| 415 | + | func (_c *MockTokenStore_SaveToken_Call) RunAndReturn(run func(ctx context.Context, token *domain.Token, jwt string) error) *MockTokenStore_SaveToken_Call { | |
| 412 | 416 | _c.Call.Return(run) | |
| 413 | 417 | return _c | |
| 414 | 418 | } | |
| 415 | 419 | ||
| 416 | - | // SaveToken provides a mock function for the type MockTokenStore | |
| 417 | - | func (_mock *MockTokenStore) SaveToken(ctx context.Context, token *domain.Token, jwt string) error { | |
| 418 | - | ret := _mock.Called(ctx, token, jwt) | |
| 420 | + | // UpdateTokenExpiry provides a mock function for the type MockTokenStore | |
| 421 | + | func (_mock *MockTokenStore) UpdateTokenExpiry(ctx context.Context, token *domain.Token, newJWT string) error { | |
| 422 | + | ret := _mock.Called(ctx, token, newJWT) | |
| 419 | 423 | ||
| 420 | 424 | if len(ret) == 0 { | |
| 421 | - | panic("no return value specified for SaveToken") | |
| 425 | + | panic("no return value specified for UpdateTokenExpiry") | |
| 422 | 426 | } | |
| 423 | 427 | ||
| 424 | 428 | var r0 error | |
| 425 | 429 | if returnFunc, ok := ret.Get(0).(func(context.Context, *domain.Token, string) error); ok { | |
| 426 | - | r0 = returnFunc(ctx, token, jwt) | |
| 430 | + | r0 = returnFunc(ctx, token, newJWT) | |
| 427 | 431 | } else { | |
| 428 | 432 | r0 = ret.Error(0) | |
| 429 | 433 | } | |
| 430 | 434 | return r0 | |
| 431 | 435 | } | |
| 432 | 436 | ||
| 433 | - | // MockTokenStore_SaveToken_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'SaveToken' | |
| 434 | - | type MockTokenStore_SaveToken_Call struct { | |
| 437 | + | // MockTokenStore_UpdateTokenExpiry_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'UpdateTokenExpiry' | |
| 438 | + | type MockTokenStore_UpdateTokenExpiry_Call struct { | |
| 435 | 439 | *mock.Call | |
| 436 | 440 | } | |
| 437 | 441 | ||
| 438 | - | // SaveToken is a helper method to define mock.On call | |
| 442 | + | // UpdateTokenExpiry is a helper method to define mock.On call | |
| 439 | 443 | // - ctx context.Context | |
| 440 | 444 | // - token *domain.Token | |
| 441 | - | // - jwt string | |
| 442 | - | func (_e *MockTokenStore_Expecter) SaveToken(ctx interface{}, token interface{}, jwt interface{}) *MockTokenStore_SaveToken_Call { | |
| 443 | - | return &MockTokenStore_SaveToken_Call{Call: _e.mock.On("SaveToken", ctx, token, jwt)} | |
| 445 | + | // - newJWT string | |
| 446 | + | func (_e *MockTokenStore_Expecter) UpdateTokenExpiry(ctx interface{}, token interface{}, newJWT interface{}) *MockTokenStore_UpdateTokenExpiry_Call { | |
| 447 | + | return &MockTokenStore_UpdateTokenExpiry_Call{Call: _e.mock.On("UpdateTokenExpiry", ctx, token, newJWT)} | |
| 444 | 448 | } | |
| 445 | 449 | ||
| 446 | - | func (_c *MockTokenStore_SaveToken_Call) Run(run func(ctx context.Context, token *domain.Token, jwt string)) *MockTokenStore_SaveToken_Call { | |
| 450 | + | func (_c *MockTokenStore_UpdateTokenExpiry_Call) Run(run func(ctx context.Context, token *domain.Token, newJWT string)) *MockTokenStore_UpdateTokenExpiry_Call { | |
| 447 | 451 | _c.Call.Run(func(args mock.Arguments) { | |
| 448 | 452 | var arg0 context.Context | |
| 449 | 453 | if args[0] != nil { | |
| @@ -466,12 +470,12 @@ func (_c *MockTokenStore_SaveToken_Call) Run(run func(ctx context.Context, token | |||
| 466 | 470 | return _c | |
| 467 | 471 | } | |
| 468 | 472 | ||
| 469 | - | func (_c *MockTokenStore_SaveToken_Call) Return(err error) *MockTokenStore_SaveToken_Call { | |
| 473 | + | func (_c *MockTokenStore_UpdateTokenExpiry_Call) Return(err error) *MockTokenStore_UpdateTokenExpiry_Call { | |
| 470 | 474 | _c.Call.Return(err) | |
| 471 | 475 | return _c | |
| 472 | 476 | } | |
| 473 | 477 | ||
| 474 | - | func (_c *MockTokenStore_SaveToken_Call) RunAndReturn(run func(ctx context.Context, token *domain.Token, jwt string) error) *MockTokenStore_SaveToken_Call { | |
| 478 | + | func (_c *MockTokenStore_UpdateTokenExpiry_Call) RunAndReturn(run func(ctx context.Context, token *domain.Token, newJWT string) error) *MockTokenStore_UpdateTokenExpiry_Call { | |
| 475 | 479 | _c.Call.Return(run) | |
| 476 | 480 | return _c | |
| 477 | 481 | } | |
| @@ -354,37 +354,37 @@ func (_c *MockTokenStore_Revoke_Call) RunAndReturn(run func(ctx context.Context, | |||||
| 354 | return _c | 354 | return _c | ||
| 355 | } | 355 | } | ||
| 356 | 356 | ||||
| 357 | - | // UpdateTokenExpiry provides a mock function for the type MockTokenStore | 357 | + | // SaveToken provides a mock function for the type MockTokenStore |
| 358 | - | func (_mock *MockTokenStore) UpdateTokenExpiry(ctx context.Context, token *domain.Token, newJWT string) error { | 358 | + | func (_mock *MockTokenStore) SaveToken(ctx context.Context, token *domain.Token, jwt string) error { |
| 359 | - | ret := _mock.Called(ctx, token, newJWT) | 359 | + | ret := _mock.Called(ctx, token, jwt) |
| 360 | 360 | ||||
| 361 | if len(ret) == 0 { | 361 | if len(ret) == 0 { | ||
| 362 | - | panic("no return value specified for UpdateTokenExpiry") | 362 | + | panic("no return value specified for SaveToken") |
| 363 | } | 363 | } | ||
| 364 | 364 | ||||
| 365 | var r0 error | 365 | var r0 error | ||
| 366 | if returnFunc, ok := ret.Get(0).(func(context.Context, *domain.Token, string) error); ok { | 366 | if returnFunc, ok := ret.Get(0).(func(context.Context, *domain.Token, string) error); ok { | ||
| 367 | - | r0 = returnFunc(ctx, token, newJWT) | 367 | + | r0 = returnFunc(ctx, token, jwt) |
| 368 | } else { | 368 | } else { | ||
| 369 | r0 = ret.Error(0) | 369 | r0 = ret.Error(0) | ||
| 370 | } | 370 | } | ||
| 371 | return r0 | 371 | return r0 | ||
| 372 | } | 372 | } | ||
| 373 | 373 | ||||
| 374 | - | // MockTokenStore_UpdateTokenExpiry_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'UpdateTokenExpiry' | 374 | + | // MockTokenStore_SaveToken_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'SaveToken' |
| 375 | - | type MockTokenStore_UpdateTokenExpiry_Call struct { | 375 | + | type MockTokenStore_SaveToken_Call struct { |
| 376 | *mock.Call | 376 | *mock.Call | ||
| 377 | } | 377 | } | ||
| 378 | 378 | ||||
| 379 | - | // UpdateTokenExpiry is a helper method to define mock.On call | 379 | + | // SaveToken is a helper method to define mock.On call |
| 380 | // - ctx context.Context | 380 | // - ctx context.Context | ||
| 381 | // - token *domain.Token | 381 | // - token *domain.Token | ||
| 382 | - | // - newJWT string | 382 | + | // - jwt string |
| 383 | - | func (_e *MockTokenStore_Expecter) UpdateTokenExpiry(ctx interface{}, token interface{}, newJWT interface{}) *MockTokenStore_UpdateTokenExpiry_Call { | 383 | + | func (_e *MockTokenStore_Expecter) SaveToken(ctx interface{}, token interface{}, jwt interface{}) *MockTokenStore_SaveToken_Call { |
| 384 | - | return &MockTokenStore_UpdateTokenExpiry_Call{Call: _e.mock.On("UpdateTokenExpiry", ctx, token, newJWT)} | 384 | + | return &MockTokenStore_SaveToken_Call{Call: _e.mock.On("SaveToken", ctx, token, jwt)} |
| 385 | } | 385 | } | ||
| 386 | 386 | ||||
| 387 | - | func (_c *MockTokenStore_UpdateTokenExpiry_Call) Run(run func(ctx context.Context, token *domain.Token, newJWT string)) *MockTokenStore_UpdateTokenExpiry_Call { | 387 | + | func (_c *MockTokenStore_SaveToken_Call) Run(run func(ctx context.Context, token *domain.Token, jwt string)) *MockTokenStore_SaveToken_Call { |
| 388 | _c.Call.Run(func(args mock.Arguments) { | 388 | _c.Call.Run(func(args mock.Arguments) { | ||
| 389 | var arg0 context.Context | 389 | var arg0 context.Context | ||
| 390 | if args[0] != nil { | 390 | if args[0] != nil { | ||
| @@ -398,52 +398,56 @@ func (_c *MockTokenStore_UpdateTokenExpiry_Call) Run(run func(ctx context.Contex | |||||
| 398 | if args[2] != nil { | 398 | if args[2] != nil { | ||
| 399 | arg2 = args[2].(string) | 399 | arg2 = args[2].(string) | ||
| 400 | } | 400 | } | ||
| 401 | - | run(arg0, arg1, arg2) | 401 | + | run( |
| 402 | + | arg0, | |||
| 403 | + | arg1, | |||
| 404 | + | arg2, | |||
| 405 | + | ) | |||
| 402 | }) | 406 | }) | ||
| 403 | return _c | 407 | return _c | ||
| 404 | } | 408 | } | ||
| 405 | 409 | ||||
| 406 | - | func (_c *MockTokenStore_UpdateTokenExpiry_Call) Return(err error) *MockTokenStore_UpdateTokenExpiry_Call { | 410 | + | func (_c *MockTokenStore_SaveToken_Call) Return(err error) *MockTokenStore_SaveToken_Call { |
| 407 | _c.Call.Return(err) | 411 | _c.Call.Return(err) | ||
| 408 | return _c | 412 | return _c | ||
| 409 | } | 413 | } | ||
| 410 | 414 | ||||
| 411 | - | func (_c *MockTokenStore_UpdateTokenExpiry_Call) RunAndReturn(run func(ctx context.Context, token *domain.Token, newJWT string) error) *MockTokenStore_UpdateTokenExpiry_Call { | 415 | + | func (_c *MockTokenStore_SaveToken_Call) RunAndReturn(run func(ctx context.Context, token *domain.Token, jwt string) error) *MockTokenStore_SaveToken_Call { |
| 412 | _c.Call.Return(run) | 416 | _c.Call.Return(run) | ||
| 413 | return _c | 417 | return _c | ||
| 414 | } | 418 | } | ||
| 415 | 419 | ||||
| 416 | - | // SaveToken provides a mock function for the type MockTokenStore | 420 | + | // UpdateTokenExpiry provides a mock function for the type MockTokenStore |
| 417 | - | func (_mock *MockTokenStore) SaveToken(ctx context.Context, token *domain.Token, jwt string) error { | 421 | + | func (_mock *MockTokenStore) UpdateTokenExpiry(ctx context.Context, token *domain.Token, newJWT string) error { |
| 418 | - | ret := _mock.Called(ctx, token, jwt) | 422 | + | ret := _mock.Called(ctx, token, newJWT) |
| 419 | 423 | ||||
| 420 | if len(ret) == 0 { | 424 | if len(ret) == 0 { | ||
| 421 | - | panic("no return value specified for SaveToken") | 425 | + | panic("no return value specified for UpdateTokenExpiry") |
| 422 | } | 426 | } | ||
| 423 | 427 | ||||
| 424 | var r0 error | 428 | var r0 error | ||
| 425 | if returnFunc, ok := ret.Get(0).(func(context.Context, *domain.Token, string) error); ok { | 429 | if returnFunc, ok := ret.Get(0).(func(context.Context, *domain.Token, string) error); ok { | ||
| 426 | - | r0 = returnFunc(ctx, token, jwt) | 430 | + | r0 = returnFunc(ctx, token, newJWT) |
| 427 | } else { | 431 | } else { | ||
| 428 | r0 = ret.Error(0) | 432 | r0 = ret.Error(0) | ||
| 429 | } | 433 | } | ||
| 430 | return r0 | 434 | return r0 | ||
| 431 | } | 435 | } | ||
| 432 | 436 | ||||
| 433 | - | // MockTokenStore_SaveToken_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'SaveToken' | 437 | + | // MockTokenStore_UpdateTokenExpiry_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'UpdateTokenExpiry' |
| 434 | - | type MockTokenStore_SaveToken_Call struct { | 438 | + | type MockTokenStore_UpdateTokenExpiry_Call struct { |
| 435 | *mock.Call | 439 | *mock.Call | ||
| 436 | } | 440 | } | ||
| 437 | 441 | ||||
| 438 | - | // SaveToken is a helper method to define mock.On call | 442 | + | // UpdateTokenExpiry is a helper method to define mock.On call |
| 439 | // - ctx context.Context | 443 | // - ctx context.Context | ||
| 440 | // - token *domain.Token | 444 | // - token *domain.Token | ||
| 441 | - | // - jwt string | 445 | + | // - newJWT string |
| 442 | - | func (_e *MockTokenStore_Expecter) SaveToken(ctx interface{}, token interface{}, jwt interface{}) *MockTokenStore_SaveToken_Call { | 446 | + | func (_e *MockTokenStore_Expecter) UpdateTokenExpiry(ctx interface{}, token interface{}, newJWT interface{}) *MockTokenStore_UpdateTokenExpiry_Call { |
| 443 | - | return &MockTokenStore_SaveToken_Call{Call: _e.mock.On("SaveToken", ctx, token, jwt)} | 447 | + | return &MockTokenStore_UpdateTokenExpiry_Call{Call: _e.mock.On("UpdateTokenExpiry", ctx, token, newJWT)} |
| 444 | } | 448 | } | ||
| 445 | 449 | ||||
| 446 | - | func (_c *MockTokenStore_SaveToken_Call) Run(run func(ctx context.Context, token *domain.Token, jwt string)) *MockTokenStore_SaveToken_Call { | 450 | + | func (_c *MockTokenStore_UpdateTokenExpiry_Call) Run(run func(ctx context.Context, token *domain.Token, newJWT string)) *MockTokenStore_UpdateTokenExpiry_Call { |
| 447 | _c.Call.Run(func(args mock.Arguments) { | 451 | _c.Call.Run(func(args mock.Arguments) { | ||
| 448 | var arg0 context.Context | 452 | var arg0 context.Context | ||
| 449 | if args[0] != nil { | 453 | if args[0] != nil { | ||
| @@ -466,12 +470,12 @@ func (_c *MockTokenStore_SaveToken_Call) Run(run func(ctx context.Context, token | |||||
| 466 | return _c | 470 | return _c | ||
| 467 | } | 471 | } | ||
| 468 | 472 | ||||
| 469 | - | func (_c *MockTokenStore_SaveToken_Call) Return(err error) *MockTokenStore_SaveToken_Call { | 473 | + | func (_c *MockTokenStore_UpdateTokenExpiry_Call) Return(err error) *MockTokenStore_UpdateTokenExpiry_Call { |
| 470 | _c.Call.Return(err) | 474 | _c.Call.Return(err) | ||
| 471 | return _c | 475 | return _c | ||
| 472 | } | 476 | } | ||
| 473 | 477 | ||||
| 474 | - | func (_c *MockTokenStore_SaveToken_Call) RunAndReturn(run func(ctx context.Context, token *domain.Token, jwt string) error) *MockTokenStore_SaveToken_Call { | 478 | + | func (_c *MockTokenStore_UpdateTokenExpiry_Call) RunAndReturn(run func(ctx context.Context, token *domain.Token, newJWT string) error) *MockTokenStore_UpdateTokenExpiry_Call { |
| 475 | _c.Call.Return(run) | 479 | _c.Call.Return(run) | ||
| 476 | return _c | 480 | return _c | ||
| 477 | } | 481 | } | ||