mocks

package
v1.2.1 Latest Latest
Warning

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

Go to latest
Published: Nov 3, 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 MockAccountDeletionServiceInterface

type MockAccountDeletionServiceInterface struct {
	mock.Mock
}

MockAccountDeletionServiceInterface is an autogenerated mock type for the AccountDeletionServiceInterface type

func NewMockAccountDeletionServiceInterface

func NewMockAccountDeletionServiceInterface(t interface {
	mock.TestingT
	Cleanup(func())
}) *MockAccountDeletionServiceInterface

NewMockAccountDeletionServiceInterface creates a new instance of MockAccountDeletionServiceInterface. 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 (*MockAccountDeletionServiceInterface) DeleteAccount

func (_mock *MockAccountDeletionServiceInterface) DeleteAccount(ctx context.Context, principal kernel.Principal, userEmail string) error

DeleteAccount provides a mock function for the type MockAccountDeletionServiceInterface

func (*MockAccountDeletionServiceInterface) EXPECT

func (*MockAccountDeletionServiceInterface) ValidateConfirmationString

func (_mock *MockAccountDeletionServiceInterface) ValidateConfirmationString(confirmation string) error

ValidateConfirmationString provides a mock function for the type MockAccountDeletionServiceInterface

type MockAccountDeletionServiceInterface_DeleteAccount_Call

type MockAccountDeletionServiceInterface_DeleteAccount_Call struct {
	*mock.Call
}

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

func (*MockAccountDeletionServiceInterface_DeleteAccount_Call) Return

func (*MockAccountDeletionServiceInterface_DeleteAccount_Call) Run

func (*MockAccountDeletionServiceInterface_DeleteAccount_Call) RunAndReturn

type MockAccountDeletionServiceInterface_Expecter

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

func (*MockAccountDeletionServiceInterface_Expecter) DeleteAccount

DeleteAccount is a helper method to define mock.On call

  • ctx context.Context
  • principal kernel.Principal
  • userEmail string

func (*MockAccountDeletionServiceInterface_Expecter) ValidateConfirmationString

ValidateConfirmationString is a helper method to define mock.On call

  • confirmation string

type MockAccountDeletionServiceInterface_ValidateConfirmationString_Call

type MockAccountDeletionServiceInterface_ValidateConfirmationString_Call struct {
	*mock.Call
}

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

func (*MockAccountDeletionServiceInterface_ValidateConfirmationString_Call) Return

func (*MockAccountDeletionServiceInterface_ValidateConfirmationString_Call) Run

func (*MockAccountDeletionServiceInterface_ValidateConfirmationString_Call) RunAndReturn

type MockAdminCreateUserRepo

type MockAdminCreateUserRepo struct {
	mock.Mock
}

MockAdminCreateUserRepo is an autogenerated mock type for the AdminCreateUserRepo type

func NewMockAdminCreateUserRepo

func NewMockAdminCreateUserRepo(t interface {
	mock.TestingT
	Cleanup(func())
}) *MockAdminCreateUserRepo

NewMockAdminCreateUserRepo creates a new instance of MockAdminCreateUserRepo. 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 (*MockAdminCreateUserRepo) CheckEmailExists

func (_mock *MockAdminCreateUserRepo) CheckEmailExists(ctx context.Context, email string) (bool, error)

CheckEmailExists provides a mock function for the type MockAdminCreateUserRepo

func (*MockAdminCreateUserRepo) CheckUsernameExists

func (_mock *MockAdminCreateUserRepo) CheckUsernameExists(ctx context.Context, username string) (bool, error)

CheckUsernameExists provides a mock function for the type MockAdminCreateUserRepo

func (*MockAdminCreateUserRepo) CreateUser

func (_mock *MockAdminCreateUserRepo) CreateUser(ctx context.Context, user1 *user.User) error

CreateUser provides a mock function for the type MockAdminCreateUserRepo

func (*MockAdminCreateUserRepo) EXPECT

type MockAdminCreateUserRepo_CheckEmailExists_Call

type MockAdminCreateUserRepo_CheckEmailExists_Call struct {
	*mock.Call
}

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

func (*MockAdminCreateUserRepo_CheckEmailExists_Call) Return

func (*MockAdminCreateUserRepo_CheckEmailExists_Call) Run

func (*MockAdminCreateUserRepo_CheckEmailExists_Call) RunAndReturn

type MockAdminCreateUserRepo_CheckUsernameExists_Call

type MockAdminCreateUserRepo_CheckUsernameExists_Call struct {
	*mock.Call
}

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

func (*MockAdminCreateUserRepo_CheckUsernameExists_Call) Return

func (*MockAdminCreateUserRepo_CheckUsernameExists_Call) Run

func (*MockAdminCreateUserRepo_CheckUsernameExists_Call) RunAndReturn

type MockAdminCreateUserRepo_CreateUser_Call

type MockAdminCreateUserRepo_CreateUser_Call struct {
	*mock.Call
}

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

func (*MockAdminCreateUserRepo_CreateUser_Call) Return

func (*MockAdminCreateUserRepo_CreateUser_Call) Run

func (*MockAdminCreateUserRepo_CreateUser_Call) RunAndReturn

type MockAdminCreateUserRepo_Expecter

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

func (*MockAdminCreateUserRepo_Expecter) CheckEmailExists

CheckEmailExists is a helper method to define mock.On call

  • ctx context.Context
  • email string

func (*MockAdminCreateUserRepo_Expecter) CheckUsernameExists

CheckUsernameExists is a helper method to define mock.On call

  • ctx context.Context
  • username string

func (*MockAdminCreateUserRepo_Expecter) CreateUser

CreateUser is a helper method to define mock.On call

  • ctx context.Context
  • user1 *user.User

type MockBlockedEmailRepo

type MockBlockedEmailRepo struct {
	mock.Mock
}

MockBlockedEmailRepo is an autogenerated mock type for the BlockedEmailRepo type

func NewMockBlockedEmailRepo

func NewMockBlockedEmailRepo(t interface {
	mock.TestingT
	Cleanup(func())
}) *MockBlockedEmailRepo

NewMockBlockedEmailRepo creates a new instance of MockBlockedEmailRepo. 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 (*MockBlockedEmailRepo) BlockEmail

func (_mock *MockBlockedEmailRepo) BlockEmail(ctx context.Context, email string, reason string) error

BlockEmail provides a mock function for the type MockBlockedEmailRepo

func (*MockBlockedEmailRepo) EXPECT

func (*MockBlockedEmailRepo) IsEmailBlocked

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

IsEmailBlocked provides a mock function for the type MockBlockedEmailRepo

func (*MockBlockedEmailRepo) UnblockEmail

func (_mock *MockBlockedEmailRepo) UnblockEmail(ctx context.Context, email string) error

UnblockEmail provides a mock function for the type MockBlockedEmailRepo

type MockBlockedEmailRepo_BlockEmail_Call

type MockBlockedEmailRepo_BlockEmail_Call struct {
	*mock.Call
}

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

func (*MockBlockedEmailRepo_BlockEmail_Call) Return

func (*MockBlockedEmailRepo_BlockEmail_Call) Run

func (*MockBlockedEmailRepo_BlockEmail_Call) RunAndReturn

type MockBlockedEmailRepo_Expecter

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

func (*MockBlockedEmailRepo_Expecter) BlockEmail

BlockEmail is a helper method to define mock.On call

  • ctx context.Context
  • email string
  • reason string

func (*MockBlockedEmailRepo_Expecter) IsEmailBlocked

IsEmailBlocked is a helper method to define mock.On call

  • ctx context.Context
  • email string

func (*MockBlockedEmailRepo_Expecter) UnblockEmail

UnblockEmail is a helper method to define mock.On call

  • ctx context.Context
  • email string

type MockBlockedEmailRepo_IsEmailBlocked_Call

type MockBlockedEmailRepo_IsEmailBlocked_Call struct {
	*mock.Call
}

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

func (*MockBlockedEmailRepo_IsEmailBlocked_Call) Return

func (*MockBlockedEmailRepo_IsEmailBlocked_Call) Run

func (*MockBlockedEmailRepo_IsEmailBlocked_Call) RunAndReturn

type MockBlockedEmailRepo_UnblockEmail_Call

type MockBlockedEmailRepo_UnblockEmail_Call struct {
	*mock.Call
}

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

func (*MockBlockedEmailRepo_UnblockEmail_Call) Return

func (*MockBlockedEmailRepo_UnblockEmail_Call) Run

func (*MockBlockedEmailRepo_UnblockEmail_Call) RunAndReturn

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) 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) 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_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 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) SendAccountDeletedNotification

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

SendAccountDeletedNotification provides a mock function for the type MockMailer

func (*MockMailer) SendDataExportNotificationEmail

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

SendDataExportNotificationEmail provides a mock function for the type MockMailer

func (*MockMailer) SendEmailUpdateVerificationEmail

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

SendEmailUpdateVerificationEmail provides a mock function for the type MockMailer

type MockMailer_Expecter

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

func (*MockMailer_Expecter) SendAccountDeletedNotification

func (_e *MockMailer_Expecter) SendAccountDeletedNotification(ctx any, to any, username any) *MockMailer_SendAccountDeletedNotification_Call

SendAccountDeletedNotification is a helper method to define mock.On call

  • ctx context.Context
  • to string
  • username string

func (*MockMailer_Expecter) SendDataExportNotificationEmail

func (_e *MockMailer_Expecter) SendDataExportNotificationEmail(ctx any, to any, username any) *MockMailer_SendDataExportNotificationEmail_Call

SendDataExportNotificationEmail is a helper method to define mock.On call

  • ctx context.Context
  • to string
  • username string

func (*MockMailer_Expecter) SendEmailUpdateVerificationEmail

func (_e *MockMailer_Expecter) SendEmailUpdateVerificationEmail(ctx any, to any, username any, token any) *MockMailer_SendEmailUpdateVerificationEmail_Call

SendEmailUpdateVerificationEmail is a helper method to define mock.On call

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

type MockMailer_SendAccountDeletedNotification_Call

type MockMailer_SendAccountDeletedNotification_Call struct {
	*mock.Call
}

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

func (*MockMailer_SendAccountDeletedNotification_Call) Return

func (*MockMailer_SendAccountDeletedNotification_Call) Run

func (*MockMailer_SendAccountDeletedNotification_Call) RunAndReturn

type MockMailer_SendDataExportNotificationEmail_Call

type MockMailer_SendDataExportNotificationEmail_Call struct {
	*mock.Call
}

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

func (*MockMailer_SendDataExportNotificationEmail_Call) Return

func (*MockMailer_SendDataExportNotificationEmail_Call) Run

func (*MockMailer_SendDataExportNotificationEmail_Call) RunAndReturn

type MockMailer_SendEmailUpdateVerificationEmail_Call

type MockMailer_SendEmailUpdateVerificationEmail_Call struct {
	*mock.Call
}

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

func (*MockMailer_SendEmailUpdateVerificationEmail_Call) Return

func (*MockMailer_SendEmailUpdateVerificationEmail_Call) Run

func (*MockMailer_SendEmailUpdateVerificationEmail_Call) RunAndReturn

type MockProfileServiceInterface

type MockProfileServiceInterface struct {
	mock.Mock
}

MockProfileServiceInterface is an autogenerated mock type for the ProfileServiceInterface type

func NewMockProfileServiceInterface

func NewMockProfileServiceInterface(t interface {
	mock.TestingT
	Cleanup(func())
}) *MockProfileServiceInterface

NewMockProfileServiceInterface creates a new instance of MockProfileServiceInterface. 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 (*MockProfileServiceInterface) ChangePassword

func (_mock *MockProfileServiceInterface) ChangePassword(ctx context.Context, principal kernel.Principal, currentPassword string, newPassword string) error

ChangePassword provides a mock function for the type MockProfileServiceInterface

func (*MockProfileServiceInterface) EXPECT

func (*MockProfileServiceInterface) ExportUserData

func (_mock *MockProfileServiceInterface) ExportUserData(ctx context.Context, principal kernel.Principal) (*user.UserDataExport, error)

ExportUserData provides a mock function for the type MockProfileServiceInterface

func (*MockProfileServiceInterface) GetProfile

func (_mock *MockProfileServiceInterface) GetProfile(ctx context.Context, principal kernel.Principal) (*user.Profile, error)

GetProfile provides a mock function for the type MockProfileServiceInterface

func (*MockProfileServiceInterface) UpdateCustomFields

func (_mock *MockProfileServiceInterface) UpdateCustomFields(ctx context.Context, principal kernel.Principal, customFields map[string]any, isAdmin bool) error

UpdateCustomFields provides a mock function for the type MockProfileServiceInterface

func (*MockProfileServiceInterface) UpdateEmail

func (_mock *MockProfileServiceInterface) UpdateEmail(ctx context.Context, principal kernel.Principal, newEmail string, currentPasswordHash string) error

UpdateEmail provides a mock function for the type MockProfileServiceInterface

func (*MockProfileServiceInterface) UpdateName

func (_mock *MockProfileServiceInterface) UpdateName(ctx context.Context, principal kernel.Principal, name string) error

UpdateName provides a mock function for the type MockProfileServiceInterface

func (*MockProfileServiceInterface) VerifyEmailUpdate

func (_mock *MockProfileServiceInterface) VerifyEmailUpdate(ctx context.Context, token string) (int, string, error)

VerifyEmailUpdate provides a mock function for the type MockProfileServiceInterface

type MockProfileServiceInterface_ChangePassword_Call

type MockProfileServiceInterface_ChangePassword_Call struct {
	*mock.Call
}

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

func (*MockProfileServiceInterface_ChangePassword_Call) Return

func (*MockProfileServiceInterface_ChangePassword_Call) Run

func (*MockProfileServiceInterface_ChangePassword_Call) RunAndReturn

type MockProfileServiceInterface_Expecter

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

func (*MockProfileServiceInterface_Expecter) ChangePassword

func (_e *MockProfileServiceInterface_Expecter) ChangePassword(ctx any, principal any, currentPassword any, newPassword any) *MockProfileServiceInterface_ChangePassword_Call

ChangePassword is a helper method to define mock.On call

  • ctx context.Context
  • principal kernel.Principal
  • currentPassword string
  • newPassword string

func (*MockProfileServiceInterface_Expecter) ExportUserData

ExportUserData is a helper method to define mock.On call

  • ctx context.Context
  • principal kernel.Principal

func (*MockProfileServiceInterface_Expecter) GetProfile

GetProfile is a helper method to define mock.On call

  • ctx context.Context
  • principal kernel.Principal

func (*MockProfileServiceInterface_Expecter) UpdateCustomFields

func (_e *MockProfileServiceInterface_Expecter) UpdateCustomFields(ctx any, principal any, customFields any, isAdmin any) *MockProfileServiceInterface_UpdateCustomFields_Call

UpdateCustomFields is a helper method to define mock.On call

  • ctx context.Context
  • principal kernel.Principal
  • customFields map[string]any
  • isAdmin bool

func (*MockProfileServiceInterface_Expecter) UpdateEmail

func (_e *MockProfileServiceInterface_Expecter) UpdateEmail(ctx any, principal any, newEmail any, currentPasswordHash any) *MockProfileServiceInterface_UpdateEmail_Call

UpdateEmail is a helper method to define mock.On call

  • ctx context.Context
  • principal kernel.Principal
  • newEmail string
  • currentPasswordHash string

func (*MockProfileServiceInterface_Expecter) UpdateName

UpdateName is a helper method to define mock.On call

  • ctx context.Context
  • principal kernel.Principal
  • name string

func (*MockProfileServiceInterface_Expecter) VerifyEmailUpdate

VerifyEmailUpdate is a helper method to define mock.On call

  • ctx context.Context
  • token string

type MockProfileServiceInterface_ExportUserData_Call

type MockProfileServiceInterface_ExportUserData_Call struct {
	*mock.Call
}

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

func (*MockProfileServiceInterface_ExportUserData_Call) Return

func (*MockProfileServiceInterface_ExportUserData_Call) Run

func (*MockProfileServiceInterface_ExportUserData_Call) RunAndReturn

type MockProfileServiceInterface_GetProfile_Call

type MockProfileServiceInterface_GetProfile_Call struct {
	*mock.Call
}

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

func (*MockProfileServiceInterface_GetProfile_Call) Return

func (*MockProfileServiceInterface_GetProfile_Call) Run

func (*MockProfileServiceInterface_GetProfile_Call) RunAndReturn

type MockProfileServiceInterface_UpdateCustomFields_Call

type MockProfileServiceInterface_UpdateCustomFields_Call struct {
	*mock.Call
}

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

func (*MockProfileServiceInterface_UpdateCustomFields_Call) Return

func (*MockProfileServiceInterface_UpdateCustomFields_Call) Run

func (*MockProfileServiceInterface_UpdateCustomFields_Call) RunAndReturn

type MockProfileServiceInterface_UpdateEmail_Call

type MockProfileServiceInterface_UpdateEmail_Call struct {
	*mock.Call
}

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

func (*MockProfileServiceInterface_UpdateEmail_Call) Return

func (*MockProfileServiceInterface_UpdateEmail_Call) Run

func (*MockProfileServiceInterface_UpdateEmail_Call) RunAndReturn

func (_c *MockProfileServiceInterface_UpdateEmail_Call) RunAndReturn(run func(ctx context.Context, principal kernel.Principal, newEmail string, currentPasswordHash string) error) *MockProfileServiceInterface_UpdateEmail_Call

type MockProfileServiceInterface_UpdateName_Call

type MockProfileServiceInterface_UpdateName_Call struct {
	*mock.Call
}

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

func (*MockProfileServiceInterface_UpdateName_Call) Return

func (*MockProfileServiceInterface_UpdateName_Call) Run

func (*MockProfileServiceInterface_UpdateName_Call) RunAndReturn

type MockProfileServiceInterface_VerifyEmailUpdate_Call

type MockProfileServiceInterface_VerifyEmailUpdate_Call struct {
	*mock.Call
}

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

func (*MockProfileServiceInterface_VerifyEmailUpdate_Call) Return

func (*MockProfileServiceInterface_VerifyEmailUpdate_Call) Run

func (*MockProfileServiceInterface_VerifyEmailUpdate_Call) RunAndReturn

type MockRoleAssigner

type MockRoleAssigner struct {
	mock.Mock
}

MockRoleAssigner is an autogenerated mock type for the RoleAssigner type

func NewMockRoleAssigner

func NewMockRoleAssigner(t interface {
	mock.TestingT
	Cleanup(func())
}) *MockRoleAssigner

NewMockRoleAssigner creates a new instance of MockRoleAssigner. 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 (*MockRoleAssigner) EXPECT

func (*MockRoleAssigner) IsAssignable

func (_mock *MockRoleAssigner) IsAssignable(role string) bool

IsAssignable provides a mock function for the type MockRoleAssigner

type MockRoleAssigner_Expecter

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

func (*MockRoleAssigner_Expecter) IsAssignable

IsAssignable is a helper method to define mock.On call

  • role string

type MockRoleAssigner_IsAssignable_Call

type MockRoleAssigner_IsAssignable_Call struct {
	*mock.Call
}

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

func (*MockRoleAssigner_IsAssignable_Call) Return

func (*MockRoleAssigner_IsAssignable_Call) Run

func (*MockRoleAssigner_IsAssignable_Call) RunAndReturn

type MockUserRepo

type MockUserRepo struct {
	mock.Mock
}

MockUserRepo is an autogenerated mock type for the UserRepo type

func NewMockUserRepo

func NewMockUserRepo(t interface {
	mock.TestingT
	Cleanup(func())
}) *MockUserRepo

NewMockUserRepo creates a new instance of MockUserRepo. 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 (*MockUserRepo) CheckEmailExistsForOtherUser

func (_mock *MockUserRepo) CheckEmailExistsForOtherUser(ctx context.Context, userID int, email string) (bool, error)

CheckEmailExistsForOtherUser provides a mock function for the type MockUserRepo

func (*MockUserRepo) CountUsers

func (_mock *MockUserRepo) CountUsers(ctx context.Context, status string) (int, error)

CountUsers provides a mock function for the type MockUserRepo

func (*MockUserRepo) DeleteUser

func (_mock *MockUserRepo) DeleteUser(ctx context.Context, userID int) error

DeleteUser provides a mock function for the type MockUserRepo

func (*MockUserRepo) EXPECT

func (_m *MockUserRepo) EXPECT() *MockUserRepo_Expecter

func (*MockUserRepo) GetAllUsers

func (_mock *MockUserRepo) GetAllUsers(ctx context.Context, status string, limit int, offset int) ([]*user.User, error)

GetAllUsers provides a mock function for the type MockUserRepo

func (*MockUserRepo) GetPendingUsers

func (_mock *MockUserRepo) GetPendingUsers(ctx context.Context, limit int, offset int) ([]*user.User, error)

GetPendingUsers provides a mock function for the type MockUserRepo

func (*MockUserRepo) GetUserByID

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

GetUserByID provides a mock function for the type MockUserRepo

func (*MockUserRepo) GetUserStatus

func (_mock *MockUserRepo) GetUserStatus(ctx context.Context, userID int) (string, error)

GetUserStatus provides a mock function for the type MockUserRepo

func (*MockUserRepo) SetEmailVerified

func (_mock *MockUserRepo) SetEmailVerified(ctx context.Context, userID int, emailVerified bool) error

SetEmailVerified provides a mock function for the type MockUserRepo

func (*MockUserRepo) SoftDeleteUser

func (_mock *MockUserRepo) SoftDeleteUser(ctx context.Context, userID int) error

SoftDeleteUser provides a mock function for the type MockUserRepo

func (*MockUserRepo) SuspendUser

func (_mock *MockUserRepo) SuspendUser(ctx context.Context, userID int) error

SuspendUser provides a mock function for the type MockUserRepo

func (*MockUserRepo) UnsuspendUser

func (_mock *MockUserRepo) UnsuspendUser(ctx context.Context, userID int) error

UnsuspendUser provides a mock function for the type MockUserRepo

func (*MockUserRepo) UpdateProfile

func (_mock *MockUserRepo) UpdateProfile(ctx context.Context, userID int, name string, email string, role string, customFields map[string]any) error

UpdateProfile provides a mock function for the type MockUserRepo

func (*MockUserRepo) UpdateUserStatus

func (_mock *MockUserRepo) UpdateUserStatus(ctx context.Context, userID int, status string) error

UpdateUserStatus provides a mock function for the type MockUserRepo

func (*MockUserRepo) UpdateUserStatusIfCurrentStatus

func (_mock *MockUserRepo) UpdateUserStatusIfCurrentStatus(ctx context.Context, userID int, currentStatus string, newStatus string) error

UpdateUserStatusIfCurrentStatus provides a mock function for the type MockUserRepo

type MockUserRepo_CheckEmailExistsForOtherUser_Call

type MockUserRepo_CheckEmailExistsForOtherUser_Call struct {
	*mock.Call
}

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

func (*MockUserRepo_CheckEmailExistsForOtherUser_Call) Return

func (*MockUserRepo_CheckEmailExistsForOtherUser_Call) Run

func (*MockUserRepo_CheckEmailExistsForOtherUser_Call) RunAndReturn

type MockUserRepo_CountUsers_Call

type MockUserRepo_CountUsers_Call struct {
	*mock.Call
}

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

func (*MockUserRepo_CountUsers_Call) Return

func (*MockUserRepo_CountUsers_Call) Run

func (*MockUserRepo_CountUsers_Call) RunAndReturn

func (_c *MockUserRepo_CountUsers_Call) RunAndReturn(run func(ctx context.Context, status string) (int, error)) *MockUserRepo_CountUsers_Call

type MockUserRepo_DeleteUser_Call

type MockUserRepo_DeleteUser_Call struct {
	*mock.Call
}

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

func (*MockUserRepo_DeleteUser_Call) Return

func (*MockUserRepo_DeleteUser_Call) Run

func (*MockUserRepo_DeleteUser_Call) RunAndReturn

func (_c *MockUserRepo_DeleteUser_Call) RunAndReturn(run func(ctx context.Context, userID int) error) *MockUserRepo_DeleteUser_Call

type MockUserRepo_Expecter

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

func (*MockUserRepo_Expecter) CheckEmailExistsForOtherUser

func (_e *MockUserRepo_Expecter) CheckEmailExistsForOtherUser(ctx any, userID any, email any) *MockUserRepo_CheckEmailExistsForOtherUser_Call

CheckEmailExistsForOtherUser is a helper method to define mock.On call

  • ctx context.Context
  • userID int
  • email string

func (*MockUserRepo_Expecter) CountUsers

func (_e *MockUserRepo_Expecter) CountUsers(ctx any, status any) *MockUserRepo_CountUsers_Call

CountUsers is a helper method to define mock.On call

  • ctx context.Context
  • status string

func (*MockUserRepo_Expecter) DeleteUser

func (_e *MockUserRepo_Expecter) DeleteUser(ctx any, userID any) *MockUserRepo_DeleteUser_Call

DeleteUser is a helper method to define mock.On call

  • ctx context.Context
  • userID int

func (*MockUserRepo_Expecter) GetAllUsers

func (_e *MockUserRepo_Expecter) GetAllUsers(ctx any, status any, limit any, offset any) *MockUserRepo_GetAllUsers_Call

GetAllUsers is a helper method to define mock.On call

  • ctx context.Context
  • status string
  • limit int
  • offset int

func (*MockUserRepo_Expecter) GetPendingUsers

func (_e *MockUserRepo_Expecter) GetPendingUsers(ctx any, limit any, offset any) *MockUserRepo_GetPendingUsers_Call

GetPendingUsers is a helper method to define mock.On call

  • ctx context.Context
  • limit int
  • offset int

func (*MockUserRepo_Expecter) GetUserByID

func (_e *MockUserRepo_Expecter) GetUserByID(ctx any, userID any) *MockUserRepo_GetUserByID_Call

GetUserByID is a helper method to define mock.On call

  • ctx context.Context
  • userID int

func (*MockUserRepo_Expecter) GetUserStatus

func (_e *MockUserRepo_Expecter) GetUserStatus(ctx any, userID any) *MockUserRepo_GetUserStatus_Call

GetUserStatus is a helper method to define mock.On call

  • ctx context.Context
  • userID int

func (*MockUserRepo_Expecter) SetEmailVerified

func (_e *MockUserRepo_Expecter) SetEmailVerified(ctx any, userID any, emailVerified any) *MockUserRepo_SetEmailVerified_Call

SetEmailVerified is a helper method to define mock.On call

  • ctx context.Context
  • userID int
  • emailVerified bool

func (*MockUserRepo_Expecter) SoftDeleteUser

func (_e *MockUserRepo_Expecter) SoftDeleteUser(ctx any, userID any) *MockUserRepo_SoftDeleteUser_Call

SoftDeleteUser is a helper method to define mock.On call

  • ctx context.Context
  • userID int

func (*MockUserRepo_Expecter) SuspendUser

func (_e *MockUserRepo_Expecter) SuspendUser(ctx any, userID any) *MockUserRepo_SuspendUser_Call

SuspendUser is a helper method to define mock.On call

  • ctx context.Context
  • userID int

func (*MockUserRepo_Expecter) UnsuspendUser

func (_e *MockUserRepo_Expecter) UnsuspendUser(ctx any, userID any) *MockUserRepo_UnsuspendUser_Call

UnsuspendUser is a helper method to define mock.On call

  • ctx context.Context
  • userID int

func (*MockUserRepo_Expecter) UpdateProfile

func (_e *MockUserRepo_Expecter) UpdateProfile(ctx any, userID any, name any, email any, role any, customFields any) *MockUserRepo_UpdateProfile_Call

UpdateProfile is a helper method to define mock.On call

  • ctx context.Context
  • userID int
  • name string
  • email string
  • role string
  • customFields map[string]any

func (*MockUserRepo_Expecter) UpdateUserStatus

func (_e *MockUserRepo_Expecter) UpdateUserStatus(ctx any, userID any, status any) *MockUserRepo_UpdateUserStatus_Call

UpdateUserStatus is a helper method to define mock.On call

  • ctx context.Context
  • userID int
  • status string

func (*MockUserRepo_Expecter) UpdateUserStatusIfCurrentStatus

func (_e *MockUserRepo_Expecter) UpdateUserStatusIfCurrentStatus(ctx any, userID any, currentStatus any, newStatus any) *MockUserRepo_UpdateUserStatusIfCurrentStatus_Call

UpdateUserStatusIfCurrentStatus is a helper method to define mock.On call

  • ctx context.Context
  • userID int
  • currentStatus string
  • newStatus string

type MockUserRepo_GetAllUsers_Call

type MockUserRepo_GetAllUsers_Call struct {
	*mock.Call
}

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

func (*MockUserRepo_GetAllUsers_Call) Return

func (_c *MockUserRepo_GetAllUsers_Call) Return(users []*user.User, err error) *MockUserRepo_GetAllUsers_Call

func (*MockUserRepo_GetAllUsers_Call) Run

func (_c *MockUserRepo_GetAllUsers_Call) Run(run func(ctx context.Context, status string, limit int, offset int)) *MockUserRepo_GetAllUsers_Call

func (*MockUserRepo_GetAllUsers_Call) RunAndReturn

func (_c *MockUserRepo_GetAllUsers_Call) RunAndReturn(run func(ctx context.Context, status string, limit int, offset int) ([]*user.User, error)) *MockUserRepo_GetAllUsers_Call

type MockUserRepo_GetPendingUsers_Call

type MockUserRepo_GetPendingUsers_Call struct {
	*mock.Call
}

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

func (*MockUserRepo_GetPendingUsers_Call) Return

func (_c *MockUserRepo_GetPendingUsers_Call) Return(users []*user.User, err error) *MockUserRepo_GetPendingUsers_Call

func (*MockUserRepo_GetPendingUsers_Call) Run

func (*MockUserRepo_GetPendingUsers_Call) RunAndReturn

func (_c *MockUserRepo_GetPendingUsers_Call) RunAndReturn(run func(ctx context.Context, limit int, offset int) ([]*user.User, error)) *MockUserRepo_GetPendingUsers_Call

type MockUserRepo_GetUserByID_Call

type MockUserRepo_GetUserByID_Call struct {
	*mock.Call
}

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

func (*MockUserRepo_GetUserByID_Call) Return

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

func (*MockUserRepo_GetUserByID_Call) Run

func (*MockUserRepo_GetUserByID_Call) RunAndReturn

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

type MockUserRepo_GetUserStatus_Call

type MockUserRepo_GetUserStatus_Call struct {
	*mock.Call
}

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

func (*MockUserRepo_GetUserStatus_Call) Return

func (*MockUserRepo_GetUserStatus_Call) Run

func (*MockUserRepo_GetUserStatus_Call) RunAndReturn

type MockUserRepo_SetEmailVerified_Call

type MockUserRepo_SetEmailVerified_Call struct {
	*mock.Call
}

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

func (*MockUserRepo_SetEmailVerified_Call) Return

func (*MockUserRepo_SetEmailVerified_Call) Run

func (_c *MockUserRepo_SetEmailVerified_Call) Run(run func(ctx context.Context, userID int, emailVerified bool)) *MockUserRepo_SetEmailVerified_Call

func (*MockUserRepo_SetEmailVerified_Call) RunAndReturn

func (_c *MockUserRepo_SetEmailVerified_Call) RunAndReturn(run func(ctx context.Context, userID int, emailVerified bool) error) *MockUserRepo_SetEmailVerified_Call

type MockUserRepo_SoftDeleteUser_Call

type MockUserRepo_SoftDeleteUser_Call struct {
	*mock.Call
}

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

func (*MockUserRepo_SoftDeleteUser_Call) Return

func (*MockUserRepo_SoftDeleteUser_Call) Run

func (*MockUserRepo_SoftDeleteUser_Call) RunAndReturn

type MockUserRepo_SuspendUser_Call

type MockUserRepo_SuspendUser_Call struct {
	*mock.Call
}

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

func (*MockUserRepo_SuspendUser_Call) Return

func (*MockUserRepo_SuspendUser_Call) Run

func (*MockUserRepo_SuspendUser_Call) RunAndReturn

func (_c *MockUserRepo_SuspendUser_Call) RunAndReturn(run func(ctx context.Context, userID int) error) *MockUserRepo_SuspendUser_Call

type MockUserRepo_UnsuspendUser_Call

type MockUserRepo_UnsuspendUser_Call struct {
	*mock.Call
}

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

func (*MockUserRepo_UnsuspendUser_Call) Return

func (*MockUserRepo_UnsuspendUser_Call) Run

func (*MockUserRepo_UnsuspendUser_Call) RunAndReturn

type MockUserRepo_UpdateProfile_Call

type MockUserRepo_UpdateProfile_Call struct {
	*mock.Call
}

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

func (*MockUserRepo_UpdateProfile_Call) Return

func (*MockUserRepo_UpdateProfile_Call) Run

func (_c *MockUserRepo_UpdateProfile_Call) Run(run func(ctx context.Context, userID int, name string, email string, role string, customFields map[string]any)) *MockUserRepo_UpdateProfile_Call

func (*MockUserRepo_UpdateProfile_Call) RunAndReturn

func (_c *MockUserRepo_UpdateProfile_Call) RunAndReturn(run func(ctx context.Context, userID int, name string, email string, role string, customFields map[string]any) error) *MockUserRepo_UpdateProfile_Call

type MockUserRepo_UpdateUserStatusIfCurrentStatus_Call

type MockUserRepo_UpdateUserStatusIfCurrentStatus_Call struct {
	*mock.Call
}

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

func (*MockUserRepo_UpdateUserStatusIfCurrentStatus_Call) Return

func (*MockUserRepo_UpdateUserStatusIfCurrentStatus_Call) Run

func (*MockUserRepo_UpdateUserStatusIfCurrentStatus_Call) RunAndReturn

type MockUserRepo_UpdateUserStatus_Call

type MockUserRepo_UpdateUserStatus_Call struct {
	*mock.Call
}

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

func (*MockUserRepo_UpdateUserStatus_Call) Return

func (*MockUserRepo_UpdateUserStatus_Call) Run

func (*MockUserRepo_UpdateUserStatus_Call) RunAndReturn

func (_c *MockUserRepo_UpdateUserStatus_Call) RunAndReturn(run func(ctx context.Context, userID int, status string) error) *MockUserRepo_UpdateUserStatus_Call

Jump to

Keyboard shortcuts

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