mocks

package
v1.1.2 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Nov 1, 2026 License: MIT Imports: 5 Imported by: 0 modules, 0 packages

The first number is the count of modules that contain a package that imports this one. The module count is a better indicator of popularity than the package count. A module with 100 importing packages is counted only once instead of 100 times, reflecting the fact that the choice to use the package was likely made only once, not 100 times.
A '?' means that the value hasn't been computed yet.

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type MockCredentialPolicy

type MockCredentialPolicy struct {
	mock.Mock
}

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 (*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

GeneratePassword is a helper method to define mock.On call

  • length int

func (*MockCredentialPolicy_Expecter) HashPassword

HashPassword is a helper method to define mock.On call

  • password string

func (*MockCredentialPolicy_Expecter) NeedsRehash

NeedsRehash is a helper method to define mock.On call

  • hash string

func (*MockCredentialPolicy_Expecter) ValidateEmail

ValidateEmail is a helper method to define mock.On call

  • email string

func (*MockCredentialPolicy_Expecter) ValidatePassword

ValidatePassword is a helper method to define mock.On call

  • password string

func (*MockCredentialPolicy_Expecter) ValidateUsername

ValidateUsername is a helper method to define mock.On call

  • username string

func (*MockCredentialPolicy_Expecter) VerifyPassword

VerifyPassword is a helper method to define mock.On call

  • hash string
  • password string

type MockCredentialPolicy_GeneratePassword_Call

type MockCredentialPolicy_GeneratePassword_Call struct {
	*mock.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 (*MockCredentialPolicy_GeneratePassword_Call) Run

func (*MockCredentialPolicy_GeneratePassword_Call) RunAndReturn

type MockCredentialPolicy_HashPassword_Call

type MockCredentialPolicy_HashPassword_Call struct {
	*mock.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 (*MockCredentialPolicy_HashPassword_Call) Run

func (*MockCredentialPolicy_HashPassword_Call) RunAndReturn

type MockCredentialPolicy_NeedsRehash_Call

type MockCredentialPolicy_NeedsRehash_Call struct {
	*mock.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 (*MockCredentialPolicy_NeedsRehash_Call) Run

func (*MockCredentialPolicy_NeedsRehash_Call) RunAndReturn

type MockCredentialPolicy_ValidateEmail_Call

type MockCredentialPolicy_ValidateEmail_Call struct {
	*mock.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 (*MockCredentialPolicy_ValidateEmail_Call) Run

func (*MockCredentialPolicy_ValidateEmail_Call) RunAndReturn

type MockCredentialPolicy_ValidatePassword_Call

type MockCredentialPolicy_ValidatePassword_Call struct {
	*mock.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 (*MockCredentialPolicy_ValidatePassword_Call) Run

func (*MockCredentialPolicy_ValidatePassword_Call) RunAndReturn

type MockCredentialPolicy_ValidateUsername_Call

type MockCredentialPolicy_ValidateUsername_Call struct {
	*mock.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 (*MockCredentialPolicy_ValidateUsername_Call) Run

func (*MockCredentialPolicy_ValidateUsername_Call) RunAndReturn

type MockCredentialPolicy_VerifyPassword_Call

type MockCredentialPolicy_VerifyPassword_Call struct {
	*mock.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 (*MockCredentialPolicy_VerifyPassword_Call) Run

func (*MockCredentialPolicy_VerifyPassword_Call) RunAndReturn

type MockFailedLoginAttemptRepo

type MockFailedLoginAttemptRepo struct {
	mock.Mock
}

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 (*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

type MockFailedLoginAttemptRepo_Create_Call struct {
	*mock.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 (*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

type MockFailedLoginAttemptRepo_Delete_Call struct {
	*mock.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 (*MockFailedLoginAttemptRepo_Delete_Call) Run

func (*MockFailedLoginAttemptRepo_Delete_Call) RunAndReturn

type MockFailedLoginAttemptRepo_Expecter

type MockFailedLoginAttemptRepo_Expecter struct {
	// contains filtered or unexported fields
}

func (*MockFailedLoginAttemptRepo_Expecter) Create

Create is a helper method to define mock.On call

  • ctx context.Context
  • attempt *auth.FailedLoginAttempt

func (*MockFailedLoginAttemptRepo_Expecter) Delete

Delete is a helper method to define mock.On call

  • ctx context.Context
  • userID int

func (*MockFailedLoginAttemptRepo_Expecter) GetByUserID

GetByUserID is a helper method to define mock.On call

  • ctx context.Context
  • userID int

func (*MockFailedLoginAttemptRepo_Expecter) IncrementAttempts

IncrementAttempts is a helper method to define mock.On call

  • ctx context.Context
  • userID int

func (*MockFailedLoginAttemptRepo_Expecter) IsLocked

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

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

UpdateLastEmailSent is a helper method to define mock.On call

  • ctx context.Context
  • userID int

type MockFailedLoginAttemptRepo_GetByUserID_Call

type MockFailedLoginAttemptRepo_GetByUserID_Call struct {
	*mock.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 (*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

type MockFailedLoginAttemptRepo_IncrementAttempts_Call struct {
	*mock.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 (*MockFailedLoginAttemptRepo_IncrementAttempts_Call) Run

func (*MockFailedLoginAttemptRepo_IncrementAttempts_Call) RunAndReturn

type MockFailedLoginAttemptRepo_IsLocked_Call

type MockFailedLoginAttemptRepo_IsLocked_Call struct {
	*mock.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 (*MockFailedLoginAttemptRepo_IsLocked_Call) Run

func (*MockFailedLoginAttemptRepo_IsLocked_Call) RunAndReturn

type MockFailedLoginAttemptRepo_LockAccount_Call

type MockFailedLoginAttemptRepo_LockAccount_Call struct {
	*mock.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 (*MockFailedLoginAttemptRepo_LockAccount_Call) Run

func (*MockFailedLoginAttemptRepo_LockAccount_Call) RunAndReturn

type MockFailedLoginAttemptRepo_ResetAttempts_Call

type MockFailedLoginAttemptRepo_ResetAttempts_Call struct {
	*mock.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 (*MockFailedLoginAttemptRepo_ResetAttempts_Call) Run

func (*MockFailedLoginAttemptRepo_ResetAttempts_Call) RunAndReturn

type MockFailedLoginAttemptRepo_ShouldSendLockoutEmail_Call

type MockFailedLoginAttemptRepo_ShouldSendLockoutEmail_Call struct {
	*mock.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 (*MockFailedLoginAttemptRepo_ShouldSendLockoutEmail_Call) Run

func (*MockFailedLoginAttemptRepo_ShouldSendLockoutEmail_Call) RunAndReturn

type MockFailedLoginAttemptRepo_UpdateLastEmailSent_Call

type MockFailedLoginAttemptRepo_UpdateLastEmailSent_Call struct {
	*mock.Call
}

MockFailedLoginAttemptRepo_UpdateLastEmailSent_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'UpdateLastEmailSent'

func (*MockFailedLoginAttemptRepo_UpdateLastEmailSent_Call) Return

func (*MockFailedLoginAttemptRepo_UpdateLastEmailSent_Call) Run

func (*MockFailedLoginAttemptRepo_UpdateLastEmailSent_Call) RunAndReturn

type MockMFAChallengeRepo

type MockMFAChallengeRepo struct {
	mock.Mock
}

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

func (_mock *MockMFAChallengeRepo) Consume(ctx context.Context, id int) (bool, error)

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 (*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

type MockMFAChallengeRepo_Consume_Call struct {
	*mock.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 (*MockMFAChallengeRepo_Consume_Call) Run

func (*MockMFAChallengeRepo_Consume_Call) RunAndReturn

type MockMFAChallengeRepo_Create_Call

type MockMFAChallengeRepo_Create_Call struct {
	*mock.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 (*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

type MockMFAChallengeRepo_DeleteExpired_Call struct {
	*mock.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 (*MockMFAChallengeRepo_DeleteExpired_Call) Run

func (*MockMFAChallengeRepo_DeleteExpired_Call) RunAndReturn

type MockMFAChallengeRepo_DeleteUserChallenges_Call

type MockMFAChallengeRepo_DeleteUserChallenges_Call struct {
	*mock.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 (*MockMFAChallengeRepo_DeleteUserChallenges_Call) Run

func (*MockMFAChallengeRepo_DeleteUserChallenges_Call) RunAndReturn

type MockMFAChallengeRepo_Delete_Call

type MockMFAChallengeRepo_Delete_Call struct {
	*mock.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 (*MockMFAChallengeRepo_Delete_Call) Run

func (*MockMFAChallengeRepo_Delete_Call) RunAndReturn

type MockMFAChallengeRepo_Expecter

type MockMFAChallengeRepo_Expecter struct {
	// contains filtered or unexported fields
}

func (*MockMFAChallengeRepo_Expecter) Consume

Consume is a helper method to define mock.On call

  • ctx context.Context
  • id int

func (*MockMFAChallengeRepo_Expecter) Create

Create is a helper method to define mock.On call

  • ctx context.Context
  • challenge *auth.MFAChallenge

func (*MockMFAChallengeRepo_Expecter) Delete

Delete is a helper method to define mock.On call

  • ctx context.Context
  • id int

func (*MockMFAChallengeRepo_Expecter) DeleteExpired

DeleteExpired is a helper method to define mock.On call

  • ctx context.Context

func (*MockMFAChallengeRepo_Expecter) DeleteUserChallenges

DeleteUserChallenges is a helper method to define mock.On call

  • ctx context.Context
  • userID int

func (*MockMFAChallengeRepo_Expecter) FindByTokenHash

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

type MockMFAChallengeRepo_FindByTokenHash_Call struct {
	*mock.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 (*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

type MockMFAChallengeRepo_IncrementAttempts_Call struct {
	*mock.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 (*MockMFAChallengeRepo_IncrementAttempts_Call) Run

func (*MockMFAChallengeRepo_IncrementAttempts_Call) RunAndReturn

type MockPasswordResetTokenRepo

type MockPasswordResetTokenRepo struct {
	mock.Mock
}

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 (*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

type MockPasswordResetTokenRepo_CreateToken_Call struct {
	*mock.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 (*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

type MockPasswordResetTokenRepo_DeleteUserTokens_Call struct {
	*mock.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 (*MockPasswordResetTokenRepo_DeleteUserTokens_Call) Run

func (*MockPasswordResetTokenRepo_DeleteUserTokens_Call) RunAndReturn

type MockPasswordResetTokenRepo_Expecter

type MockPasswordResetTokenRepo_Expecter struct {
	// contains filtered or unexported fields
}

func (*MockPasswordResetTokenRepo_Expecter) CreateToken

CreateToken is a helper method to define mock.On call

  • ctx context.Context
  • token *auth.PasswordResetToken

func (*MockPasswordResetTokenRepo_Expecter) DeleteUserTokens

DeleteUserTokens is a helper method to define mock.On call

  • ctx context.Context
  • userID int

func (*MockPasswordResetTokenRepo_Expecter) FindValidToken

FindValidToken is a helper method to define mock.On call

  • ctx context.Context
  • tokenHash string

type MockPasswordResetTokenRepo_FindValidToken_Call

type MockPasswordResetTokenRepo_FindValidToken_Call struct {
	*mock.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 (*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

type MockVerificationTokenRepo struct {
	mock.Mock
}

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 (*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

type MockVerificationTokenRepo_CreateToken_Call struct {
	*mock.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 (*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

type MockVerificationTokenRepo_DeleteExpiredTokens_Call struct {
	*mock.Call
}

MockVerificationTokenRepo_DeleteExpiredTokens_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'DeleteExpiredTokens'

func (*MockVerificationTokenRepo_DeleteExpiredTokens_Call) Return

func (*MockVerificationTokenRepo_DeleteExpiredTokens_Call) Run

func (*MockVerificationTokenRepo_DeleteExpiredTokens_Call) RunAndReturn

type MockVerificationTokenRepo_DeleteUserTokens_Call

type MockVerificationTokenRepo_DeleteUserTokens_Call struct {
	*mock.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 (*MockVerificationTokenRepo_DeleteUserTokens_Call) Run

func (*MockVerificationTokenRepo_DeleteUserTokens_Call) RunAndReturn

type MockVerificationTokenRepo_Expecter

type MockVerificationTokenRepo_Expecter struct {
	// contains filtered or unexported fields
}

func (*MockVerificationTokenRepo_Expecter) CreateToken

CreateToken is a helper method to define mock.On call

  • ctx context.Context
  • token *auth.VerificationToken

func (*MockVerificationTokenRepo_Expecter) DeleteExpiredTokens

DeleteExpiredTokens is a helper method to define mock.On call

  • ctx context.Context

func (*MockVerificationTokenRepo_Expecter) DeleteUserTokens

DeleteUserTokens is a helper method to define mock.On call

  • ctx context.Context
  • userID int

func (*MockVerificationTokenRepo_Expecter) FindValidToken

FindValidToken is a helper method to define mock.On call

  • ctx context.Context
  • tokenHash string

type MockVerificationTokenRepo_FindValidToken_Call

type MockVerificationTokenRepo_FindValidToken_Call struct {
	*mock.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 (*MockVerificationTokenRepo_FindValidToken_Call) RunAndReturn

func (_c *MockVerificationTokenRepo_FindValidToken_Call) RunAndReturn(run func(ctx context.Context, tokenHash string) (*auth.VerificationToken, error)) *MockVerificationTokenRepo_FindValidToken_Call

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL