mocks

package
v1.6.0 Latest Latest
Warning

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

Go to latest
Published: Nov 19, 2026 License: MIT Imports: 4 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 MockBlockedEmailChecker

type MockBlockedEmailChecker struct {
	mock.Mock
}

MockBlockedEmailChecker is an autogenerated mock type for the BlockedEmailChecker type

func NewMockBlockedEmailChecker

func NewMockBlockedEmailChecker(t interface {
	mock.TestingT
	Cleanup(func())
}) *MockBlockedEmailChecker

NewMockBlockedEmailChecker creates a new instance of MockBlockedEmailChecker. It also registers a testing interface on the mock and a cleanup function to assert the mocks expectations. The first argument is typically a *testing.T value.

func (*MockBlockedEmailChecker) EXPECT

func (*MockBlockedEmailChecker) IsEmailBlocked

func (_mock *MockBlockedEmailChecker) IsEmailBlocked(ctx context.Context, email string) (bool, error)

IsEmailBlocked provides a mock function for the type MockBlockedEmailChecker

type MockBlockedEmailChecker_Expecter

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

func (*MockBlockedEmailChecker_Expecter) IsEmailBlocked

IsEmailBlocked is a helper method to define mock.On call

  • ctx context.Context
  • email string

type MockBlockedEmailChecker_IsEmailBlocked_Call

type MockBlockedEmailChecker_IsEmailBlocked_Call struct {
	*mock.Call
}

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

func (*MockBlockedEmailChecker_IsEmailBlocked_Call) Return

func (*MockBlockedEmailChecker_IsEmailBlocked_Call) Run

func (*MockBlockedEmailChecker_IsEmailBlocked_Call) RunAndReturn

type MockMFACodeDeliverer

type MockMFACodeDeliverer struct {
	mock.Mock
}

MockMFACodeDeliverer is an autogenerated mock type for the MFACodeDeliverer type

func NewMockMFACodeDeliverer

func NewMockMFACodeDeliverer(t interface {
	mock.TestingT
	Cleanup(func())
}) *MockMFACodeDeliverer

NewMockMFACodeDeliverer creates a new instance of MockMFACodeDeliverer. It also registers a testing interface on the mock and a cleanup function to assert the mocks expectations. The first argument is typically a *testing.T value.

func (*MockMFACodeDeliverer) DeliverMFACode

func (_mock *MockMFACodeDeliverer) DeliverMFACode(ctx context.Context, to string, username string, code string) error

DeliverMFACode provides a mock function for the type MockMFACodeDeliverer

func (*MockMFACodeDeliverer) EXPECT

type MockMFACodeDeliverer_DeliverMFACode_Call

type MockMFACodeDeliverer_DeliverMFACode_Call struct {
	*mock.Call
}

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

func (*MockMFACodeDeliverer_DeliverMFACode_Call) Return

func (*MockMFACodeDeliverer_DeliverMFACode_Call) Run

func (*MockMFACodeDeliverer_DeliverMFACode_Call) RunAndReturn

type MockMFACodeDeliverer_Expecter

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

func (*MockMFACodeDeliverer_Expecter) DeliverMFACode

func (_e *MockMFACodeDeliverer_Expecter) DeliverMFACode(ctx any, to any, username any, code any) *MockMFACodeDeliverer_DeliverMFACode_Call

DeliverMFACode is a helper method to define mock.On call

  • ctx context.Context
  • to string
  • username string
  • code string

type MockMailer

type MockMailer struct {
	mock.Mock
}

MockMailer is an autogenerated mock type for the Mailer type

func NewMockMailer

func NewMockMailer(t interface {
	mock.TestingT
	Cleanup(func())
}) *MockMailer

NewMockMailer creates a new instance of MockMailer. It also registers a testing interface on the mock and a cleanup function to assert the mocks expectations. The first argument is typically a *testing.T value.

func (*MockMailer) EXPECT

func (_m *MockMailer) EXPECT() *MockMailer_Expecter

func (*MockMailer) SendAccountLockoutEmail

func (_mock *MockMailer) SendAccountLockoutEmail(ctx context.Context, to string, username string) error

SendAccountLockoutEmail provides a mock function for the type MockMailer

func (*MockMailer) SendPasswordResetEmail

func (_mock *MockMailer) SendPasswordResetEmail(ctx context.Context, to string, username string, token string) error

SendPasswordResetEmail provides a mock function for the type MockMailer

func (*MockMailer) SendRegistrationAttemptEmail

func (_mock *MockMailer) SendRegistrationAttemptEmail(ctx context.Context, to string, username string) error

SendRegistrationAttemptEmail provides a mock function for the type MockMailer

func (*MockMailer) SendVerificationEmail

func (_mock *MockMailer) SendVerificationEmail(ctx context.Context, to string, username string, token string) error

SendVerificationEmail provides a mock function for the type MockMailer

type MockMailer_Expecter

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

func (*MockMailer_Expecter) SendAccountLockoutEmail

func (_e *MockMailer_Expecter) SendAccountLockoutEmail(ctx any, to any, username any) *MockMailer_SendAccountLockoutEmail_Call

SendAccountLockoutEmail is a helper method to define mock.On call

  • ctx context.Context
  • to string
  • username string

func (*MockMailer_Expecter) SendPasswordResetEmail

func (_e *MockMailer_Expecter) SendPasswordResetEmail(ctx any, to any, username any, token any) *MockMailer_SendPasswordResetEmail_Call

SendPasswordResetEmail is a helper method to define mock.On call

  • ctx context.Context
  • to string
  • username string
  • token string

func (*MockMailer_Expecter) SendRegistrationAttemptEmail

func (_e *MockMailer_Expecter) SendRegistrationAttemptEmail(ctx any, to any, username any) *MockMailer_SendRegistrationAttemptEmail_Call

SendRegistrationAttemptEmail is a helper method to define mock.On call

  • ctx context.Context
  • to string
  • username string

func (*MockMailer_Expecter) SendVerificationEmail

func (_e *MockMailer_Expecter) SendVerificationEmail(ctx any, to any, username any, token any) *MockMailer_SendVerificationEmail_Call

SendVerificationEmail is a helper method to define mock.On call

  • ctx context.Context
  • to string
  • username string
  • token string

type MockMailer_SendAccountLockoutEmail_Call

type MockMailer_SendAccountLockoutEmail_Call struct {
	*mock.Call
}

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

func (*MockMailer_SendAccountLockoutEmail_Call) Return

func (*MockMailer_SendAccountLockoutEmail_Call) Run

func (*MockMailer_SendAccountLockoutEmail_Call) RunAndReturn

type MockMailer_SendPasswordResetEmail_Call

type MockMailer_SendPasswordResetEmail_Call struct {
	*mock.Call
}

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

func (*MockMailer_SendPasswordResetEmail_Call) Return

func (*MockMailer_SendPasswordResetEmail_Call) Run

func (*MockMailer_SendPasswordResetEmail_Call) RunAndReturn

type MockMailer_SendRegistrationAttemptEmail_Call

type MockMailer_SendRegistrationAttemptEmail_Call struct {
	*mock.Call
}

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

func (*MockMailer_SendRegistrationAttemptEmail_Call) Return

func (*MockMailer_SendRegistrationAttemptEmail_Call) Run

func (*MockMailer_SendRegistrationAttemptEmail_Call) RunAndReturn

type MockMailer_SendVerificationEmail_Call

type MockMailer_SendVerificationEmail_Call struct {
	*mock.Call
}

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

func (*MockMailer_SendVerificationEmail_Call) Return

func (*MockMailer_SendVerificationEmail_Call) Run

func (*MockMailer_SendVerificationEmail_Call) RunAndReturn

type MockNotificationRecorder

type MockNotificationRecorder struct {
	mock.Mock
}

MockNotificationRecorder is an autogenerated mock type for the NotificationRecorder type

func NewMockNotificationRecorder

func NewMockNotificationRecorder(t interface {
	mock.TestingT
	Cleanup(func())
}) *MockNotificationRecorder

NewMockNotificationRecorder creates a new instance of MockNotificationRecorder. It also registers a testing interface on the mock and a cleanup function to assert the mocks expectations. The first argument is typically a *testing.T value.

func (*MockNotificationRecorder) EXPECT

func (*MockNotificationRecorder) RecordUserRegistered

func (_mock *MockNotificationRecorder) RecordUserRegistered(ctx context.Context, username string, email string) error

RecordUserRegistered provides a mock function for the type MockNotificationRecorder

func (*MockNotificationRecorder) RecordUserVerified

func (_mock *MockNotificationRecorder) RecordUserVerified(ctx context.Context, username string, email string) error

RecordUserVerified provides a mock function for the type MockNotificationRecorder

type MockNotificationRecorder_Expecter

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

func (*MockNotificationRecorder_Expecter) RecordUserRegistered

RecordUserRegistered is a helper method to define mock.On call

  • ctx context.Context
  • username string
  • email string

func (*MockNotificationRecorder_Expecter) RecordUserVerified

RecordUserVerified is a helper method to define mock.On call

  • ctx context.Context
  • username string
  • email string

type MockNotificationRecorder_RecordUserRegistered_Call

type MockNotificationRecorder_RecordUserRegistered_Call struct {
	*mock.Call
}

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

func (*MockNotificationRecorder_RecordUserRegistered_Call) Return

func (*MockNotificationRecorder_RecordUserRegistered_Call) Run

func (*MockNotificationRecorder_RecordUserRegistered_Call) RunAndReturn

type MockNotificationRecorder_RecordUserVerified_Call

type MockNotificationRecorder_RecordUserVerified_Call struct {
	*mock.Call
}

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

func (*MockNotificationRecorder_RecordUserVerified_Call) Return

func (*MockNotificationRecorder_RecordUserVerified_Call) Run

func (*MockNotificationRecorder_RecordUserVerified_Call) RunAndReturn

type MockTokenIssuer

type MockTokenIssuer struct {
	mock.Mock
}

MockTokenIssuer is an autogenerated mock type for the TokenIssuer type

func NewMockTokenIssuer

func NewMockTokenIssuer(t interface {
	mock.TestingT
	Cleanup(func())
}) *MockTokenIssuer

NewMockTokenIssuer creates a new instance of MockTokenIssuer. It also registers a testing interface on the mock and a cleanup function to assert the mocks expectations. The first argument is typically a *testing.T value.

func (*MockTokenIssuer) EXPECT

func (*MockTokenIssuer) GenerateToken

func (_mock *MockTokenIssuer) GenerateToken(userID string, username string, role string, tokenVersion int) (string, error)

GenerateToken provides a mock function for the type MockTokenIssuer

func (*MockTokenIssuer) ValidateTokenExpiry

func (_mock *MockTokenIssuer) ValidateTokenExpiry(token string) (time.Time, error)

ValidateTokenExpiry provides a mock function for the type MockTokenIssuer

type MockTokenIssuer_Expecter

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

func (*MockTokenIssuer_Expecter) GenerateToken

func (_e *MockTokenIssuer_Expecter) GenerateToken(userID any, username any, role any, tokenVersion any) *MockTokenIssuer_GenerateToken_Call

GenerateToken is a helper method to define mock.On call

  • userID string
  • username string
  • role string
  • tokenVersion int

func (*MockTokenIssuer_Expecter) ValidateTokenExpiry

ValidateTokenExpiry is a helper method to define mock.On call

  • token string

type MockTokenIssuer_GenerateToken_Call

type MockTokenIssuer_GenerateToken_Call struct {
	*mock.Call
}

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

func (*MockTokenIssuer_GenerateToken_Call) Return

func (*MockTokenIssuer_GenerateToken_Call) Run

func (_c *MockTokenIssuer_GenerateToken_Call) Run(run func(userID string, username string, role string, tokenVersion int)) *MockTokenIssuer_GenerateToken_Call

func (*MockTokenIssuer_GenerateToken_Call) RunAndReturn

func (_c *MockTokenIssuer_GenerateToken_Call) RunAndReturn(run func(userID string, username string, role string, tokenVersion int) (string, error)) *MockTokenIssuer_GenerateToken_Call

type MockTokenIssuer_ValidateTokenExpiry_Call

type MockTokenIssuer_ValidateTokenExpiry_Call struct {
	*mock.Call
}

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

func (*MockTokenIssuer_ValidateTokenExpiry_Call) Return

func (*MockTokenIssuer_ValidateTokenExpiry_Call) Run

func (*MockTokenIssuer_ValidateTokenExpiry_Call) RunAndReturn

type MockUserStore

type MockUserStore struct {
	mock.Mock
}

MockUserStore is an autogenerated mock type for the UserStore type

func NewMockUserStore

func NewMockUserStore(t interface {
	mock.TestingT
	Cleanup(func())
}) *MockUserStore

NewMockUserStore creates a new instance of MockUserStore. It also registers a testing interface on the mock and a cleanup function to assert the mocks expectations. The first argument is typically a *testing.T value.

func (*MockUserStore) EXPECT

func (_m *MockUserStore) EXPECT() *MockUserStore_Expecter

func (*MockUserStore) GetAdminUser

func (_mock *MockUserStore) GetAdminUser(ctx context.Context) (*user.User, error)

GetAdminUser provides a mock function for the type MockUserStore

func (*MockUserStore) GetUserByEmail

func (_mock *MockUserStore) GetUserByEmail(ctx context.Context, email string) (*user.User, error)

GetUserByEmail provides a mock function for the type MockUserStore

func (*MockUserStore) GetUserByID

func (_mock *MockUserStore) GetUserByID(ctx context.Context, userID int) (*user.User, error)

GetUserByID provides a mock function for the type MockUserStore

func (*MockUserStore) GetUserByUsername

func (_mock *MockUserStore) GetUserByUsername(ctx context.Context, username string) (*user.User, error)

GetUserByUsername provides a mock function for the type MockUserStore

func (*MockUserStore) RevokeSessions

func (_mock *MockUserStore) RevokeSessions(ctx context.Context, userID int) error

RevokeSessions provides a mock function for the type MockUserStore

func (*MockUserStore) UpdateAdminPasswordAndEmail

func (_mock *MockUserStore) UpdateAdminPasswordAndEmail(ctx context.Context, passwordHash string, email string, currentPasswordHash string) error

UpdateAdminPasswordAndEmail provides a mock function for the type MockUserStore

type MockUserStore_Expecter

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

func (*MockUserStore_Expecter) GetAdminUser

GetAdminUser is a helper method to define mock.On call

  • ctx context.Context

func (*MockUserStore_Expecter) GetUserByEmail

func (_e *MockUserStore_Expecter) GetUserByEmail(ctx any, email any) *MockUserStore_GetUserByEmail_Call

GetUserByEmail is a helper method to define mock.On call

  • ctx context.Context
  • email string

func (*MockUserStore_Expecter) GetUserByID

func (_e *MockUserStore_Expecter) GetUserByID(ctx any, userID any) *MockUserStore_GetUserByID_Call

GetUserByID is a helper method to define mock.On call

  • ctx context.Context
  • userID int

func (*MockUserStore_Expecter) GetUserByUsername

func (_e *MockUserStore_Expecter) GetUserByUsername(ctx any, username any) *MockUserStore_GetUserByUsername_Call

GetUserByUsername is a helper method to define mock.On call

  • ctx context.Context
  • username string

func (*MockUserStore_Expecter) RevokeSessions

func (_e *MockUserStore_Expecter) RevokeSessions(ctx any, userID any) *MockUserStore_RevokeSessions_Call

RevokeSessions is a helper method to define mock.On call

  • ctx context.Context
  • userID int

func (*MockUserStore_Expecter) UpdateAdminPasswordAndEmail

func (_e *MockUserStore_Expecter) UpdateAdminPasswordAndEmail(ctx any, passwordHash any, email any, currentPasswordHash any) *MockUserStore_UpdateAdminPasswordAndEmail_Call

UpdateAdminPasswordAndEmail is a helper method to define mock.On call

  • ctx context.Context
  • passwordHash string
  • email string
  • currentPasswordHash string

type MockUserStore_GetAdminUser_Call

type MockUserStore_GetAdminUser_Call struct {
	*mock.Call
}

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

func (*MockUserStore_GetAdminUser_Call) Return

func (_c *MockUserStore_GetAdminUser_Call) Return(user1 *user.User, err error) *MockUserStore_GetAdminUser_Call

func (*MockUserStore_GetAdminUser_Call) Run

func (*MockUserStore_GetAdminUser_Call) RunAndReturn

func (_c *MockUserStore_GetAdminUser_Call) RunAndReturn(run func(ctx context.Context) (*user.User, error)) *MockUserStore_GetAdminUser_Call

type MockUserStore_GetUserByEmail_Call

type MockUserStore_GetUserByEmail_Call struct {
	*mock.Call
}

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

func (*MockUserStore_GetUserByEmail_Call) Return

func (*MockUserStore_GetUserByEmail_Call) Run

func (*MockUserStore_GetUserByEmail_Call) RunAndReturn

func (_c *MockUserStore_GetUserByEmail_Call) RunAndReturn(run func(ctx context.Context, email string) (*user.User, error)) *MockUserStore_GetUserByEmail_Call

type MockUserStore_GetUserByID_Call

type MockUserStore_GetUserByID_Call struct {
	*mock.Call
}

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

func (*MockUserStore_GetUserByID_Call) Return

func (_c *MockUserStore_GetUserByID_Call) Return(user1 *user.User, err error) *MockUserStore_GetUserByID_Call

func (*MockUserStore_GetUserByID_Call) Run

func (*MockUserStore_GetUserByID_Call) RunAndReturn

func (_c *MockUserStore_GetUserByID_Call) RunAndReturn(run func(ctx context.Context, userID int) (*user.User, error)) *MockUserStore_GetUserByID_Call

type MockUserStore_GetUserByUsername_Call

type MockUserStore_GetUserByUsername_Call struct {
	*mock.Call
}

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

func (*MockUserStore_GetUserByUsername_Call) Return

func (*MockUserStore_GetUserByUsername_Call) Run

func (*MockUserStore_GetUserByUsername_Call) RunAndReturn

func (_c *MockUserStore_GetUserByUsername_Call) RunAndReturn(run func(ctx context.Context, username string) (*user.User, error)) *MockUserStore_GetUserByUsername_Call

type MockUserStore_RevokeSessions_Call

type MockUserStore_RevokeSessions_Call struct {
	*mock.Call
}

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

func (*MockUserStore_RevokeSessions_Call) Return

func (*MockUserStore_RevokeSessions_Call) Run

func (*MockUserStore_RevokeSessions_Call) RunAndReturn

type MockUserStore_UpdateAdminPasswordAndEmail_Call

type MockUserStore_UpdateAdminPasswordAndEmail_Call struct {
	*mock.Call
}

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

func (*MockUserStore_UpdateAdminPasswordAndEmail_Call) Return

func (*MockUserStore_UpdateAdminPasswordAndEmail_Call) Run

func (*MockUserStore_UpdateAdminPasswordAndEmail_Call) RunAndReturn

func (_c *MockUserStore_UpdateAdminPasswordAndEmail_Call) RunAndReturn(run func(ctx context.Context, passwordHash string, email string, currentPasswordHash string) error) *MockUserStore_UpdateAdminPasswordAndEmail_Call

Jump to

Keyboard shortcuts

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