Documentation
¶
Index ¶
- type MockCredentialPolicy
- func (_m *MockCredentialPolicy) EXPECT() *MockCredentialPolicy_Expecter
- func (_mock *MockCredentialPolicy) GeneratePassword(length int) (string, error)
- func (_mock *MockCredentialPolicy) HashPassword(password string) (string, error)
- func (_mock *MockCredentialPolicy) NeedsRehash(hash string) bool
- func (_mock *MockCredentialPolicy) ValidateEmail(email string) error
- func (_mock *MockCredentialPolicy) ValidatePassword(password string) error
- func (_mock *MockCredentialPolicy) ValidateUsername(username string) error
- func (_mock *MockCredentialPolicy) VerifyPassword(hash string, password string) error
- type MockCredentialPolicy_Expecter
- func (_e *MockCredentialPolicy_Expecter) GeneratePassword(length any) *MockCredentialPolicy_GeneratePassword_Call
- func (_e *MockCredentialPolicy_Expecter) HashPassword(password any) *MockCredentialPolicy_HashPassword_Call
- func (_e *MockCredentialPolicy_Expecter) NeedsRehash(hash any) *MockCredentialPolicy_NeedsRehash_Call
- func (_e *MockCredentialPolicy_Expecter) ValidateEmail(email any) *MockCredentialPolicy_ValidateEmail_Call
- func (_e *MockCredentialPolicy_Expecter) ValidatePassword(password any) *MockCredentialPolicy_ValidatePassword_Call
- func (_e *MockCredentialPolicy_Expecter) ValidateUsername(username any) *MockCredentialPolicy_ValidateUsername_Call
- func (_e *MockCredentialPolicy_Expecter) VerifyPassword(hash any, password any) *MockCredentialPolicy_VerifyPassword_Call
- type MockCredentialPolicy_GeneratePassword_Call
- func (_c *MockCredentialPolicy_GeneratePassword_Call) Return(s string, err error) *MockCredentialPolicy_GeneratePassword_Call
- func (_c *MockCredentialPolicy_GeneratePassword_Call) Run(run func(length int)) *MockCredentialPolicy_GeneratePassword_Call
- func (_c *MockCredentialPolicy_GeneratePassword_Call) RunAndReturn(run func(length int) (string, error)) *MockCredentialPolicy_GeneratePassword_Call
- type MockCredentialPolicy_HashPassword_Call
- func (_c *MockCredentialPolicy_HashPassword_Call) Return(s string, err error) *MockCredentialPolicy_HashPassword_Call
- func (_c *MockCredentialPolicy_HashPassword_Call) Run(run func(password string)) *MockCredentialPolicy_HashPassword_Call
- func (_c *MockCredentialPolicy_HashPassword_Call) RunAndReturn(run func(password string) (string, error)) *MockCredentialPolicy_HashPassword_Call
- type MockCredentialPolicy_NeedsRehash_Call
- func (_c *MockCredentialPolicy_NeedsRehash_Call) Return(b bool) *MockCredentialPolicy_NeedsRehash_Call
- func (_c *MockCredentialPolicy_NeedsRehash_Call) Run(run func(hash string)) *MockCredentialPolicy_NeedsRehash_Call
- func (_c *MockCredentialPolicy_NeedsRehash_Call) RunAndReturn(run func(hash string) bool) *MockCredentialPolicy_NeedsRehash_Call
- type MockCredentialPolicy_ValidateEmail_Call
- func (_c *MockCredentialPolicy_ValidateEmail_Call) Return(err error) *MockCredentialPolicy_ValidateEmail_Call
- func (_c *MockCredentialPolicy_ValidateEmail_Call) Run(run func(email string)) *MockCredentialPolicy_ValidateEmail_Call
- func (_c *MockCredentialPolicy_ValidateEmail_Call) RunAndReturn(run func(email string) error) *MockCredentialPolicy_ValidateEmail_Call
- type MockCredentialPolicy_ValidatePassword_Call
- func (_c *MockCredentialPolicy_ValidatePassword_Call) Return(err error) *MockCredentialPolicy_ValidatePassword_Call
- func (_c *MockCredentialPolicy_ValidatePassword_Call) Run(run func(password string)) *MockCredentialPolicy_ValidatePassword_Call
- func (_c *MockCredentialPolicy_ValidatePassword_Call) RunAndReturn(run func(password string) error) *MockCredentialPolicy_ValidatePassword_Call
- type MockCredentialPolicy_ValidateUsername_Call
- func (_c *MockCredentialPolicy_ValidateUsername_Call) Return(err error) *MockCredentialPolicy_ValidateUsername_Call
- func (_c *MockCredentialPolicy_ValidateUsername_Call) Run(run func(username string)) *MockCredentialPolicy_ValidateUsername_Call
- func (_c *MockCredentialPolicy_ValidateUsername_Call) RunAndReturn(run func(username string) error) *MockCredentialPolicy_ValidateUsername_Call
- type MockCredentialPolicy_VerifyPassword_Call
- func (_c *MockCredentialPolicy_VerifyPassword_Call) Return(err error) *MockCredentialPolicy_VerifyPassword_Call
- func (_c *MockCredentialPolicy_VerifyPassword_Call) Run(run func(hash string, password string)) *MockCredentialPolicy_VerifyPassword_Call
- func (_c *MockCredentialPolicy_VerifyPassword_Call) RunAndReturn(run func(hash string, password string) error) *MockCredentialPolicy_VerifyPassword_Call
- type MockFailedLoginAttemptRepo
- func (_mock *MockFailedLoginAttemptRepo) Create(ctx context.Context, attempt *auth.FailedLoginAttempt) error
- func (_mock *MockFailedLoginAttemptRepo) Delete(ctx context.Context, userID int) error
- func (_m *MockFailedLoginAttemptRepo) EXPECT() *MockFailedLoginAttemptRepo_Expecter
- func (_mock *MockFailedLoginAttemptRepo) GetByUserID(ctx context.Context, userID int) (*auth.FailedLoginAttempt, error)
- func (_mock *MockFailedLoginAttemptRepo) IncrementAttempts(ctx context.Context, userID int) error
- func (_mock *MockFailedLoginAttemptRepo) IsLocked(ctx context.Context, userID int) (bool, *time.Time, error)
- func (_mock *MockFailedLoginAttemptRepo) LockAccount(ctx context.Context, userID int, lockoutDuration time.Duration) error
- func (_mock *MockFailedLoginAttemptRepo) ResetAttempts(ctx context.Context, userID int) error
- func (_mock *MockFailedLoginAttemptRepo) ShouldSendLockoutEmail(ctx context.Context, userID int, minInterval time.Duration) (bool, error)
- func (_mock *MockFailedLoginAttemptRepo) UpdateLastEmailSent(ctx context.Context, userID int) error
- type MockFailedLoginAttemptRepo_Create_Call
- func (_c *MockFailedLoginAttemptRepo_Create_Call) Return(err error) *MockFailedLoginAttemptRepo_Create_Call
- func (_c *MockFailedLoginAttemptRepo_Create_Call) Run(run func(ctx context.Context, attempt *auth.FailedLoginAttempt)) *MockFailedLoginAttemptRepo_Create_Call
- func (_c *MockFailedLoginAttemptRepo_Create_Call) RunAndReturn(run func(ctx context.Context, attempt *auth.FailedLoginAttempt) error) *MockFailedLoginAttemptRepo_Create_Call
- type MockFailedLoginAttemptRepo_Delete_Call
- func (_c *MockFailedLoginAttemptRepo_Delete_Call) Return(err error) *MockFailedLoginAttemptRepo_Delete_Call
- func (_c *MockFailedLoginAttemptRepo_Delete_Call) Run(run func(ctx context.Context, userID int)) *MockFailedLoginAttemptRepo_Delete_Call
- func (_c *MockFailedLoginAttemptRepo_Delete_Call) RunAndReturn(run func(ctx context.Context, userID int) error) *MockFailedLoginAttemptRepo_Delete_Call
- type MockFailedLoginAttemptRepo_Expecter
- func (_e *MockFailedLoginAttemptRepo_Expecter) Create(ctx any, attempt any) *MockFailedLoginAttemptRepo_Create_Call
- func (_e *MockFailedLoginAttemptRepo_Expecter) Delete(ctx any, userID any) *MockFailedLoginAttemptRepo_Delete_Call
- func (_e *MockFailedLoginAttemptRepo_Expecter) GetByUserID(ctx any, userID any) *MockFailedLoginAttemptRepo_GetByUserID_Call
- func (_e *MockFailedLoginAttemptRepo_Expecter) IncrementAttempts(ctx any, userID any) *MockFailedLoginAttemptRepo_IncrementAttempts_Call
- func (_e *MockFailedLoginAttemptRepo_Expecter) IsLocked(ctx any, userID any) *MockFailedLoginAttemptRepo_IsLocked_Call
- func (_e *MockFailedLoginAttemptRepo_Expecter) LockAccount(ctx any, userID any, lockoutDuration any) *MockFailedLoginAttemptRepo_LockAccount_Call
- func (_e *MockFailedLoginAttemptRepo_Expecter) ResetAttempts(ctx any, userID any) *MockFailedLoginAttemptRepo_ResetAttempts_Call
- func (_e *MockFailedLoginAttemptRepo_Expecter) ShouldSendLockoutEmail(ctx any, userID any, minInterval any) *MockFailedLoginAttemptRepo_ShouldSendLockoutEmail_Call
- func (_e *MockFailedLoginAttemptRepo_Expecter) UpdateLastEmailSent(ctx any, userID any) *MockFailedLoginAttemptRepo_UpdateLastEmailSent_Call
- type MockFailedLoginAttemptRepo_GetByUserID_Call
- func (_c *MockFailedLoginAttemptRepo_GetByUserID_Call) Return(failedLoginAttempt *auth.FailedLoginAttempt, err error) *MockFailedLoginAttemptRepo_GetByUserID_Call
- func (_c *MockFailedLoginAttemptRepo_GetByUserID_Call) Run(run func(ctx context.Context, userID int)) *MockFailedLoginAttemptRepo_GetByUserID_Call
- func (_c *MockFailedLoginAttemptRepo_GetByUserID_Call) RunAndReturn(run func(ctx context.Context, userID int) (*auth.FailedLoginAttempt, error)) *MockFailedLoginAttemptRepo_GetByUserID_Call
- type MockFailedLoginAttemptRepo_IncrementAttempts_Call
- func (_c *MockFailedLoginAttemptRepo_IncrementAttempts_Call) Return(err error) *MockFailedLoginAttemptRepo_IncrementAttempts_Call
- func (_c *MockFailedLoginAttemptRepo_IncrementAttempts_Call) Run(run func(ctx context.Context, userID int)) *MockFailedLoginAttemptRepo_IncrementAttempts_Call
- func (_c *MockFailedLoginAttemptRepo_IncrementAttempts_Call) RunAndReturn(run func(ctx context.Context, userID int) error) *MockFailedLoginAttemptRepo_IncrementAttempts_Call
- type MockFailedLoginAttemptRepo_IsLocked_Call
- func (_c *MockFailedLoginAttemptRepo_IsLocked_Call) Return(b bool, time1 *time.Time, err error) *MockFailedLoginAttemptRepo_IsLocked_Call
- func (_c *MockFailedLoginAttemptRepo_IsLocked_Call) Run(run func(ctx context.Context, userID int)) *MockFailedLoginAttemptRepo_IsLocked_Call
- func (_c *MockFailedLoginAttemptRepo_IsLocked_Call) RunAndReturn(run func(ctx context.Context, userID int) (bool, *time.Time, error)) *MockFailedLoginAttemptRepo_IsLocked_Call
- type MockFailedLoginAttemptRepo_LockAccount_Call
- func (_c *MockFailedLoginAttemptRepo_LockAccount_Call) Return(err error) *MockFailedLoginAttemptRepo_LockAccount_Call
- func (_c *MockFailedLoginAttemptRepo_LockAccount_Call) Run(run func(ctx context.Context, userID int, lockoutDuration time.Duration)) *MockFailedLoginAttemptRepo_LockAccount_Call
- func (_c *MockFailedLoginAttemptRepo_LockAccount_Call) RunAndReturn(run func(ctx context.Context, userID int, lockoutDuration time.Duration) error) *MockFailedLoginAttemptRepo_LockAccount_Call
- type MockFailedLoginAttemptRepo_ResetAttempts_Call
- func (_c *MockFailedLoginAttemptRepo_ResetAttempts_Call) Return(err error) *MockFailedLoginAttemptRepo_ResetAttempts_Call
- func (_c *MockFailedLoginAttemptRepo_ResetAttempts_Call) Run(run func(ctx context.Context, userID int)) *MockFailedLoginAttemptRepo_ResetAttempts_Call
- func (_c *MockFailedLoginAttemptRepo_ResetAttempts_Call) RunAndReturn(run func(ctx context.Context, userID int) error) *MockFailedLoginAttemptRepo_ResetAttempts_Call
- type MockFailedLoginAttemptRepo_ShouldSendLockoutEmail_Call
- func (_c *MockFailedLoginAttemptRepo_ShouldSendLockoutEmail_Call) Return(b bool, err error) *MockFailedLoginAttemptRepo_ShouldSendLockoutEmail_Call
- func (_c *MockFailedLoginAttemptRepo_ShouldSendLockoutEmail_Call) Run(run func(ctx context.Context, userID int, minInterval time.Duration)) *MockFailedLoginAttemptRepo_ShouldSendLockoutEmail_Call
- func (_c *MockFailedLoginAttemptRepo_ShouldSendLockoutEmail_Call) RunAndReturn(...) *MockFailedLoginAttemptRepo_ShouldSendLockoutEmail_Call
- type MockFailedLoginAttemptRepo_UpdateLastEmailSent_Call
- func (_c *MockFailedLoginAttemptRepo_UpdateLastEmailSent_Call) Return(err error) *MockFailedLoginAttemptRepo_UpdateLastEmailSent_Call
- func (_c *MockFailedLoginAttemptRepo_UpdateLastEmailSent_Call) Run(run func(ctx context.Context, userID int)) *MockFailedLoginAttemptRepo_UpdateLastEmailSent_Call
- func (_c *MockFailedLoginAttemptRepo_UpdateLastEmailSent_Call) RunAndReturn(run func(ctx context.Context, userID int) error) *MockFailedLoginAttemptRepo_UpdateLastEmailSent_Call
- type MockMFAChallengeRepo
- func (_mock *MockMFAChallengeRepo) Consume(ctx context.Context, id int) (bool, error)
- func (_mock *MockMFAChallengeRepo) Create(ctx context.Context, challenge *auth.MFAChallenge) error
- func (_mock *MockMFAChallengeRepo) Delete(ctx context.Context, id int) error
- func (_mock *MockMFAChallengeRepo) DeleteExpired(ctx context.Context) error
- func (_mock *MockMFAChallengeRepo) DeleteUserChallenges(ctx context.Context, userID int) error
- func (_m *MockMFAChallengeRepo) EXPECT() *MockMFAChallengeRepo_Expecter
- func (_mock *MockMFAChallengeRepo) FindByTokenHash(ctx context.Context, tokenHash string) (*auth.MFAChallenge, error)
- func (_mock *MockMFAChallengeRepo) IncrementAttempts(ctx context.Context, id int, maxAttempts int) (bool, error)
- type MockMFAChallengeRepo_Consume_Call
- func (_c *MockMFAChallengeRepo_Consume_Call) Return(b bool, err error) *MockMFAChallengeRepo_Consume_Call
- func (_c *MockMFAChallengeRepo_Consume_Call) Run(run func(ctx context.Context, id int)) *MockMFAChallengeRepo_Consume_Call
- func (_c *MockMFAChallengeRepo_Consume_Call) RunAndReturn(run func(ctx context.Context, id int) (bool, error)) *MockMFAChallengeRepo_Consume_Call
- type MockMFAChallengeRepo_Create_Call
- func (_c *MockMFAChallengeRepo_Create_Call) Return(err error) *MockMFAChallengeRepo_Create_Call
- func (_c *MockMFAChallengeRepo_Create_Call) Run(run func(ctx context.Context, challenge *auth.MFAChallenge)) *MockMFAChallengeRepo_Create_Call
- func (_c *MockMFAChallengeRepo_Create_Call) RunAndReturn(run func(ctx context.Context, challenge *auth.MFAChallenge) error) *MockMFAChallengeRepo_Create_Call
- type MockMFAChallengeRepo_DeleteExpired_Call
- func (_c *MockMFAChallengeRepo_DeleteExpired_Call) Return(err error) *MockMFAChallengeRepo_DeleteExpired_Call
- func (_c *MockMFAChallengeRepo_DeleteExpired_Call) Run(run func(ctx context.Context)) *MockMFAChallengeRepo_DeleteExpired_Call
- func (_c *MockMFAChallengeRepo_DeleteExpired_Call) RunAndReturn(run func(ctx context.Context) error) *MockMFAChallengeRepo_DeleteExpired_Call
- type MockMFAChallengeRepo_DeleteUserChallenges_Call
- func (_c *MockMFAChallengeRepo_DeleteUserChallenges_Call) Return(err error) *MockMFAChallengeRepo_DeleteUserChallenges_Call
- func (_c *MockMFAChallengeRepo_DeleteUserChallenges_Call) Run(run func(ctx context.Context, userID int)) *MockMFAChallengeRepo_DeleteUserChallenges_Call
- func (_c *MockMFAChallengeRepo_DeleteUserChallenges_Call) RunAndReturn(run func(ctx context.Context, userID int) error) *MockMFAChallengeRepo_DeleteUserChallenges_Call
- type MockMFAChallengeRepo_Delete_Call
- func (_c *MockMFAChallengeRepo_Delete_Call) Return(err error) *MockMFAChallengeRepo_Delete_Call
- func (_c *MockMFAChallengeRepo_Delete_Call) Run(run func(ctx context.Context, id int)) *MockMFAChallengeRepo_Delete_Call
- func (_c *MockMFAChallengeRepo_Delete_Call) RunAndReturn(run func(ctx context.Context, id int) error) *MockMFAChallengeRepo_Delete_Call
- type MockMFAChallengeRepo_Expecter
- func (_e *MockMFAChallengeRepo_Expecter) Consume(ctx any, id any) *MockMFAChallengeRepo_Consume_Call
- func (_e *MockMFAChallengeRepo_Expecter) Create(ctx any, challenge any) *MockMFAChallengeRepo_Create_Call
- func (_e *MockMFAChallengeRepo_Expecter) Delete(ctx any, id any) *MockMFAChallengeRepo_Delete_Call
- func (_e *MockMFAChallengeRepo_Expecter) DeleteExpired(ctx any) *MockMFAChallengeRepo_DeleteExpired_Call
- func (_e *MockMFAChallengeRepo_Expecter) DeleteUserChallenges(ctx any, userID any) *MockMFAChallengeRepo_DeleteUserChallenges_Call
- func (_e *MockMFAChallengeRepo_Expecter) FindByTokenHash(ctx any, tokenHash any) *MockMFAChallengeRepo_FindByTokenHash_Call
- func (_e *MockMFAChallengeRepo_Expecter) IncrementAttempts(ctx any, id any, maxAttempts any) *MockMFAChallengeRepo_IncrementAttempts_Call
- type MockMFAChallengeRepo_FindByTokenHash_Call
- func (_c *MockMFAChallengeRepo_FindByTokenHash_Call) Return(mFAChallenge *auth.MFAChallenge, err error) *MockMFAChallengeRepo_FindByTokenHash_Call
- func (_c *MockMFAChallengeRepo_FindByTokenHash_Call) Run(run func(ctx context.Context, tokenHash string)) *MockMFAChallengeRepo_FindByTokenHash_Call
- func (_c *MockMFAChallengeRepo_FindByTokenHash_Call) RunAndReturn(run func(ctx context.Context, tokenHash string) (*auth.MFAChallenge, error)) *MockMFAChallengeRepo_FindByTokenHash_Call
- type MockMFAChallengeRepo_IncrementAttempts_Call
- func (_c *MockMFAChallengeRepo_IncrementAttempts_Call) Return(b bool, err error) *MockMFAChallengeRepo_IncrementAttempts_Call
- func (_c *MockMFAChallengeRepo_IncrementAttempts_Call) Run(run func(ctx context.Context, id int, maxAttempts int)) *MockMFAChallengeRepo_IncrementAttempts_Call
- func (_c *MockMFAChallengeRepo_IncrementAttempts_Call) RunAndReturn(run func(ctx context.Context, id int, maxAttempts int) (bool, error)) *MockMFAChallengeRepo_IncrementAttempts_Call
- type MockPasswordResetTokenRepo
- func (_mock *MockPasswordResetTokenRepo) CreateToken(ctx context.Context, token *auth.PasswordResetToken) error
- func (_mock *MockPasswordResetTokenRepo) DeleteUserTokens(ctx context.Context, userID int) error
- func (_m *MockPasswordResetTokenRepo) EXPECT() *MockPasswordResetTokenRepo_Expecter
- func (_mock *MockPasswordResetTokenRepo) FindValidToken(ctx context.Context, tokenHash string) (*auth.PasswordResetToken, error)
- type MockPasswordResetTokenRepo_CreateToken_Call
- func (_c *MockPasswordResetTokenRepo_CreateToken_Call) Return(err error) *MockPasswordResetTokenRepo_CreateToken_Call
- func (_c *MockPasswordResetTokenRepo_CreateToken_Call) Run(run func(ctx context.Context, token *auth.PasswordResetToken)) *MockPasswordResetTokenRepo_CreateToken_Call
- func (_c *MockPasswordResetTokenRepo_CreateToken_Call) RunAndReturn(run func(ctx context.Context, token *auth.PasswordResetToken) error) *MockPasswordResetTokenRepo_CreateToken_Call
- type MockPasswordResetTokenRepo_DeleteUserTokens_Call
- func (_c *MockPasswordResetTokenRepo_DeleteUserTokens_Call) Return(err error) *MockPasswordResetTokenRepo_DeleteUserTokens_Call
- func (_c *MockPasswordResetTokenRepo_DeleteUserTokens_Call) Run(run func(ctx context.Context, userID int)) *MockPasswordResetTokenRepo_DeleteUserTokens_Call
- func (_c *MockPasswordResetTokenRepo_DeleteUserTokens_Call) RunAndReturn(run func(ctx context.Context, userID int) error) *MockPasswordResetTokenRepo_DeleteUserTokens_Call
- type MockPasswordResetTokenRepo_Expecter
- func (_e *MockPasswordResetTokenRepo_Expecter) CreateToken(ctx any, token any) *MockPasswordResetTokenRepo_CreateToken_Call
- func (_e *MockPasswordResetTokenRepo_Expecter) DeleteUserTokens(ctx any, userID any) *MockPasswordResetTokenRepo_DeleteUserTokens_Call
- func (_e *MockPasswordResetTokenRepo_Expecter) FindValidToken(ctx any, tokenHash any) *MockPasswordResetTokenRepo_FindValidToken_Call
- type MockPasswordResetTokenRepo_FindValidToken_Call
- func (_c *MockPasswordResetTokenRepo_FindValidToken_Call) Return(passwordResetToken *auth.PasswordResetToken, err error) *MockPasswordResetTokenRepo_FindValidToken_Call
- func (_c *MockPasswordResetTokenRepo_FindValidToken_Call) Run(run func(ctx context.Context, tokenHash string)) *MockPasswordResetTokenRepo_FindValidToken_Call
- func (_c *MockPasswordResetTokenRepo_FindValidToken_Call) RunAndReturn(...) *MockPasswordResetTokenRepo_FindValidToken_Call
- type MockVerificationTokenRepo
- func (_mock *MockVerificationTokenRepo) CreateToken(ctx context.Context, token *auth.VerificationToken) error
- func (_mock *MockVerificationTokenRepo) DeleteExpiredTokens(ctx context.Context) error
- func (_mock *MockVerificationTokenRepo) DeleteUserTokens(ctx context.Context, userID int) error
- func (_m *MockVerificationTokenRepo) EXPECT() *MockVerificationTokenRepo_Expecter
- func (_mock *MockVerificationTokenRepo) FindValidToken(ctx context.Context, tokenHash string) (*auth.VerificationToken, error)
- type MockVerificationTokenRepo_CreateToken_Call
- func (_c *MockVerificationTokenRepo_CreateToken_Call) Return(err error) *MockVerificationTokenRepo_CreateToken_Call
- func (_c *MockVerificationTokenRepo_CreateToken_Call) Run(run func(ctx context.Context, token *auth.VerificationToken)) *MockVerificationTokenRepo_CreateToken_Call
- func (_c *MockVerificationTokenRepo_CreateToken_Call) RunAndReturn(run func(ctx context.Context, token *auth.VerificationToken) error) *MockVerificationTokenRepo_CreateToken_Call
- type MockVerificationTokenRepo_DeleteExpiredTokens_Call
- func (_c *MockVerificationTokenRepo_DeleteExpiredTokens_Call) Return(err error) *MockVerificationTokenRepo_DeleteExpiredTokens_Call
- func (_c *MockVerificationTokenRepo_DeleteExpiredTokens_Call) Run(run func(ctx context.Context)) *MockVerificationTokenRepo_DeleteExpiredTokens_Call
- func (_c *MockVerificationTokenRepo_DeleteExpiredTokens_Call) RunAndReturn(run func(ctx context.Context) error) *MockVerificationTokenRepo_DeleteExpiredTokens_Call
- type MockVerificationTokenRepo_DeleteUserTokens_Call
- func (_c *MockVerificationTokenRepo_DeleteUserTokens_Call) Return(err error) *MockVerificationTokenRepo_DeleteUserTokens_Call
- func (_c *MockVerificationTokenRepo_DeleteUserTokens_Call) Run(run func(ctx context.Context, userID int)) *MockVerificationTokenRepo_DeleteUserTokens_Call
- func (_c *MockVerificationTokenRepo_DeleteUserTokens_Call) RunAndReturn(run func(ctx context.Context, userID int) error) *MockVerificationTokenRepo_DeleteUserTokens_Call
- type MockVerificationTokenRepo_Expecter
- func (_e *MockVerificationTokenRepo_Expecter) CreateToken(ctx any, token any) *MockVerificationTokenRepo_CreateToken_Call
- func (_e *MockVerificationTokenRepo_Expecter) DeleteExpiredTokens(ctx any) *MockVerificationTokenRepo_DeleteExpiredTokens_Call
- func (_e *MockVerificationTokenRepo_Expecter) DeleteUserTokens(ctx any, userID any) *MockVerificationTokenRepo_DeleteUserTokens_Call
- func (_e *MockVerificationTokenRepo_Expecter) FindValidToken(ctx any, tokenHash any) *MockVerificationTokenRepo_FindValidToken_Call
- type MockVerificationTokenRepo_FindValidToken_Call
- func (_c *MockVerificationTokenRepo_FindValidToken_Call) Return(verificationToken *auth.VerificationToken, err error) *MockVerificationTokenRepo_FindValidToken_Call
- func (_c *MockVerificationTokenRepo_FindValidToken_Call) Run(run func(ctx context.Context, tokenHash string)) *MockVerificationTokenRepo_FindValidToken_Call
- func (_c *MockVerificationTokenRepo_FindValidToken_Call) RunAndReturn(...) *MockVerificationTokenRepo_FindValidToken_Call
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type MockCredentialPolicy ¶
MockCredentialPolicy is an autogenerated mock type for the CredentialPolicy type
func NewMockCredentialPolicy ¶
func NewMockCredentialPolicy(t interface {
mock.TestingT
Cleanup(func())
}) *MockCredentialPolicy
NewMockCredentialPolicy creates a new instance of MockCredentialPolicy. 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 (*MockCredentialPolicy) EXPECT ¶
func (_m *MockCredentialPolicy) EXPECT() *MockCredentialPolicy_Expecter
func (*MockCredentialPolicy) GeneratePassword ¶
func (_mock *MockCredentialPolicy) GeneratePassword(length int) (string, error)
GeneratePassword provides a mock function for the type MockCredentialPolicy
func (*MockCredentialPolicy) HashPassword ¶
func (_mock *MockCredentialPolicy) HashPassword(password string) (string, error)
HashPassword provides a mock function for the type MockCredentialPolicy
func (*MockCredentialPolicy) NeedsRehash ¶
func (_mock *MockCredentialPolicy) NeedsRehash(hash string) bool
NeedsRehash provides a mock function for the type MockCredentialPolicy
func (*MockCredentialPolicy) ValidateEmail ¶
func (_mock *MockCredentialPolicy) ValidateEmail(email string) error
ValidateEmail provides a mock function for the type MockCredentialPolicy
func (*MockCredentialPolicy) ValidatePassword ¶
func (_mock *MockCredentialPolicy) ValidatePassword(password string) error
ValidatePassword provides a mock function for the type MockCredentialPolicy
func (*MockCredentialPolicy) ValidateUsername ¶
func (_mock *MockCredentialPolicy) ValidateUsername(username string) error
ValidateUsername provides a mock function for the type MockCredentialPolicy
func (*MockCredentialPolicy) VerifyPassword ¶
func (_mock *MockCredentialPolicy) VerifyPassword(hash string, password string) error
VerifyPassword provides a mock function for the type MockCredentialPolicy
type MockCredentialPolicy_Expecter ¶
type MockCredentialPolicy_Expecter struct {
// contains filtered or unexported fields
}
func (*MockCredentialPolicy_Expecter) GeneratePassword ¶
func (_e *MockCredentialPolicy_Expecter) GeneratePassword(length any) *MockCredentialPolicy_GeneratePassword_Call
GeneratePassword is a helper method to define mock.On call
- length int
func (*MockCredentialPolicy_Expecter) HashPassword ¶
func (_e *MockCredentialPolicy_Expecter) HashPassword(password any) *MockCredentialPolicy_HashPassword_Call
HashPassword is a helper method to define mock.On call
- password string
func (*MockCredentialPolicy_Expecter) NeedsRehash ¶
func (_e *MockCredentialPolicy_Expecter) NeedsRehash(hash any) *MockCredentialPolicy_NeedsRehash_Call
NeedsRehash is a helper method to define mock.On call
- hash string
func (*MockCredentialPolicy_Expecter) ValidateEmail ¶
func (_e *MockCredentialPolicy_Expecter) ValidateEmail(email any) *MockCredentialPolicy_ValidateEmail_Call
ValidateEmail is a helper method to define mock.On call
- email string
func (*MockCredentialPolicy_Expecter) ValidatePassword ¶
func (_e *MockCredentialPolicy_Expecter) ValidatePassword(password any) *MockCredentialPolicy_ValidatePassword_Call
ValidatePassword is a helper method to define mock.On call
- password string
func (*MockCredentialPolicy_Expecter) ValidateUsername ¶
func (_e *MockCredentialPolicy_Expecter) ValidateUsername(username any) *MockCredentialPolicy_ValidateUsername_Call
ValidateUsername is a helper method to define mock.On call
- username string
func (*MockCredentialPolicy_Expecter) VerifyPassword ¶
func (_e *MockCredentialPolicy_Expecter) VerifyPassword(hash any, password any) *MockCredentialPolicy_VerifyPassword_Call
VerifyPassword is a helper method to define mock.On call
- hash string
- password string
type MockCredentialPolicy_GeneratePassword_Call ¶
MockCredentialPolicy_GeneratePassword_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'GeneratePassword'
func (*MockCredentialPolicy_GeneratePassword_Call) Return ¶
func (_c *MockCredentialPolicy_GeneratePassword_Call) Return(s string, err error) *MockCredentialPolicy_GeneratePassword_Call
func (*MockCredentialPolicy_GeneratePassword_Call) Run ¶
func (_c *MockCredentialPolicy_GeneratePassword_Call) Run(run func(length int)) *MockCredentialPolicy_GeneratePassword_Call
func (*MockCredentialPolicy_GeneratePassword_Call) RunAndReturn ¶
func (_c *MockCredentialPolicy_GeneratePassword_Call) RunAndReturn(run func(length int) (string, error)) *MockCredentialPolicy_GeneratePassword_Call
type MockCredentialPolicy_HashPassword_Call ¶
MockCredentialPolicy_HashPassword_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'HashPassword'
func (*MockCredentialPolicy_HashPassword_Call) Return ¶
func (_c *MockCredentialPolicy_HashPassword_Call) Return(s string, err error) *MockCredentialPolicy_HashPassword_Call
func (*MockCredentialPolicy_HashPassword_Call) Run ¶
func (_c *MockCredentialPolicy_HashPassword_Call) Run(run func(password string)) *MockCredentialPolicy_HashPassword_Call
func (*MockCredentialPolicy_HashPassword_Call) RunAndReturn ¶
func (_c *MockCredentialPolicy_HashPassword_Call) RunAndReturn(run func(password string) (string, error)) *MockCredentialPolicy_HashPassword_Call
type MockCredentialPolicy_NeedsRehash_Call ¶
MockCredentialPolicy_NeedsRehash_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'NeedsRehash'
func (*MockCredentialPolicy_NeedsRehash_Call) Return ¶
func (_c *MockCredentialPolicy_NeedsRehash_Call) Return(b bool) *MockCredentialPolicy_NeedsRehash_Call
func (*MockCredentialPolicy_NeedsRehash_Call) Run ¶
func (_c *MockCredentialPolicy_NeedsRehash_Call) Run(run func(hash string)) *MockCredentialPolicy_NeedsRehash_Call
func (*MockCredentialPolicy_NeedsRehash_Call) RunAndReturn ¶
func (_c *MockCredentialPolicy_NeedsRehash_Call) RunAndReturn(run func(hash string) bool) *MockCredentialPolicy_NeedsRehash_Call
type MockCredentialPolicy_ValidateEmail_Call ¶
MockCredentialPolicy_ValidateEmail_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'ValidateEmail'
func (*MockCredentialPolicy_ValidateEmail_Call) Return ¶
func (_c *MockCredentialPolicy_ValidateEmail_Call) Return(err error) *MockCredentialPolicy_ValidateEmail_Call
func (*MockCredentialPolicy_ValidateEmail_Call) Run ¶
func (_c *MockCredentialPolicy_ValidateEmail_Call) Run(run func(email string)) *MockCredentialPolicy_ValidateEmail_Call
func (*MockCredentialPolicy_ValidateEmail_Call) RunAndReturn ¶
func (_c *MockCredentialPolicy_ValidateEmail_Call) RunAndReturn(run func(email string) error) *MockCredentialPolicy_ValidateEmail_Call
type MockCredentialPolicy_ValidatePassword_Call ¶
MockCredentialPolicy_ValidatePassword_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'ValidatePassword'
func (*MockCredentialPolicy_ValidatePassword_Call) Return ¶
func (_c *MockCredentialPolicy_ValidatePassword_Call) Return(err error) *MockCredentialPolicy_ValidatePassword_Call
func (*MockCredentialPolicy_ValidatePassword_Call) Run ¶
func (_c *MockCredentialPolicy_ValidatePassword_Call) Run(run func(password string)) *MockCredentialPolicy_ValidatePassword_Call
func (*MockCredentialPolicy_ValidatePassword_Call) RunAndReturn ¶
func (_c *MockCredentialPolicy_ValidatePassword_Call) RunAndReturn(run func(password string) error) *MockCredentialPolicy_ValidatePassword_Call
type MockCredentialPolicy_ValidateUsername_Call ¶
MockCredentialPolicy_ValidateUsername_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'ValidateUsername'
func (*MockCredentialPolicy_ValidateUsername_Call) Return ¶
func (_c *MockCredentialPolicy_ValidateUsername_Call) Return(err error) *MockCredentialPolicy_ValidateUsername_Call
func (*MockCredentialPolicy_ValidateUsername_Call) Run ¶
func (_c *MockCredentialPolicy_ValidateUsername_Call) Run(run func(username string)) *MockCredentialPolicy_ValidateUsername_Call
func (*MockCredentialPolicy_ValidateUsername_Call) RunAndReturn ¶
func (_c *MockCredentialPolicy_ValidateUsername_Call) RunAndReturn(run func(username string) error) *MockCredentialPolicy_ValidateUsername_Call
type MockCredentialPolicy_VerifyPassword_Call ¶
MockCredentialPolicy_VerifyPassword_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'VerifyPassword'
func (*MockCredentialPolicy_VerifyPassword_Call) Return ¶
func (_c *MockCredentialPolicy_VerifyPassword_Call) Return(err error) *MockCredentialPolicy_VerifyPassword_Call
func (*MockCredentialPolicy_VerifyPassword_Call) Run ¶
func (_c *MockCredentialPolicy_VerifyPassword_Call) Run(run func(hash string, password string)) *MockCredentialPolicy_VerifyPassword_Call
func (*MockCredentialPolicy_VerifyPassword_Call) RunAndReturn ¶
func (_c *MockCredentialPolicy_VerifyPassword_Call) RunAndReturn(run func(hash string, password string) error) *MockCredentialPolicy_VerifyPassword_Call
type MockFailedLoginAttemptRepo ¶
MockFailedLoginAttemptRepo is an autogenerated mock type for the FailedLoginAttemptRepo type
func NewMockFailedLoginAttemptRepo ¶
func NewMockFailedLoginAttemptRepo(t interface {
mock.TestingT
Cleanup(func())
}) *MockFailedLoginAttemptRepo
NewMockFailedLoginAttemptRepo creates a new instance of MockFailedLoginAttemptRepo. 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 (*MockFailedLoginAttemptRepo) Create ¶
func (_mock *MockFailedLoginAttemptRepo) Create(ctx context.Context, attempt *auth.FailedLoginAttempt) error
Create provides a mock function for the type MockFailedLoginAttemptRepo
func (*MockFailedLoginAttemptRepo) Delete ¶
func (_mock *MockFailedLoginAttemptRepo) Delete(ctx context.Context, userID int) error
Delete provides a mock function for the type MockFailedLoginAttemptRepo
func (*MockFailedLoginAttemptRepo) EXPECT ¶
func (_m *MockFailedLoginAttemptRepo) EXPECT() *MockFailedLoginAttemptRepo_Expecter
func (*MockFailedLoginAttemptRepo) GetByUserID ¶
func (_mock *MockFailedLoginAttemptRepo) GetByUserID(ctx context.Context, userID int) (*auth.FailedLoginAttempt, error)
GetByUserID provides a mock function for the type MockFailedLoginAttemptRepo
func (*MockFailedLoginAttemptRepo) IncrementAttempts ¶
func (_mock *MockFailedLoginAttemptRepo) IncrementAttempts(ctx context.Context, userID int) error
IncrementAttempts provides a mock function for the type MockFailedLoginAttemptRepo
func (*MockFailedLoginAttemptRepo) IsLocked ¶
func (_mock *MockFailedLoginAttemptRepo) IsLocked(ctx context.Context, userID int) (bool, *time.Time, error)
IsLocked provides a mock function for the type MockFailedLoginAttemptRepo
func (*MockFailedLoginAttemptRepo) LockAccount ¶
func (_mock *MockFailedLoginAttemptRepo) LockAccount(ctx context.Context, userID int, lockoutDuration time.Duration) error
LockAccount provides a mock function for the type MockFailedLoginAttemptRepo
func (*MockFailedLoginAttemptRepo) ResetAttempts ¶
func (_mock *MockFailedLoginAttemptRepo) ResetAttempts(ctx context.Context, userID int) error
ResetAttempts provides a mock function for the type MockFailedLoginAttemptRepo
func (*MockFailedLoginAttemptRepo) ShouldSendLockoutEmail ¶
func (_mock *MockFailedLoginAttemptRepo) ShouldSendLockoutEmail(ctx context.Context, userID int, minInterval time.Duration) (bool, error)
ShouldSendLockoutEmail provides a mock function for the type MockFailedLoginAttemptRepo
func (*MockFailedLoginAttemptRepo) UpdateLastEmailSent ¶
func (_mock *MockFailedLoginAttemptRepo) UpdateLastEmailSent(ctx context.Context, userID int) error
UpdateLastEmailSent provides a mock function for the type MockFailedLoginAttemptRepo
type MockFailedLoginAttemptRepo_Create_Call ¶
MockFailedLoginAttemptRepo_Create_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'Create'
func (*MockFailedLoginAttemptRepo_Create_Call) Return ¶
func (_c *MockFailedLoginAttemptRepo_Create_Call) Return(err error) *MockFailedLoginAttemptRepo_Create_Call
func (*MockFailedLoginAttemptRepo_Create_Call) Run ¶
func (_c *MockFailedLoginAttemptRepo_Create_Call) Run(run func(ctx context.Context, attempt *auth.FailedLoginAttempt)) *MockFailedLoginAttemptRepo_Create_Call
func (*MockFailedLoginAttemptRepo_Create_Call) RunAndReturn ¶
func (_c *MockFailedLoginAttemptRepo_Create_Call) RunAndReturn(run func(ctx context.Context, attempt *auth.FailedLoginAttempt) error) *MockFailedLoginAttemptRepo_Create_Call
type MockFailedLoginAttemptRepo_Delete_Call ¶
MockFailedLoginAttemptRepo_Delete_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'Delete'
func (*MockFailedLoginAttemptRepo_Delete_Call) Return ¶
func (_c *MockFailedLoginAttemptRepo_Delete_Call) Return(err error) *MockFailedLoginAttemptRepo_Delete_Call
func (*MockFailedLoginAttemptRepo_Delete_Call) Run ¶
func (_c *MockFailedLoginAttemptRepo_Delete_Call) Run(run func(ctx context.Context, userID int)) *MockFailedLoginAttemptRepo_Delete_Call
func (*MockFailedLoginAttemptRepo_Delete_Call) RunAndReturn ¶
func (_c *MockFailedLoginAttemptRepo_Delete_Call) RunAndReturn(run func(ctx context.Context, userID int) error) *MockFailedLoginAttemptRepo_Delete_Call
type MockFailedLoginAttemptRepo_Expecter ¶
type MockFailedLoginAttemptRepo_Expecter struct {
// contains filtered or unexported fields
}
func (*MockFailedLoginAttemptRepo_Expecter) Create ¶
func (_e *MockFailedLoginAttemptRepo_Expecter) Create(ctx any, attempt any) *MockFailedLoginAttemptRepo_Create_Call
Create is a helper method to define mock.On call
- ctx context.Context
- attempt *auth.FailedLoginAttempt
func (*MockFailedLoginAttemptRepo_Expecter) Delete ¶
func (_e *MockFailedLoginAttemptRepo_Expecter) Delete(ctx any, userID any) *MockFailedLoginAttemptRepo_Delete_Call
Delete is a helper method to define mock.On call
- ctx context.Context
- userID int
func (*MockFailedLoginAttemptRepo_Expecter) GetByUserID ¶
func (_e *MockFailedLoginAttemptRepo_Expecter) GetByUserID(ctx any, userID any) *MockFailedLoginAttemptRepo_GetByUserID_Call
GetByUserID is a helper method to define mock.On call
- ctx context.Context
- userID int
func (*MockFailedLoginAttemptRepo_Expecter) IncrementAttempts ¶
func (_e *MockFailedLoginAttemptRepo_Expecter) IncrementAttempts(ctx any, userID any) *MockFailedLoginAttemptRepo_IncrementAttempts_Call
IncrementAttempts is a helper method to define mock.On call
- ctx context.Context
- userID int
func (*MockFailedLoginAttemptRepo_Expecter) IsLocked ¶
func (_e *MockFailedLoginAttemptRepo_Expecter) IsLocked(ctx any, userID any) *MockFailedLoginAttemptRepo_IsLocked_Call
IsLocked is a helper method to define mock.On call
- ctx context.Context
- userID int
func (*MockFailedLoginAttemptRepo_Expecter) LockAccount ¶
func (_e *MockFailedLoginAttemptRepo_Expecter) LockAccount(ctx any, userID any, lockoutDuration any) *MockFailedLoginAttemptRepo_LockAccount_Call
LockAccount is a helper method to define mock.On call
- ctx context.Context
- userID int
- lockoutDuration time.Duration
func (*MockFailedLoginAttemptRepo_Expecter) ResetAttempts ¶
func (_e *MockFailedLoginAttemptRepo_Expecter) ResetAttempts(ctx any, userID any) *MockFailedLoginAttemptRepo_ResetAttempts_Call
ResetAttempts is a helper method to define mock.On call
- ctx context.Context
- userID int
func (*MockFailedLoginAttemptRepo_Expecter) ShouldSendLockoutEmail ¶
func (_e *MockFailedLoginAttemptRepo_Expecter) ShouldSendLockoutEmail(ctx any, userID any, minInterval any) *MockFailedLoginAttemptRepo_ShouldSendLockoutEmail_Call
ShouldSendLockoutEmail is a helper method to define mock.On call
- ctx context.Context
- userID int
- minInterval time.Duration
func (*MockFailedLoginAttemptRepo_Expecter) UpdateLastEmailSent ¶
func (_e *MockFailedLoginAttemptRepo_Expecter) UpdateLastEmailSent(ctx any, userID any) *MockFailedLoginAttemptRepo_UpdateLastEmailSent_Call
UpdateLastEmailSent is a helper method to define mock.On call
- ctx context.Context
- userID int
type MockFailedLoginAttemptRepo_GetByUserID_Call ¶
MockFailedLoginAttemptRepo_GetByUserID_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'GetByUserID'
func (*MockFailedLoginAttemptRepo_GetByUserID_Call) Return ¶
func (_c *MockFailedLoginAttemptRepo_GetByUserID_Call) Return(failedLoginAttempt *auth.FailedLoginAttempt, err error) *MockFailedLoginAttemptRepo_GetByUserID_Call
func (*MockFailedLoginAttemptRepo_GetByUserID_Call) Run ¶
func (_c *MockFailedLoginAttemptRepo_GetByUserID_Call) Run(run func(ctx context.Context, userID int)) *MockFailedLoginAttemptRepo_GetByUserID_Call
func (*MockFailedLoginAttemptRepo_GetByUserID_Call) RunAndReturn ¶
func (_c *MockFailedLoginAttemptRepo_GetByUserID_Call) RunAndReturn(run func(ctx context.Context, userID int) (*auth.FailedLoginAttempt, error)) *MockFailedLoginAttemptRepo_GetByUserID_Call
type MockFailedLoginAttemptRepo_IncrementAttempts_Call ¶
MockFailedLoginAttemptRepo_IncrementAttempts_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'IncrementAttempts'
func (*MockFailedLoginAttemptRepo_IncrementAttempts_Call) Return ¶
func (_c *MockFailedLoginAttemptRepo_IncrementAttempts_Call) Return(err error) *MockFailedLoginAttemptRepo_IncrementAttempts_Call
func (*MockFailedLoginAttemptRepo_IncrementAttempts_Call) Run ¶
func (_c *MockFailedLoginAttemptRepo_IncrementAttempts_Call) Run(run func(ctx context.Context, userID int)) *MockFailedLoginAttemptRepo_IncrementAttempts_Call
func (*MockFailedLoginAttemptRepo_IncrementAttempts_Call) RunAndReturn ¶
func (_c *MockFailedLoginAttemptRepo_IncrementAttempts_Call) RunAndReturn(run func(ctx context.Context, userID int) error) *MockFailedLoginAttemptRepo_IncrementAttempts_Call
type MockFailedLoginAttemptRepo_IsLocked_Call ¶
MockFailedLoginAttemptRepo_IsLocked_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'IsLocked'
func (*MockFailedLoginAttemptRepo_IsLocked_Call) Return ¶
func (_c *MockFailedLoginAttemptRepo_IsLocked_Call) Return(b bool, time1 *time.Time, err error) *MockFailedLoginAttemptRepo_IsLocked_Call
func (*MockFailedLoginAttemptRepo_IsLocked_Call) Run ¶
func (_c *MockFailedLoginAttemptRepo_IsLocked_Call) Run(run func(ctx context.Context, userID int)) *MockFailedLoginAttemptRepo_IsLocked_Call
func (*MockFailedLoginAttemptRepo_IsLocked_Call) RunAndReturn ¶
func (_c *MockFailedLoginAttemptRepo_IsLocked_Call) RunAndReturn(run func(ctx context.Context, userID int) (bool, *time.Time, error)) *MockFailedLoginAttemptRepo_IsLocked_Call
type MockFailedLoginAttemptRepo_LockAccount_Call ¶
MockFailedLoginAttemptRepo_LockAccount_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'LockAccount'
func (*MockFailedLoginAttemptRepo_LockAccount_Call) Return ¶
func (_c *MockFailedLoginAttemptRepo_LockAccount_Call) Return(err error) *MockFailedLoginAttemptRepo_LockAccount_Call
func (*MockFailedLoginAttemptRepo_LockAccount_Call) Run ¶
func (_c *MockFailedLoginAttemptRepo_LockAccount_Call) Run(run func(ctx context.Context, userID int, lockoutDuration time.Duration)) *MockFailedLoginAttemptRepo_LockAccount_Call
func (*MockFailedLoginAttemptRepo_LockAccount_Call) RunAndReturn ¶
func (_c *MockFailedLoginAttemptRepo_LockAccount_Call) RunAndReturn(run func(ctx context.Context, userID int, lockoutDuration time.Duration) error) *MockFailedLoginAttemptRepo_LockAccount_Call
type MockFailedLoginAttemptRepo_ResetAttempts_Call ¶
MockFailedLoginAttemptRepo_ResetAttempts_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'ResetAttempts'
func (*MockFailedLoginAttemptRepo_ResetAttempts_Call) Return ¶
func (_c *MockFailedLoginAttemptRepo_ResetAttempts_Call) Return(err error) *MockFailedLoginAttemptRepo_ResetAttempts_Call
func (*MockFailedLoginAttemptRepo_ResetAttempts_Call) Run ¶
func (_c *MockFailedLoginAttemptRepo_ResetAttempts_Call) Run(run func(ctx context.Context, userID int)) *MockFailedLoginAttemptRepo_ResetAttempts_Call
func (*MockFailedLoginAttemptRepo_ResetAttempts_Call) RunAndReturn ¶
func (_c *MockFailedLoginAttemptRepo_ResetAttempts_Call) RunAndReturn(run func(ctx context.Context, userID int) error) *MockFailedLoginAttemptRepo_ResetAttempts_Call
type MockFailedLoginAttemptRepo_ShouldSendLockoutEmail_Call ¶
MockFailedLoginAttemptRepo_ShouldSendLockoutEmail_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'ShouldSendLockoutEmail'
func (*MockFailedLoginAttemptRepo_ShouldSendLockoutEmail_Call) Return ¶
func (_c *MockFailedLoginAttemptRepo_ShouldSendLockoutEmail_Call) Return(b bool, err error) *MockFailedLoginAttemptRepo_ShouldSendLockoutEmail_Call
func (*MockFailedLoginAttemptRepo_ShouldSendLockoutEmail_Call) Run ¶
func (_c *MockFailedLoginAttemptRepo_ShouldSendLockoutEmail_Call) Run(run func(ctx context.Context, userID int, minInterval time.Duration)) *MockFailedLoginAttemptRepo_ShouldSendLockoutEmail_Call
func (*MockFailedLoginAttemptRepo_ShouldSendLockoutEmail_Call) RunAndReturn ¶
func (_c *MockFailedLoginAttemptRepo_ShouldSendLockoutEmail_Call) RunAndReturn(run func(ctx context.Context, userID int, minInterval time.Duration) (bool, error)) *MockFailedLoginAttemptRepo_ShouldSendLockoutEmail_Call
type MockFailedLoginAttemptRepo_UpdateLastEmailSent_Call ¶
MockFailedLoginAttemptRepo_UpdateLastEmailSent_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'UpdateLastEmailSent'
func (*MockFailedLoginAttemptRepo_UpdateLastEmailSent_Call) Run ¶
func (_c *MockFailedLoginAttemptRepo_UpdateLastEmailSent_Call) Run(run func(ctx context.Context, userID int)) *MockFailedLoginAttemptRepo_UpdateLastEmailSent_Call
func (*MockFailedLoginAttemptRepo_UpdateLastEmailSent_Call) RunAndReturn ¶
func (_c *MockFailedLoginAttemptRepo_UpdateLastEmailSent_Call) RunAndReturn(run func(ctx context.Context, userID int) error) *MockFailedLoginAttemptRepo_UpdateLastEmailSent_Call
type MockMFAChallengeRepo ¶
MockMFAChallengeRepo is an autogenerated mock type for the MFAChallengeRepo type
func NewMockMFAChallengeRepo ¶
func NewMockMFAChallengeRepo(t interface {
mock.TestingT
Cleanup(func())
}) *MockMFAChallengeRepo
NewMockMFAChallengeRepo creates a new instance of MockMFAChallengeRepo. 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 (*MockMFAChallengeRepo) Consume ¶
Consume provides a mock function for the type MockMFAChallengeRepo
func (*MockMFAChallengeRepo) Create ¶
func (_mock *MockMFAChallengeRepo) Create(ctx context.Context, challenge *auth.MFAChallenge) error
Create provides a mock function for the type MockMFAChallengeRepo
func (*MockMFAChallengeRepo) Delete ¶
func (_mock *MockMFAChallengeRepo) Delete(ctx context.Context, id int) error
Delete provides a mock function for the type MockMFAChallengeRepo
func (*MockMFAChallengeRepo) DeleteExpired ¶
func (_mock *MockMFAChallengeRepo) DeleteExpired(ctx context.Context) error
DeleteExpired provides a mock function for the type MockMFAChallengeRepo
func (*MockMFAChallengeRepo) DeleteUserChallenges ¶
func (_mock *MockMFAChallengeRepo) DeleteUserChallenges(ctx context.Context, userID int) error
DeleteUserChallenges provides a mock function for the type MockMFAChallengeRepo
func (*MockMFAChallengeRepo) EXPECT ¶
func (_m *MockMFAChallengeRepo) EXPECT() *MockMFAChallengeRepo_Expecter
func (*MockMFAChallengeRepo) FindByTokenHash ¶
func (_mock *MockMFAChallengeRepo) FindByTokenHash(ctx context.Context, tokenHash string) (*auth.MFAChallenge, error)
FindByTokenHash provides a mock function for the type MockMFAChallengeRepo
func (*MockMFAChallengeRepo) IncrementAttempts ¶
func (_mock *MockMFAChallengeRepo) IncrementAttempts(ctx context.Context, id int, maxAttempts int) (bool, error)
IncrementAttempts provides a mock function for the type MockMFAChallengeRepo
type MockMFAChallengeRepo_Consume_Call ¶
MockMFAChallengeRepo_Consume_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'Consume'
func (*MockMFAChallengeRepo_Consume_Call) Return ¶
func (_c *MockMFAChallengeRepo_Consume_Call) Return(b bool, err error) *MockMFAChallengeRepo_Consume_Call
func (*MockMFAChallengeRepo_Consume_Call) Run ¶
func (_c *MockMFAChallengeRepo_Consume_Call) Run(run func(ctx context.Context, id int)) *MockMFAChallengeRepo_Consume_Call
func (*MockMFAChallengeRepo_Consume_Call) RunAndReturn ¶
func (_c *MockMFAChallengeRepo_Consume_Call) RunAndReturn(run func(ctx context.Context, id int) (bool, error)) *MockMFAChallengeRepo_Consume_Call
type MockMFAChallengeRepo_Create_Call ¶
MockMFAChallengeRepo_Create_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'Create'
func (*MockMFAChallengeRepo_Create_Call) Return ¶
func (_c *MockMFAChallengeRepo_Create_Call) Return(err error) *MockMFAChallengeRepo_Create_Call
func (*MockMFAChallengeRepo_Create_Call) Run ¶
func (_c *MockMFAChallengeRepo_Create_Call) Run(run func(ctx context.Context, challenge *auth.MFAChallenge)) *MockMFAChallengeRepo_Create_Call
func (*MockMFAChallengeRepo_Create_Call) RunAndReturn ¶
func (_c *MockMFAChallengeRepo_Create_Call) RunAndReturn(run func(ctx context.Context, challenge *auth.MFAChallenge) error) *MockMFAChallengeRepo_Create_Call
type MockMFAChallengeRepo_DeleteExpired_Call ¶
MockMFAChallengeRepo_DeleteExpired_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'DeleteExpired'
func (*MockMFAChallengeRepo_DeleteExpired_Call) Return ¶
func (_c *MockMFAChallengeRepo_DeleteExpired_Call) Return(err error) *MockMFAChallengeRepo_DeleteExpired_Call
func (*MockMFAChallengeRepo_DeleteExpired_Call) Run ¶
func (_c *MockMFAChallengeRepo_DeleteExpired_Call) Run(run func(ctx context.Context)) *MockMFAChallengeRepo_DeleteExpired_Call
func (*MockMFAChallengeRepo_DeleteExpired_Call) RunAndReturn ¶
func (_c *MockMFAChallengeRepo_DeleteExpired_Call) RunAndReturn(run func(ctx context.Context) error) *MockMFAChallengeRepo_DeleteExpired_Call
type MockMFAChallengeRepo_DeleteUserChallenges_Call ¶
MockMFAChallengeRepo_DeleteUserChallenges_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'DeleteUserChallenges'
func (*MockMFAChallengeRepo_DeleteUserChallenges_Call) Return ¶
func (_c *MockMFAChallengeRepo_DeleteUserChallenges_Call) Return(err error) *MockMFAChallengeRepo_DeleteUserChallenges_Call
func (*MockMFAChallengeRepo_DeleteUserChallenges_Call) Run ¶
func (_c *MockMFAChallengeRepo_DeleteUserChallenges_Call) Run(run func(ctx context.Context, userID int)) *MockMFAChallengeRepo_DeleteUserChallenges_Call
func (*MockMFAChallengeRepo_DeleteUserChallenges_Call) RunAndReturn ¶
func (_c *MockMFAChallengeRepo_DeleteUserChallenges_Call) RunAndReturn(run func(ctx context.Context, userID int) error) *MockMFAChallengeRepo_DeleteUserChallenges_Call
type MockMFAChallengeRepo_Delete_Call ¶
MockMFAChallengeRepo_Delete_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'Delete'
func (*MockMFAChallengeRepo_Delete_Call) Return ¶
func (_c *MockMFAChallengeRepo_Delete_Call) Return(err error) *MockMFAChallengeRepo_Delete_Call
func (*MockMFAChallengeRepo_Delete_Call) Run ¶
func (_c *MockMFAChallengeRepo_Delete_Call) Run(run func(ctx context.Context, id int)) *MockMFAChallengeRepo_Delete_Call
func (*MockMFAChallengeRepo_Delete_Call) RunAndReturn ¶
func (_c *MockMFAChallengeRepo_Delete_Call) RunAndReturn(run func(ctx context.Context, id int) error) *MockMFAChallengeRepo_Delete_Call
type MockMFAChallengeRepo_Expecter ¶
type MockMFAChallengeRepo_Expecter struct {
// contains filtered or unexported fields
}
func (*MockMFAChallengeRepo_Expecter) Consume ¶
func (_e *MockMFAChallengeRepo_Expecter) Consume(ctx any, id any) *MockMFAChallengeRepo_Consume_Call
Consume is a helper method to define mock.On call
- ctx context.Context
- id int
func (*MockMFAChallengeRepo_Expecter) Create ¶
func (_e *MockMFAChallengeRepo_Expecter) Create(ctx any, challenge any) *MockMFAChallengeRepo_Create_Call
Create is a helper method to define mock.On call
- ctx context.Context
- challenge *auth.MFAChallenge
func (*MockMFAChallengeRepo_Expecter) Delete ¶
func (_e *MockMFAChallengeRepo_Expecter) Delete(ctx any, id any) *MockMFAChallengeRepo_Delete_Call
Delete is a helper method to define mock.On call
- ctx context.Context
- id int
func (*MockMFAChallengeRepo_Expecter) DeleteExpired ¶
func (_e *MockMFAChallengeRepo_Expecter) DeleteExpired(ctx any) *MockMFAChallengeRepo_DeleteExpired_Call
DeleteExpired is a helper method to define mock.On call
- ctx context.Context
func (*MockMFAChallengeRepo_Expecter) DeleteUserChallenges ¶
func (_e *MockMFAChallengeRepo_Expecter) DeleteUserChallenges(ctx any, userID any) *MockMFAChallengeRepo_DeleteUserChallenges_Call
DeleteUserChallenges is a helper method to define mock.On call
- ctx context.Context
- userID int
func (*MockMFAChallengeRepo_Expecter) FindByTokenHash ¶
func (_e *MockMFAChallengeRepo_Expecter) FindByTokenHash(ctx any, tokenHash any) *MockMFAChallengeRepo_FindByTokenHash_Call
FindByTokenHash is a helper method to define mock.On call
- ctx context.Context
- tokenHash string
func (*MockMFAChallengeRepo_Expecter) IncrementAttempts ¶
func (_e *MockMFAChallengeRepo_Expecter) IncrementAttempts(ctx any, id any, maxAttempts any) *MockMFAChallengeRepo_IncrementAttempts_Call
IncrementAttempts is a helper method to define mock.On call
- ctx context.Context
- id int
- maxAttempts int
type MockMFAChallengeRepo_FindByTokenHash_Call ¶
MockMFAChallengeRepo_FindByTokenHash_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'FindByTokenHash'
func (*MockMFAChallengeRepo_FindByTokenHash_Call) Return ¶
func (_c *MockMFAChallengeRepo_FindByTokenHash_Call) Return(mFAChallenge *auth.MFAChallenge, err error) *MockMFAChallengeRepo_FindByTokenHash_Call
func (*MockMFAChallengeRepo_FindByTokenHash_Call) Run ¶
func (_c *MockMFAChallengeRepo_FindByTokenHash_Call) Run(run func(ctx context.Context, tokenHash string)) *MockMFAChallengeRepo_FindByTokenHash_Call
func (*MockMFAChallengeRepo_FindByTokenHash_Call) RunAndReturn ¶
func (_c *MockMFAChallengeRepo_FindByTokenHash_Call) RunAndReturn(run func(ctx context.Context, tokenHash string) (*auth.MFAChallenge, error)) *MockMFAChallengeRepo_FindByTokenHash_Call
type MockMFAChallengeRepo_IncrementAttempts_Call ¶
MockMFAChallengeRepo_IncrementAttempts_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'IncrementAttempts'
func (*MockMFAChallengeRepo_IncrementAttempts_Call) Return ¶
func (_c *MockMFAChallengeRepo_IncrementAttempts_Call) Return(b bool, err error) *MockMFAChallengeRepo_IncrementAttempts_Call
func (*MockMFAChallengeRepo_IncrementAttempts_Call) Run ¶
func (_c *MockMFAChallengeRepo_IncrementAttempts_Call) Run(run func(ctx context.Context, id int, maxAttempts int)) *MockMFAChallengeRepo_IncrementAttempts_Call
func (*MockMFAChallengeRepo_IncrementAttempts_Call) RunAndReturn ¶
func (_c *MockMFAChallengeRepo_IncrementAttempts_Call) RunAndReturn(run func(ctx context.Context, id int, maxAttempts int) (bool, error)) *MockMFAChallengeRepo_IncrementAttempts_Call
type MockPasswordResetTokenRepo ¶
MockPasswordResetTokenRepo is an autogenerated mock type for the PasswordResetTokenRepo type
func NewMockPasswordResetTokenRepo ¶
func NewMockPasswordResetTokenRepo(t interface {
mock.TestingT
Cleanup(func())
}) *MockPasswordResetTokenRepo
NewMockPasswordResetTokenRepo creates a new instance of MockPasswordResetTokenRepo. 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 (*MockPasswordResetTokenRepo) CreateToken ¶
func (_mock *MockPasswordResetTokenRepo) CreateToken(ctx context.Context, token *auth.PasswordResetToken) error
CreateToken provides a mock function for the type MockPasswordResetTokenRepo
func (*MockPasswordResetTokenRepo) DeleteUserTokens ¶
func (_mock *MockPasswordResetTokenRepo) DeleteUserTokens(ctx context.Context, userID int) error
DeleteUserTokens provides a mock function for the type MockPasswordResetTokenRepo
func (*MockPasswordResetTokenRepo) EXPECT ¶
func (_m *MockPasswordResetTokenRepo) EXPECT() *MockPasswordResetTokenRepo_Expecter
func (*MockPasswordResetTokenRepo) FindValidToken ¶
func (_mock *MockPasswordResetTokenRepo) FindValidToken(ctx context.Context, tokenHash string) (*auth.PasswordResetToken, error)
FindValidToken provides a mock function for the type MockPasswordResetTokenRepo
type MockPasswordResetTokenRepo_CreateToken_Call ¶
MockPasswordResetTokenRepo_CreateToken_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'CreateToken'
func (*MockPasswordResetTokenRepo_CreateToken_Call) Return ¶
func (_c *MockPasswordResetTokenRepo_CreateToken_Call) Return(err error) *MockPasswordResetTokenRepo_CreateToken_Call
func (*MockPasswordResetTokenRepo_CreateToken_Call) Run ¶
func (_c *MockPasswordResetTokenRepo_CreateToken_Call) Run(run func(ctx context.Context, token *auth.PasswordResetToken)) *MockPasswordResetTokenRepo_CreateToken_Call
func (*MockPasswordResetTokenRepo_CreateToken_Call) RunAndReturn ¶
func (_c *MockPasswordResetTokenRepo_CreateToken_Call) RunAndReturn(run func(ctx context.Context, token *auth.PasswordResetToken) error) *MockPasswordResetTokenRepo_CreateToken_Call
type MockPasswordResetTokenRepo_DeleteUserTokens_Call ¶
MockPasswordResetTokenRepo_DeleteUserTokens_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'DeleteUserTokens'
func (*MockPasswordResetTokenRepo_DeleteUserTokens_Call) Return ¶
func (_c *MockPasswordResetTokenRepo_DeleteUserTokens_Call) Return(err error) *MockPasswordResetTokenRepo_DeleteUserTokens_Call
func (*MockPasswordResetTokenRepo_DeleteUserTokens_Call) Run ¶
func (_c *MockPasswordResetTokenRepo_DeleteUserTokens_Call) Run(run func(ctx context.Context, userID int)) *MockPasswordResetTokenRepo_DeleteUserTokens_Call
func (*MockPasswordResetTokenRepo_DeleteUserTokens_Call) RunAndReturn ¶
func (_c *MockPasswordResetTokenRepo_DeleteUserTokens_Call) RunAndReturn(run func(ctx context.Context, userID int) error) *MockPasswordResetTokenRepo_DeleteUserTokens_Call
type MockPasswordResetTokenRepo_Expecter ¶
type MockPasswordResetTokenRepo_Expecter struct {
// contains filtered or unexported fields
}
func (*MockPasswordResetTokenRepo_Expecter) CreateToken ¶
func (_e *MockPasswordResetTokenRepo_Expecter) CreateToken(ctx any, token any) *MockPasswordResetTokenRepo_CreateToken_Call
CreateToken is a helper method to define mock.On call
- ctx context.Context
- token *auth.PasswordResetToken
func (*MockPasswordResetTokenRepo_Expecter) DeleteUserTokens ¶
func (_e *MockPasswordResetTokenRepo_Expecter) DeleteUserTokens(ctx any, userID any) *MockPasswordResetTokenRepo_DeleteUserTokens_Call
DeleteUserTokens is a helper method to define mock.On call
- ctx context.Context
- userID int
func (*MockPasswordResetTokenRepo_Expecter) FindValidToken ¶
func (_e *MockPasswordResetTokenRepo_Expecter) FindValidToken(ctx any, tokenHash any) *MockPasswordResetTokenRepo_FindValidToken_Call
FindValidToken is a helper method to define mock.On call
- ctx context.Context
- tokenHash string
type MockPasswordResetTokenRepo_FindValidToken_Call ¶
MockPasswordResetTokenRepo_FindValidToken_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'FindValidToken'
func (*MockPasswordResetTokenRepo_FindValidToken_Call) Return ¶
func (_c *MockPasswordResetTokenRepo_FindValidToken_Call) Return(passwordResetToken *auth.PasswordResetToken, err error) *MockPasswordResetTokenRepo_FindValidToken_Call
func (*MockPasswordResetTokenRepo_FindValidToken_Call) Run ¶
func (_c *MockPasswordResetTokenRepo_FindValidToken_Call) Run(run func(ctx context.Context, tokenHash string)) *MockPasswordResetTokenRepo_FindValidToken_Call
func (*MockPasswordResetTokenRepo_FindValidToken_Call) RunAndReturn ¶
func (_c *MockPasswordResetTokenRepo_FindValidToken_Call) RunAndReturn(run func(ctx context.Context, tokenHash string) (*auth.PasswordResetToken, error)) *MockPasswordResetTokenRepo_FindValidToken_Call
type MockVerificationTokenRepo ¶
MockVerificationTokenRepo is an autogenerated mock type for the VerificationTokenRepo type
func NewMockVerificationTokenRepo ¶
func NewMockVerificationTokenRepo(t interface {
mock.TestingT
Cleanup(func())
}) *MockVerificationTokenRepo
NewMockVerificationTokenRepo creates a new instance of MockVerificationTokenRepo. 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 (*MockVerificationTokenRepo) CreateToken ¶
func (_mock *MockVerificationTokenRepo) CreateToken(ctx context.Context, token *auth.VerificationToken) error
CreateToken provides a mock function for the type MockVerificationTokenRepo
func (*MockVerificationTokenRepo) DeleteExpiredTokens ¶
func (_mock *MockVerificationTokenRepo) DeleteExpiredTokens(ctx context.Context) error
DeleteExpiredTokens provides a mock function for the type MockVerificationTokenRepo
func (*MockVerificationTokenRepo) DeleteUserTokens ¶
func (_mock *MockVerificationTokenRepo) DeleteUserTokens(ctx context.Context, userID int) error
DeleteUserTokens provides a mock function for the type MockVerificationTokenRepo
func (*MockVerificationTokenRepo) EXPECT ¶
func (_m *MockVerificationTokenRepo) EXPECT() *MockVerificationTokenRepo_Expecter
func (*MockVerificationTokenRepo) FindValidToken ¶
func (_mock *MockVerificationTokenRepo) FindValidToken(ctx context.Context, tokenHash string) (*auth.VerificationToken, error)
FindValidToken provides a mock function for the type MockVerificationTokenRepo
type MockVerificationTokenRepo_CreateToken_Call ¶
MockVerificationTokenRepo_CreateToken_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'CreateToken'
func (*MockVerificationTokenRepo_CreateToken_Call) Return ¶
func (_c *MockVerificationTokenRepo_CreateToken_Call) Return(err error) *MockVerificationTokenRepo_CreateToken_Call
func (*MockVerificationTokenRepo_CreateToken_Call) Run ¶
func (_c *MockVerificationTokenRepo_CreateToken_Call) Run(run func(ctx context.Context, token *auth.VerificationToken)) *MockVerificationTokenRepo_CreateToken_Call
func (*MockVerificationTokenRepo_CreateToken_Call) RunAndReturn ¶
func (_c *MockVerificationTokenRepo_CreateToken_Call) RunAndReturn(run func(ctx context.Context, token *auth.VerificationToken) error) *MockVerificationTokenRepo_CreateToken_Call
type MockVerificationTokenRepo_DeleteExpiredTokens_Call ¶
MockVerificationTokenRepo_DeleteExpiredTokens_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'DeleteExpiredTokens'
func (*MockVerificationTokenRepo_DeleteExpiredTokens_Call) Run ¶
func (_c *MockVerificationTokenRepo_DeleteExpiredTokens_Call) Run(run func(ctx context.Context)) *MockVerificationTokenRepo_DeleteExpiredTokens_Call
func (*MockVerificationTokenRepo_DeleteExpiredTokens_Call) RunAndReturn ¶
func (_c *MockVerificationTokenRepo_DeleteExpiredTokens_Call) RunAndReturn(run func(ctx context.Context) error) *MockVerificationTokenRepo_DeleteExpiredTokens_Call
type MockVerificationTokenRepo_DeleteUserTokens_Call ¶
MockVerificationTokenRepo_DeleteUserTokens_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'DeleteUserTokens'
func (*MockVerificationTokenRepo_DeleteUserTokens_Call) Return ¶
func (_c *MockVerificationTokenRepo_DeleteUserTokens_Call) Return(err error) *MockVerificationTokenRepo_DeleteUserTokens_Call
func (*MockVerificationTokenRepo_DeleteUserTokens_Call) Run ¶
func (_c *MockVerificationTokenRepo_DeleteUserTokens_Call) Run(run func(ctx context.Context, userID int)) *MockVerificationTokenRepo_DeleteUserTokens_Call
func (*MockVerificationTokenRepo_DeleteUserTokens_Call) RunAndReturn ¶
func (_c *MockVerificationTokenRepo_DeleteUserTokens_Call) RunAndReturn(run func(ctx context.Context, userID int) error) *MockVerificationTokenRepo_DeleteUserTokens_Call
type MockVerificationTokenRepo_Expecter ¶
type MockVerificationTokenRepo_Expecter struct {
// contains filtered or unexported fields
}
func (*MockVerificationTokenRepo_Expecter) CreateToken ¶
func (_e *MockVerificationTokenRepo_Expecter) CreateToken(ctx any, token any) *MockVerificationTokenRepo_CreateToken_Call
CreateToken is a helper method to define mock.On call
- ctx context.Context
- token *auth.VerificationToken
func (*MockVerificationTokenRepo_Expecter) DeleteExpiredTokens ¶
func (_e *MockVerificationTokenRepo_Expecter) DeleteExpiredTokens(ctx any) *MockVerificationTokenRepo_DeleteExpiredTokens_Call
DeleteExpiredTokens is a helper method to define mock.On call
- ctx context.Context
func (*MockVerificationTokenRepo_Expecter) DeleteUserTokens ¶
func (_e *MockVerificationTokenRepo_Expecter) DeleteUserTokens(ctx any, userID any) *MockVerificationTokenRepo_DeleteUserTokens_Call
DeleteUserTokens is a helper method to define mock.On call
- ctx context.Context
- userID int
func (*MockVerificationTokenRepo_Expecter) FindValidToken ¶
func (_e *MockVerificationTokenRepo_Expecter) FindValidToken(ctx any, tokenHash any) *MockVerificationTokenRepo_FindValidToken_Call
FindValidToken is a helper method to define mock.On call
- ctx context.Context
- tokenHash string
type MockVerificationTokenRepo_FindValidToken_Call ¶
MockVerificationTokenRepo_FindValidToken_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'FindValidToken'
func (*MockVerificationTokenRepo_FindValidToken_Call) Return ¶
func (_c *MockVerificationTokenRepo_FindValidToken_Call) Return(verificationToken *auth.VerificationToken, err error) *MockVerificationTokenRepo_FindValidToken_Call
func (*MockVerificationTokenRepo_FindValidToken_Call) Run ¶
func (_c *MockVerificationTokenRepo_FindValidToken_Call) Run(run func(ctx context.Context, tokenHash string)) *MockVerificationTokenRepo_FindValidToken_Call
func (*MockVerificationTokenRepo_FindValidToken_Call) RunAndReturn ¶
func (_c *MockVerificationTokenRepo_FindValidToken_Call) RunAndReturn(run func(ctx context.Context, tokenHash string) (*auth.VerificationToken, error)) *MockVerificationTokenRepo_FindValidToken_Call