Documentation
¶
Index ¶
- type MockBlockedEmailChecker
- type MockBlockedEmailChecker_Expecter
- type MockBlockedEmailChecker_IsEmailBlocked_Call
- func (_c *MockBlockedEmailChecker_IsEmailBlocked_Call) Return(b bool, err error) *MockBlockedEmailChecker_IsEmailBlocked_Call
- func (_c *MockBlockedEmailChecker_IsEmailBlocked_Call) Run(run func(ctx context.Context, email string)) *MockBlockedEmailChecker_IsEmailBlocked_Call
- func (_c *MockBlockedEmailChecker_IsEmailBlocked_Call) RunAndReturn(run func(ctx context.Context, email string) (bool, error)) *MockBlockedEmailChecker_IsEmailBlocked_Call
- type MockMFACodeDeliverer
- type MockMFACodeDeliverer_DeliverMFACode_Call
- func (_c *MockMFACodeDeliverer_DeliverMFACode_Call) Return(err error) *MockMFACodeDeliverer_DeliverMFACode_Call
- func (_c *MockMFACodeDeliverer_DeliverMFACode_Call) Run(run func(ctx context.Context, to string, username string, code string)) *MockMFACodeDeliverer_DeliverMFACode_Call
- func (_c *MockMFACodeDeliverer_DeliverMFACode_Call) RunAndReturn(run func(ctx context.Context, to string, username string, code string) error) *MockMFACodeDeliverer_DeliverMFACode_Call
- type MockMFACodeDeliverer_Expecter
- type MockMailer
- func (_m *MockMailer) EXPECT() *MockMailer_Expecter
- func (_mock *MockMailer) SendAccountLockoutEmail(ctx context.Context, to string, username string) error
- func (_mock *MockMailer) SendPasswordResetEmail(ctx context.Context, to string, username string, token string) error
- func (_mock *MockMailer) SendRegistrationAttemptEmail(ctx context.Context, to string, username string) error
- func (_mock *MockMailer) SendVerificationEmail(ctx context.Context, to string, username string, token string) error
- type MockMailer_Expecter
- func (_e *MockMailer_Expecter) SendAccountLockoutEmail(ctx any, to any, username any) *MockMailer_SendAccountLockoutEmail_Call
- func (_e *MockMailer_Expecter) SendPasswordResetEmail(ctx any, to any, username any, token any) *MockMailer_SendPasswordResetEmail_Call
- func (_e *MockMailer_Expecter) SendRegistrationAttemptEmail(ctx any, to any, username any) *MockMailer_SendRegistrationAttemptEmail_Call
- func (_e *MockMailer_Expecter) SendVerificationEmail(ctx any, to any, username any, token any) *MockMailer_SendVerificationEmail_Call
- type MockMailer_SendAccountLockoutEmail_Call
- func (_c *MockMailer_SendAccountLockoutEmail_Call) Return(err error) *MockMailer_SendAccountLockoutEmail_Call
- func (_c *MockMailer_SendAccountLockoutEmail_Call) Run(run func(ctx context.Context, to string, username string)) *MockMailer_SendAccountLockoutEmail_Call
- func (_c *MockMailer_SendAccountLockoutEmail_Call) RunAndReturn(run func(ctx context.Context, to string, username string) error) *MockMailer_SendAccountLockoutEmail_Call
- type MockMailer_SendPasswordResetEmail_Call
- func (_c *MockMailer_SendPasswordResetEmail_Call) Return(err error) *MockMailer_SendPasswordResetEmail_Call
- func (_c *MockMailer_SendPasswordResetEmail_Call) Run(run func(ctx context.Context, to string, username string, token string)) *MockMailer_SendPasswordResetEmail_Call
- func (_c *MockMailer_SendPasswordResetEmail_Call) RunAndReturn(run func(ctx context.Context, to string, username string, token string) error) *MockMailer_SendPasswordResetEmail_Call
- type MockMailer_SendRegistrationAttemptEmail_Call
- func (_c *MockMailer_SendRegistrationAttemptEmail_Call) Return(err error) *MockMailer_SendRegistrationAttemptEmail_Call
- func (_c *MockMailer_SendRegistrationAttemptEmail_Call) Run(run func(ctx context.Context, to string, username string)) *MockMailer_SendRegistrationAttemptEmail_Call
- func (_c *MockMailer_SendRegistrationAttemptEmail_Call) RunAndReturn(run func(ctx context.Context, to string, username string) error) *MockMailer_SendRegistrationAttemptEmail_Call
- type MockMailer_SendVerificationEmail_Call
- func (_c *MockMailer_SendVerificationEmail_Call) Return(err error) *MockMailer_SendVerificationEmail_Call
- func (_c *MockMailer_SendVerificationEmail_Call) Run(run func(ctx context.Context, to string, username string, token string)) *MockMailer_SendVerificationEmail_Call
- func (_c *MockMailer_SendVerificationEmail_Call) RunAndReturn(run func(ctx context.Context, to string, username string, token string) error) *MockMailer_SendVerificationEmail_Call
- type MockNotificationRecorder
- func (_m *MockNotificationRecorder) EXPECT() *MockNotificationRecorder_Expecter
- func (_mock *MockNotificationRecorder) RecordUserRegistered(ctx context.Context, username string, email string) error
- func (_mock *MockNotificationRecorder) RecordUserVerified(ctx context.Context, username string, email string) error
- type MockNotificationRecorder_Expecter
- type MockNotificationRecorder_RecordUserRegistered_Call
- func (_c *MockNotificationRecorder_RecordUserRegistered_Call) Return(err error) *MockNotificationRecorder_RecordUserRegistered_Call
- func (_c *MockNotificationRecorder_RecordUserRegistered_Call) Run(run func(ctx context.Context, username string, email string)) *MockNotificationRecorder_RecordUserRegistered_Call
- func (_c *MockNotificationRecorder_RecordUserRegistered_Call) RunAndReturn(run func(ctx context.Context, username string, email string) error) *MockNotificationRecorder_RecordUserRegistered_Call
- type MockNotificationRecorder_RecordUserVerified_Call
- func (_c *MockNotificationRecorder_RecordUserVerified_Call) Return(err error) *MockNotificationRecorder_RecordUserVerified_Call
- func (_c *MockNotificationRecorder_RecordUserVerified_Call) Run(run func(ctx context.Context, username string, email string)) *MockNotificationRecorder_RecordUserVerified_Call
- func (_c *MockNotificationRecorder_RecordUserVerified_Call) RunAndReturn(run func(ctx context.Context, username string, email string) error) *MockNotificationRecorder_RecordUserVerified_Call
- type MockTokenIssuer
- type MockTokenIssuer_Expecter
- type MockTokenIssuer_GenerateToken_Call
- func (_c *MockTokenIssuer_GenerateToken_Call) Return(s string, err error) *MockTokenIssuer_GenerateToken_Call
- func (_c *MockTokenIssuer_GenerateToken_Call) Run(run func(userID string, username string, role string, tokenVersion int)) *MockTokenIssuer_GenerateToken_Call
- func (_c *MockTokenIssuer_GenerateToken_Call) RunAndReturn(...) *MockTokenIssuer_GenerateToken_Call
- type MockTokenIssuer_ValidateTokenExpiry_Call
- func (_c *MockTokenIssuer_ValidateTokenExpiry_Call) Return(time1 time.Time, err error) *MockTokenIssuer_ValidateTokenExpiry_Call
- func (_c *MockTokenIssuer_ValidateTokenExpiry_Call) Run(run func(token string)) *MockTokenIssuer_ValidateTokenExpiry_Call
- func (_c *MockTokenIssuer_ValidateTokenExpiry_Call) RunAndReturn(run func(token string) (time.Time, error)) *MockTokenIssuer_ValidateTokenExpiry_Call
- type MockUserStore
- func (_m *MockUserStore) EXPECT() *MockUserStore_Expecter
- func (_mock *MockUserStore) GetAdminUser(ctx context.Context) (*user.User, error)
- func (_mock *MockUserStore) GetUserByEmail(ctx context.Context, email string) (*user.User, error)
- func (_mock *MockUserStore) GetUserByID(ctx context.Context, userID int) (*user.User, error)
- func (_mock *MockUserStore) GetUserByUsername(ctx context.Context, username string) (*user.User, error)
- func (_mock *MockUserStore) RevokeSessions(ctx context.Context, userID int) error
- func (_mock *MockUserStore) UpdateAdminPasswordAndEmail(ctx context.Context, passwordHash string, email string, ...) error
- type MockUserStore_Expecter
- func (_e *MockUserStore_Expecter) GetAdminUser(ctx any) *MockUserStore_GetAdminUser_Call
- func (_e *MockUserStore_Expecter) GetUserByEmail(ctx any, email any) *MockUserStore_GetUserByEmail_Call
- func (_e *MockUserStore_Expecter) GetUserByID(ctx any, userID any) *MockUserStore_GetUserByID_Call
- func (_e *MockUserStore_Expecter) GetUserByUsername(ctx any, username any) *MockUserStore_GetUserByUsername_Call
- func (_e *MockUserStore_Expecter) RevokeSessions(ctx any, userID any) *MockUserStore_RevokeSessions_Call
- func (_e *MockUserStore_Expecter) UpdateAdminPasswordAndEmail(ctx any, passwordHash any, email any, currentPasswordHash any) *MockUserStore_UpdateAdminPasswordAndEmail_Call
- type MockUserStore_GetAdminUser_Call
- func (_c *MockUserStore_GetAdminUser_Call) Return(user1 *user.User, err error) *MockUserStore_GetAdminUser_Call
- func (_c *MockUserStore_GetAdminUser_Call) Run(run func(ctx context.Context)) *MockUserStore_GetAdminUser_Call
- func (_c *MockUserStore_GetAdminUser_Call) RunAndReturn(run func(ctx context.Context) (*user.User, error)) *MockUserStore_GetAdminUser_Call
- type MockUserStore_GetUserByEmail_Call
- func (_c *MockUserStore_GetUserByEmail_Call) Return(user1 *user.User, err error) *MockUserStore_GetUserByEmail_Call
- func (_c *MockUserStore_GetUserByEmail_Call) Run(run func(ctx context.Context, email string)) *MockUserStore_GetUserByEmail_Call
- func (_c *MockUserStore_GetUserByEmail_Call) RunAndReturn(run func(ctx context.Context, email string) (*user.User, error)) *MockUserStore_GetUserByEmail_Call
- type MockUserStore_GetUserByID_Call
- func (_c *MockUserStore_GetUserByID_Call) Return(user1 *user.User, err error) *MockUserStore_GetUserByID_Call
- func (_c *MockUserStore_GetUserByID_Call) Run(run func(ctx context.Context, userID int)) *MockUserStore_GetUserByID_Call
- func (_c *MockUserStore_GetUserByID_Call) RunAndReturn(run func(ctx context.Context, userID int) (*user.User, error)) *MockUserStore_GetUserByID_Call
- type MockUserStore_GetUserByUsername_Call
- func (_c *MockUserStore_GetUserByUsername_Call) Return(user1 *user.User, err error) *MockUserStore_GetUserByUsername_Call
- func (_c *MockUserStore_GetUserByUsername_Call) Run(run func(ctx context.Context, username string)) *MockUserStore_GetUserByUsername_Call
- func (_c *MockUserStore_GetUserByUsername_Call) RunAndReturn(run func(ctx context.Context, username string) (*user.User, error)) *MockUserStore_GetUserByUsername_Call
- type MockUserStore_RevokeSessions_Call
- func (_c *MockUserStore_RevokeSessions_Call) Return(err error) *MockUserStore_RevokeSessions_Call
- func (_c *MockUserStore_RevokeSessions_Call) Run(run func(ctx context.Context, userID int)) *MockUserStore_RevokeSessions_Call
- func (_c *MockUserStore_RevokeSessions_Call) RunAndReturn(run func(ctx context.Context, userID int) error) *MockUserStore_RevokeSessions_Call
- type MockUserStore_UpdateAdminPasswordAndEmail_Call
- func (_c *MockUserStore_UpdateAdminPasswordAndEmail_Call) Return(err error) *MockUserStore_UpdateAdminPasswordAndEmail_Call
- func (_c *MockUserStore_UpdateAdminPasswordAndEmail_Call) Run(run func(ctx context.Context, passwordHash string, email string, ...)) *MockUserStore_UpdateAdminPasswordAndEmail_Call
- func (_c *MockUserStore_UpdateAdminPasswordAndEmail_Call) RunAndReturn(run func(ctx context.Context, passwordHash string, email string, ...) error) *MockUserStore_UpdateAdminPasswordAndEmail_Call
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type MockBlockedEmailChecker ¶
MockBlockedEmailChecker is an autogenerated mock type for the BlockedEmailChecker type
func NewMockBlockedEmailChecker ¶
func NewMockBlockedEmailChecker(t interface {
mock.TestingT
Cleanup(func())
}) *MockBlockedEmailChecker
NewMockBlockedEmailChecker creates a new instance of MockBlockedEmailChecker. It also registers a testing interface on the mock and a cleanup function to assert the mocks expectations. The first argument is typically a *testing.T value.
func (*MockBlockedEmailChecker) EXPECT ¶
func (_m *MockBlockedEmailChecker) EXPECT() *MockBlockedEmailChecker_Expecter
func (*MockBlockedEmailChecker) IsEmailBlocked ¶
func (_mock *MockBlockedEmailChecker) IsEmailBlocked(ctx context.Context, email string) (bool, error)
IsEmailBlocked provides a mock function for the type MockBlockedEmailChecker
type MockBlockedEmailChecker_Expecter ¶
type MockBlockedEmailChecker_Expecter struct {
// contains filtered or unexported fields
}
func (*MockBlockedEmailChecker_Expecter) IsEmailBlocked ¶
func (_e *MockBlockedEmailChecker_Expecter) IsEmailBlocked(ctx any, email any) *MockBlockedEmailChecker_IsEmailBlocked_Call
IsEmailBlocked is a helper method to define mock.On call
- ctx context.Context
- email string
type MockBlockedEmailChecker_IsEmailBlocked_Call ¶
MockBlockedEmailChecker_IsEmailBlocked_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'IsEmailBlocked'
func (*MockBlockedEmailChecker_IsEmailBlocked_Call) Return ¶
func (_c *MockBlockedEmailChecker_IsEmailBlocked_Call) Return(b bool, err error) *MockBlockedEmailChecker_IsEmailBlocked_Call
func (*MockBlockedEmailChecker_IsEmailBlocked_Call) Run ¶
func (_c *MockBlockedEmailChecker_IsEmailBlocked_Call) Run(run func(ctx context.Context, email string)) *MockBlockedEmailChecker_IsEmailBlocked_Call
func (*MockBlockedEmailChecker_IsEmailBlocked_Call) RunAndReturn ¶
func (_c *MockBlockedEmailChecker_IsEmailBlocked_Call) RunAndReturn(run func(ctx context.Context, email string) (bool, error)) *MockBlockedEmailChecker_IsEmailBlocked_Call
type MockMFACodeDeliverer ¶
MockMFACodeDeliverer is an autogenerated mock type for the MFACodeDeliverer type
func NewMockMFACodeDeliverer ¶
func NewMockMFACodeDeliverer(t interface {
mock.TestingT
Cleanup(func())
}) *MockMFACodeDeliverer
NewMockMFACodeDeliverer creates a new instance of MockMFACodeDeliverer. It also registers a testing interface on the mock and a cleanup function to assert the mocks expectations. The first argument is typically a *testing.T value.
func (*MockMFACodeDeliverer) DeliverMFACode ¶
func (_mock *MockMFACodeDeliverer) DeliverMFACode(ctx context.Context, to string, username string, code string) error
DeliverMFACode provides a mock function for the type MockMFACodeDeliverer
func (*MockMFACodeDeliverer) EXPECT ¶
func (_m *MockMFACodeDeliverer) EXPECT() *MockMFACodeDeliverer_Expecter
type MockMFACodeDeliverer_DeliverMFACode_Call ¶
MockMFACodeDeliverer_DeliverMFACode_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'DeliverMFACode'
func (*MockMFACodeDeliverer_DeliverMFACode_Call) Return ¶
func (_c *MockMFACodeDeliverer_DeliverMFACode_Call) Return(err error) *MockMFACodeDeliverer_DeliverMFACode_Call
func (*MockMFACodeDeliverer_DeliverMFACode_Call) Run ¶
func (_c *MockMFACodeDeliverer_DeliverMFACode_Call) Run(run func(ctx context.Context, to string, username string, code string)) *MockMFACodeDeliverer_DeliverMFACode_Call
func (*MockMFACodeDeliverer_DeliverMFACode_Call) RunAndReturn ¶
func (_c *MockMFACodeDeliverer_DeliverMFACode_Call) RunAndReturn(run func(ctx context.Context, to string, username string, code string) error) *MockMFACodeDeliverer_DeliverMFACode_Call
type MockMFACodeDeliverer_Expecter ¶
type MockMFACodeDeliverer_Expecter struct {
// contains filtered or unexported fields
}
func (*MockMFACodeDeliverer_Expecter) DeliverMFACode ¶
func (_e *MockMFACodeDeliverer_Expecter) DeliverMFACode(ctx any, to any, username any, code any) *MockMFACodeDeliverer_DeliverMFACode_Call
DeliverMFACode is a helper method to define mock.On call
- ctx context.Context
- to string
- username string
- code string
type MockMailer ¶
MockMailer is an autogenerated mock type for the Mailer type
func NewMockMailer ¶
func NewMockMailer(t interface {
mock.TestingT
Cleanup(func())
}) *MockMailer
NewMockMailer creates a new instance of MockMailer. It also registers a testing interface on the mock and a cleanup function to assert the mocks expectations. The first argument is typically a *testing.T value.
func (*MockMailer) EXPECT ¶
func (_m *MockMailer) EXPECT() *MockMailer_Expecter
func (*MockMailer) SendAccountLockoutEmail ¶
func (_mock *MockMailer) SendAccountLockoutEmail(ctx context.Context, to string, username string) error
SendAccountLockoutEmail provides a mock function for the type MockMailer
func (*MockMailer) SendPasswordResetEmail ¶
func (_mock *MockMailer) SendPasswordResetEmail(ctx context.Context, to string, username string, token string) error
SendPasswordResetEmail provides a mock function for the type MockMailer
func (*MockMailer) SendRegistrationAttemptEmail ¶
func (_mock *MockMailer) SendRegistrationAttemptEmail(ctx context.Context, to string, username string) error
SendRegistrationAttemptEmail provides a mock function for the type MockMailer
func (*MockMailer) SendVerificationEmail ¶
func (_mock *MockMailer) SendVerificationEmail(ctx context.Context, to string, username string, token string) error
SendVerificationEmail provides a mock function for the type MockMailer
type MockMailer_Expecter ¶
type MockMailer_Expecter struct {
// contains filtered or unexported fields
}
func (*MockMailer_Expecter) SendAccountLockoutEmail ¶
func (_e *MockMailer_Expecter) SendAccountLockoutEmail(ctx any, to any, username any) *MockMailer_SendAccountLockoutEmail_Call
SendAccountLockoutEmail is a helper method to define mock.On call
- ctx context.Context
- to string
- username string
func (*MockMailer_Expecter) SendPasswordResetEmail ¶
func (_e *MockMailer_Expecter) SendPasswordResetEmail(ctx any, to any, username any, token any) *MockMailer_SendPasswordResetEmail_Call
SendPasswordResetEmail is a helper method to define mock.On call
- ctx context.Context
- to string
- username string
- token string
func (*MockMailer_Expecter) SendRegistrationAttemptEmail ¶
func (_e *MockMailer_Expecter) SendRegistrationAttemptEmail(ctx any, to any, username any) *MockMailer_SendRegistrationAttemptEmail_Call
SendRegistrationAttemptEmail is a helper method to define mock.On call
- ctx context.Context
- to string
- username string
func (*MockMailer_Expecter) SendVerificationEmail ¶
func (_e *MockMailer_Expecter) SendVerificationEmail(ctx any, to any, username any, token any) *MockMailer_SendVerificationEmail_Call
SendVerificationEmail is a helper method to define mock.On call
- ctx context.Context
- to string
- username string
- token string
type MockMailer_SendAccountLockoutEmail_Call ¶
MockMailer_SendAccountLockoutEmail_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'SendAccountLockoutEmail'
func (*MockMailer_SendAccountLockoutEmail_Call) Return ¶
func (_c *MockMailer_SendAccountLockoutEmail_Call) Return(err error) *MockMailer_SendAccountLockoutEmail_Call
func (*MockMailer_SendAccountLockoutEmail_Call) Run ¶
func (_c *MockMailer_SendAccountLockoutEmail_Call) Run(run func(ctx context.Context, to string, username string)) *MockMailer_SendAccountLockoutEmail_Call
func (*MockMailer_SendAccountLockoutEmail_Call) RunAndReturn ¶
func (_c *MockMailer_SendAccountLockoutEmail_Call) RunAndReturn(run func(ctx context.Context, to string, username string) error) *MockMailer_SendAccountLockoutEmail_Call
type MockMailer_SendPasswordResetEmail_Call ¶
MockMailer_SendPasswordResetEmail_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'SendPasswordResetEmail'
func (*MockMailer_SendPasswordResetEmail_Call) Return ¶
func (_c *MockMailer_SendPasswordResetEmail_Call) Return(err error) *MockMailer_SendPasswordResetEmail_Call
func (*MockMailer_SendPasswordResetEmail_Call) Run ¶
func (_c *MockMailer_SendPasswordResetEmail_Call) Run(run func(ctx context.Context, to string, username string, token string)) *MockMailer_SendPasswordResetEmail_Call
func (*MockMailer_SendPasswordResetEmail_Call) RunAndReturn ¶
func (_c *MockMailer_SendPasswordResetEmail_Call) RunAndReturn(run func(ctx context.Context, to string, username string, token string) error) *MockMailer_SendPasswordResetEmail_Call
type MockMailer_SendRegistrationAttemptEmail_Call ¶
MockMailer_SendRegistrationAttemptEmail_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'SendRegistrationAttemptEmail'
func (*MockMailer_SendRegistrationAttemptEmail_Call) Return ¶
func (_c *MockMailer_SendRegistrationAttemptEmail_Call) Return(err error) *MockMailer_SendRegistrationAttemptEmail_Call
func (*MockMailer_SendRegistrationAttemptEmail_Call) Run ¶
func (_c *MockMailer_SendRegistrationAttemptEmail_Call) Run(run func(ctx context.Context, to string, username string)) *MockMailer_SendRegistrationAttemptEmail_Call
func (*MockMailer_SendRegistrationAttemptEmail_Call) RunAndReturn ¶
func (_c *MockMailer_SendRegistrationAttemptEmail_Call) RunAndReturn(run func(ctx context.Context, to string, username string) error) *MockMailer_SendRegistrationAttemptEmail_Call
type MockMailer_SendVerificationEmail_Call ¶
MockMailer_SendVerificationEmail_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'SendVerificationEmail'
func (*MockMailer_SendVerificationEmail_Call) Return ¶
func (_c *MockMailer_SendVerificationEmail_Call) Return(err error) *MockMailer_SendVerificationEmail_Call
func (*MockMailer_SendVerificationEmail_Call) Run ¶
func (_c *MockMailer_SendVerificationEmail_Call) Run(run func(ctx context.Context, to string, username string, token string)) *MockMailer_SendVerificationEmail_Call
func (*MockMailer_SendVerificationEmail_Call) RunAndReturn ¶
func (_c *MockMailer_SendVerificationEmail_Call) RunAndReturn(run func(ctx context.Context, to string, username string, token string) error) *MockMailer_SendVerificationEmail_Call
type MockNotificationRecorder ¶
MockNotificationRecorder is an autogenerated mock type for the NotificationRecorder type
func NewMockNotificationRecorder ¶
func NewMockNotificationRecorder(t interface {
mock.TestingT
Cleanup(func())
}) *MockNotificationRecorder
NewMockNotificationRecorder creates a new instance of MockNotificationRecorder. It also registers a testing interface on the mock and a cleanup function to assert the mocks expectations. The first argument is typically a *testing.T value.
func (*MockNotificationRecorder) EXPECT ¶
func (_m *MockNotificationRecorder) EXPECT() *MockNotificationRecorder_Expecter
func (*MockNotificationRecorder) RecordUserRegistered ¶
func (_mock *MockNotificationRecorder) RecordUserRegistered(ctx context.Context, username string, email string) error
RecordUserRegistered provides a mock function for the type MockNotificationRecorder
func (*MockNotificationRecorder) RecordUserVerified ¶
func (_mock *MockNotificationRecorder) RecordUserVerified(ctx context.Context, username string, email string) error
RecordUserVerified provides a mock function for the type MockNotificationRecorder
type MockNotificationRecorder_Expecter ¶
type MockNotificationRecorder_Expecter struct {
// contains filtered or unexported fields
}
func (*MockNotificationRecorder_Expecter) RecordUserRegistered ¶
func (_e *MockNotificationRecorder_Expecter) RecordUserRegistered(ctx any, username any, email any) *MockNotificationRecorder_RecordUserRegistered_Call
RecordUserRegistered is a helper method to define mock.On call
- ctx context.Context
- username string
- email string
func (*MockNotificationRecorder_Expecter) RecordUserVerified ¶
func (_e *MockNotificationRecorder_Expecter) RecordUserVerified(ctx any, username any, email any) *MockNotificationRecorder_RecordUserVerified_Call
RecordUserVerified is a helper method to define mock.On call
- ctx context.Context
- username string
- email string
type MockNotificationRecorder_RecordUserRegistered_Call ¶
MockNotificationRecorder_RecordUserRegistered_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'RecordUserRegistered'
func (*MockNotificationRecorder_RecordUserRegistered_Call) Run ¶
func (_c *MockNotificationRecorder_RecordUserRegistered_Call) Run(run func(ctx context.Context, username string, email string)) *MockNotificationRecorder_RecordUserRegistered_Call
func (*MockNotificationRecorder_RecordUserRegistered_Call) RunAndReturn ¶
func (_c *MockNotificationRecorder_RecordUserRegistered_Call) RunAndReturn(run func(ctx context.Context, username string, email string) error) *MockNotificationRecorder_RecordUserRegistered_Call
type MockNotificationRecorder_RecordUserVerified_Call ¶
MockNotificationRecorder_RecordUserVerified_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'RecordUserVerified'
func (*MockNotificationRecorder_RecordUserVerified_Call) Return ¶
func (_c *MockNotificationRecorder_RecordUserVerified_Call) Return(err error) *MockNotificationRecorder_RecordUserVerified_Call
func (*MockNotificationRecorder_RecordUserVerified_Call) Run ¶
func (_c *MockNotificationRecorder_RecordUserVerified_Call) Run(run func(ctx context.Context, username string, email string)) *MockNotificationRecorder_RecordUserVerified_Call
func (*MockNotificationRecorder_RecordUserVerified_Call) RunAndReturn ¶
func (_c *MockNotificationRecorder_RecordUserVerified_Call) RunAndReturn(run func(ctx context.Context, username string, email string) error) *MockNotificationRecorder_RecordUserVerified_Call
type MockTokenIssuer ¶
MockTokenIssuer is an autogenerated mock type for the TokenIssuer type
func NewMockTokenIssuer ¶
func NewMockTokenIssuer(t interface {
mock.TestingT
Cleanup(func())
}) *MockTokenIssuer
NewMockTokenIssuer creates a new instance of MockTokenIssuer. It also registers a testing interface on the mock and a cleanup function to assert the mocks expectations. The first argument is typically a *testing.T value.
func (*MockTokenIssuer) EXPECT ¶
func (_m *MockTokenIssuer) EXPECT() *MockTokenIssuer_Expecter
func (*MockTokenIssuer) GenerateToken ¶
func (_mock *MockTokenIssuer) GenerateToken(userID string, username string, role string, tokenVersion int) (string, error)
GenerateToken provides a mock function for the type MockTokenIssuer
func (*MockTokenIssuer) ValidateTokenExpiry ¶
func (_mock *MockTokenIssuer) ValidateTokenExpiry(token string) (time.Time, error)
ValidateTokenExpiry provides a mock function for the type MockTokenIssuer
type MockTokenIssuer_Expecter ¶
type MockTokenIssuer_Expecter struct {
// contains filtered or unexported fields
}
func (*MockTokenIssuer_Expecter) GenerateToken ¶
func (_e *MockTokenIssuer_Expecter) GenerateToken(userID any, username any, role any, tokenVersion any) *MockTokenIssuer_GenerateToken_Call
GenerateToken is a helper method to define mock.On call
- userID string
- username string
- role string
- tokenVersion int
func (*MockTokenIssuer_Expecter) ValidateTokenExpiry ¶
func (_e *MockTokenIssuer_Expecter) ValidateTokenExpiry(token any) *MockTokenIssuer_ValidateTokenExpiry_Call
ValidateTokenExpiry is a helper method to define mock.On call
- token string
type MockTokenIssuer_GenerateToken_Call ¶
MockTokenIssuer_GenerateToken_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'GenerateToken'
func (*MockTokenIssuer_GenerateToken_Call) Return ¶
func (_c *MockTokenIssuer_GenerateToken_Call) Return(s string, err error) *MockTokenIssuer_GenerateToken_Call
func (*MockTokenIssuer_GenerateToken_Call) Run ¶
func (_c *MockTokenIssuer_GenerateToken_Call) Run(run func(userID string, username string, role string, tokenVersion int)) *MockTokenIssuer_GenerateToken_Call
func (*MockTokenIssuer_GenerateToken_Call) RunAndReturn ¶
func (_c *MockTokenIssuer_GenerateToken_Call) RunAndReturn(run func(userID string, username string, role string, tokenVersion int) (string, error)) *MockTokenIssuer_GenerateToken_Call
type MockTokenIssuer_ValidateTokenExpiry_Call ¶
MockTokenIssuer_ValidateTokenExpiry_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'ValidateTokenExpiry'
func (*MockTokenIssuer_ValidateTokenExpiry_Call) Return ¶
func (_c *MockTokenIssuer_ValidateTokenExpiry_Call) Return(time1 time.Time, err error) *MockTokenIssuer_ValidateTokenExpiry_Call
func (*MockTokenIssuer_ValidateTokenExpiry_Call) Run ¶
func (_c *MockTokenIssuer_ValidateTokenExpiry_Call) Run(run func(token string)) *MockTokenIssuer_ValidateTokenExpiry_Call
func (*MockTokenIssuer_ValidateTokenExpiry_Call) RunAndReturn ¶
func (_c *MockTokenIssuer_ValidateTokenExpiry_Call) RunAndReturn(run func(token string) (time.Time, error)) *MockTokenIssuer_ValidateTokenExpiry_Call
type MockUserStore ¶
MockUserStore is an autogenerated mock type for the UserStore type
func NewMockUserStore ¶
func NewMockUserStore(t interface {
mock.TestingT
Cleanup(func())
}) *MockUserStore
NewMockUserStore creates a new instance of MockUserStore. It also registers a testing interface on the mock and a cleanup function to assert the mocks expectations. The first argument is typically a *testing.T value.
func (*MockUserStore) EXPECT ¶
func (_m *MockUserStore) EXPECT() *MockUserStore_Expecter
func (*MockUserStore) GetAdminUser ¶
func (_mock *MockUserStore) GetAdminUser(ctx context.Context) (*user.User, error)
GetAdminUser provides a mock function for the type MockUserStore
func (*MockUserStore) GetUserByEmail ¶
func (_mock *MockUserStore) GetUserByEmail(ctx context.Context, email string) (*user.User, error)
GetUserByEmail provides a mock function for the type MockUserStore
func (*MockUserStore) GetUserByID ¶
func (_mock *MockUserStore) GetUserByID(ctx context.Context, userID int) (*user.User, error)
GetUserByID provides a mock function for the type MockUserStore
func (*MockUserStore) GetUserByUsername ¶
func (_mock *MockUserStore) GetUserByUsername(ctx context.Context, username string) (*user.User, error)
GetUserByUsername provides a mock function for the type MockUserStore
func (*MockUserStore) RevokeSessions ¶
func (_mock *MockUserStore) RevokeSessions(ctx context.Context, userID int) error
RevokeSessions provides a mock function for the type MockUserStore
func (*MockUserStore) UpdateAdminPasswordAndEmail ¶
func (_mock *MockUserStore) UpdateAdminPasswordAndEmail(ctx context.Context, passwordHash string, email string, currentPasswordHash string) error
UpdateAdminPasswordAndEmail provides a mock function for the type MockUserStore
type MockUserStore_Expecter ¶
type MockUserStore_Expecter struct {
// contains filtered or unexported fields
}
func (*MockUserStore_Expecter) GetAdminUser ¶
func (_e *MockUserStore_Expecter) GetAdminUser(ctx any) *MockUserStore_GetAdminUser_Call
GetAdminUser is a helper method to define mock.On call
- ctx context.Context
func (*MockUserStore_Expecter) GetUserByEmail ¶
func (_e *MockUserStore_Expecter) GetUserByEmail(ctx any, email any) *MockUserStore_GetUserByEmail_Call
GetUserByEmail is a helper method to define mock.On call
- ctx context.Context
- email string
func (*MockUserStore_Expecter) GetUserByID ¶
func (_e *MockUserStore_Expecter) GetUserByID(ctx any, userID any) *MockUserStore_GetUserByID_Call
GetUserByID is a helper method to define mock.On call
- ctx context.Context
- userID int
func (*MockUserStore_Expecter) GetUserByUsername ¶
func (_e *MockUserStore_Expecter) GetUserByUsername(ctx any, username any) *MockUserStore_GetUserByUsername_Call
GetUserByUsername is a helper method to define mock.On call
- ctx context.Context
- username string
func (*MockUserStore_Expecter) RevokeSessions ¶
func (_e *MockUserStore_Expecter) RevokeSessions(ctx any, userID any) *MockUserStore_RevokeSessions_Call
RevokeSessions is a helper method to define mock.On call
- ctx context.Context
- userID int
func (*MockUserStore_Expecter) UpdateAdminPasswordAndEmail ¶
func (_e *MockUserStore_Expecter) UpdateAdminPasswordAndEmail(ctx any, passwordHash any, email any, currentPasswordHash any) *MockUserStore_UpdateAdminPasswordAndEmail_Call
UpdateAdminPasswordAndEmail is a helper method to define mock.On call
- ctx context.Context
- passwordHash string
- email string
- currentPasswordHash string
type MockUserStore_GetAdminUser_Call ¶
MockUserStore_GetAdminUser_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'GetAdminUser'
func (*MockUserStore_GetAdminUser_Call) Return ¶
func (_c *MockUserStore_GetAdminUser_Call) Return(user1 *user.User, err error) *MockUserStore_GetAdminUser_Call
func (*MockUserStore_GetAdminUser_Call) Run ¶
func (_c *MockUserStore_GetAdminUser_Call) Run(run func(ctx context.Context)) *MockUserStore_GetAdminUser_Call
func (*MockUserStore_GetAdminUser_Call) RunAndReturn ¶
func (_c *MockUserStore_GetAdminUser_Call) RunAndReturn(run func(ctx context.Context) (*user.User, error)) *MockUserStore_GetAdminUser_Call
type MockUserStore_GetUserByEmail_Call ¶
MockUserStore_GetUserByEmail_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'GetUserByEmail'
func (*MockUserStore_GetUserByEmail_Call) Return ¶
func (_c *MockUserStore_GetUserByEmail_Call) Return(user1 *user.User, err error) *MockUserStore_GetUserByEmail_Call
func (*MockUserStore_GetUserByEmail_Call) Run ¶
func (_c *MockUserStore_GetUserByEmail_Call) Run(run func(ctx context.Context, email string)) *MockUserStore_GetUserByEmail_Call
func (*MockUserStore_GetUserByEmail_Call) RunAndReturn ¶
func (_c *MockUserStore_GetUserByEmail_Call) RunAndReturn(run func(ctx context.Context, email string) (*user.User, error)) *MockUserStore_GetUserByEmail_Call
type MockUserStore_GetUserByID_Call ¶
MockUserStore_GetUserByID_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'GetUserByID'
func (*MockUserStore_GetUserByID_Call) Return ¶
func (_c *MockUserStore_GetUserByID_Call) Return(user1 *user.User, err error) *MockUserStore_GetUserByID_Call
func (*MockUserStore_GetUserByID_Call) Run ¶
func (_c *MockUserStore_GetUserByID_Call) Run(run func(ctx context.Context, userID int)) *MockUserStore_GetUserByID_Call
func (*MockUserStore_GetUserByID_Call) RunAndReturn ¶
func (_c *MockUserStore_GetUserByID_Call) RunAndReturn(run func(ctx context.Context, userID int) (*user.User, error)) *MockUserStore_GetUserByID_Call
type MockUserStore_GetUserByUsername_Call ¶
MockUserStore_GetUserByUsername_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'GetUserByUsername'
func (*MockUserStore_GetUserByUsername_Call) Return ¶
func (_c *MockUserStore_GetUserByUsername_Call) Return(user1 *user.User, err error) *MockUserStore_GetUserByUsername_Call
func (*MockUserStore_GetUserByUsername_Call) Run ¶
func (_c *MockUserStore_GetUserByUsername_Call) Run(run func(ctx context.Context, username string)) *MockUserStore_GetUserByUsername_Call
func (*MockUserStore_GetUserByUsername_Call) RunAndReturn ¶
func (_c *MockUserStore_GetUserByUsername_Call) RunAndReturn(run func(ctx context.Context, username string) (*user.User, error)) *MockUserStore_GetUserByUsername_Call
type MockUserStore_RevokeSessions_Call ¶
MockUserStore_RevokeSessions_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'RevokeSessions'
func (*MockUserStore_RevokeSessions_Call) Return ¶
func (_c *MockUserStore_RevokeSessions_Call) Return(err error) *MockUserStore_RevokeSessions_Call
func (*MockUserStore_RevokeSessions_Call) Run ¶
func (_c *MockUserStore_RevokeSessions_Call) Run(run func(ctx context.Context, userID int)) *MockUserStore_RevokeSessions_Call
func (*MockUserStore_RevokeSessions_Call) RunAndReturn ¶
func (_c *MockUserStore_RevokeSessions_Call) RunAndReturn(run func(ctx context.Context, userID int) error) *MockUserStore_RevokeSessions_Call
type MockUserStore_UpdateAdminPasswordAndEmail_Call ¶
MockUserStore_UpdateAdminPasswordAndEmail_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'UpdateAdminPasswordAndEmail'
func (*MockUserStore_UpdateAdminPasswordAndEmail_Call) Return ¶
func (_c *MockUserStore_UpdateAdminPasswordAndEmail_Call) Return(err error) *MockUserStore_UpdateAdminPasswordAndEmail_Call
func (*MockUserStore_UpdateAdminPasswordAndEmail_Call) Run ¶
func (_c *MockUserStore_UpdateAdminPasswordAndEmail_Call) Run(run func(ctx context.Context, passwordHash string, email string, currentPasswordHash string)) *MockUserStore_UpdateAdminPasswordAndEmail_Call
func (*MockUserStore_UpdateAdminPasswordAndEmail_Call) RunAndReturn ¶
func (_c *MockUserStore_UpdateAdminPasswordAndEmail_Call) RunAndReturn(run func(ctx context.Context, passwordHash string, email string, currentPasswordHash string) error) *MockUserStore_UpdateAdminPasswordAndEmail_Call