Documentation
¶
Index ¶
- type MockAccountDeletionServiceInterface
- func (_mock *MockAccountDeletionServiceInterface) DeleteAccount(ctx context.Context, principal kernel.Principal, userEmail string) error
- func (_m *MockAccountDeletionServiceInterface) EXPECT() *MockAccountDeletionServiceInterface_Expecter
- func (_mock *MockAccountDeletionServiceInterface) ValidateConfirmationString(confirmation string) error
- type MockAccountDeletionServiceInterface_DeleteAccount_Call
- func (_c *MockAccountDeletionServiceInterface_DeleteAccount_Call) Return(err error) *MockAccountDeletionServiceInterface_DeleteAccount_Call
- func (_c *MockAccountDeletionServiceInterface_DeleteAccount_Call) Run(run func(ctx context.Context, principal kernel.Principal, userEmail string)) *MockAccountDeletionServiceInterface_DeleteAccount_Call
- func (_c *MockAccountDeletionServiceInterface_DeleteAccount_Call) RunAndReturn(...) *MockAccountDeletionServiceInterface_DeleteAccount_Call
- type MockAccountDeletionServiceInterface_Expecter
- func (_e *MockAccountDeletionServiceInterface_Expecter) DeleteAccount(ctx any, principal any, userEmail any) *MockAccountDeletionServiceInterface_DeleteAccount_Call
- func (_e *MockAccountDeletionServiceInterface_Expecter) ValidateConfirmationString(confirmation any) *MockAccountDeletionServiceInterface_ValidateConfirmationString_Call
- type MockAccountDeletionServiceInterface_ValidateConfirmationString_Call
- func (_c *MockAccountDeletionServiceInterface_ValidateConfirmationString_Call) Return(err error) *MockAccountDeletionServiceInterface_ValidateConfirmationString_Call
- func (_c *MockAccountDeletionServiceInterface_ValidateConfirmationString_Call) Run(run func(confirmation string)) *MockAccountDeletionServiceInterface_ValidateConfirmationString_Call
- func (_c *MockAccountDeletionServiceInterface_ValidateConfirmationString_Call) RunAndReturn(run func(confirmation string) error) *MockAccountDeletionServiceInterface_ValidateConfirmationString_Call
- type MockAdminCreateUserRepo
- func (_mock *MockAdminCreateUserRepo) CheckEmailExists(ctx context.Context, email string) (bool, error)
- func (_mock *MockAdminCreateUserRepo) CheckUsernameExists(ctx context.Context, username string) (bool, error)
- func (_mock *MockAdminCreateUserRepo) CreateUser(ctx context.Context, user1 *user.User) error
- func (_m *MockAdminCreateUserRepo) EXPECT() *MockAdminCreateUserRepo_Expecter
- type MockAdminCreateUserRepo_CheckEmailExists_Call
- func (_c *MockAdminCreateUserRepo_CheckEmailExists_Call) Return(b bool, err error) *MockAdminCreateUserRepo_CheckEmailExists_Call
- func (_c *MockAdminCreateUserRepo_CheckEmailExists_Call) Run(run func(ctx context.Context, email string)) *MockAdminCreateUserRepo_CheckEmailExists_Call
- func (_c *MockAdminCreateUserRepo_CheckEmailExists_Call) RunAndReturn(run func(ctx context.Context, email string) (bool, error)) *MockAdminCreateUserRepo_CheckEmailExists_Call
- type MockAdminCreateUserRepo_CheckUsernameExists_Call
- func (_c *MockAdminCreateUserRepo_CheckUsernameExists_Call) Return(b bool, err error) *MockAdminCreateUserRepo_CheckUsernameExists_Call
- func (_c *MockAdminCreateUserRepo_CheckUsernameExists_Call) Run(run func(ctx context.Context, username string)) *MockAdminCreateUserRepo_CheckUsernameExists_Call
- func (_c *MockAdminCreateUserRepo_CheckUsernameExists_Call) RunAndReturn(run func(ctx context.Context, username string) (bool, error)) *MockAdminCreateUserRepo_CheckUsernameExists_Call
- type MockAdminCreateUserRepo_CreateUser_Call
- func (_c *MockAdminCreateUserRepo_CreateUser_Call) Return(err error) *MockAdminCreateUserRepo_CreateUser_Call
- func (_c *MockAdminCreateUserRepo_CreateUser_Call) Run(run func(ctx context.Context, user1 *user.User)) *MockAdminCreateUserRepo_CreateUser_Call
- func (_c *MockAdminCreateUserRepo_CreateUser_Call) RunAndReturn(run func(ctx context.Context, user1 *user.User) error) *MockAdminCreateUserRepo_CreateUser_Call
- type MockAdminCreateUserRepo_Expecter
- func (_e *MockAdminCreateUserRepo_Expecter) CheckEmailExists(ctx any, email any) *MockAdminCreateUserRepo_CheckEmailExists_Call
- func (_e *MockAdminCreateUserRepo_Expecter) CheckUsernameExists(ctx any, username any) *MockAdminCreateUserRepo_CheckUsernameExists_Call
- func (_e *MockAdminCreateUserRepo_Expecter) CreateUser(ctx any, user1 any) *MockAdminCreateUserRepo_CreateUser_Call
- type MockBlockedEmailRepo
- func (_mock *MockBlockedEmailRepo) BlockEmail(ctx context.Context, email string, reason string) error
- func (_m *MockBlockedEmailRepo) EXPECT() *MockBlockedEmailRepo_Expecter
- func (_mock *MockBlockedEmailRepo) IsEmailBlocked(ctx context.Context, email string) (bool, error)
- func (_mock *MockBlockedEmailRepo) UnblockEmail(ctx context.Context, email string) error
- type MockBlockedEmailRepo_BlockEmail_Call
- func (_c *MockBlockedEmailRepo_BlockEmail_Call) Return(err error) *MockBlockedEmailRepo_BlockEmail_Call
- func (_c *MockBlockedEmailRepo_BlockEmail_Call) Run(run func(ctx context.Context, email string, reason string)) *MockBlockedEmailRepo_BlockEmail_Call
- func (_c *MockBlockedEmailRepo_BlockEmail_Call) RunAndReturn(run func(ctx context.Context, email string, reason string) error) *MockBlockedEmailRepo_BlockEmail_Call
- type MockBlockedEmailRepo_Expecter
- func (_e *MockBlockedEmailRepo_Expecter) BlockEmail(ctx any, email any, reason any) *MockBlockedEmailRepo_BlockEmail_Call
- func (_e *MockBlockedEmailRepo_Expecter) IsEmailBlocked(ctx any, email any) *MockBlockedEmailRepo_IsEmailBlocked_Call
- func (_e *MockBlockedEmailRepo_Expecter) UnblockEmail(ctx any, email any) *MockBlockedEmailRepo_UnblockEmail_Call
- type MockBlockedEmailRepo_IsEmailBlocked_Call
- func (_c *MockBlockedEmailRepo_IsEmailBlocked_Call) Return(b bool, err error) *MockBlockedEmailRepo_IsEmailBlocked_Call
- func (_c *MockBlockedEmailRepo_IsEmailBlocked_Call) Run(run func(ctx context.Context, email string)) *MockBlockedEmailRepo_IsEmailBlocked_Call
- func (_c *MockBlockedEmailRepo_IsEmailBlocked_Call) RunAndReturn(run func(ctx context.Context, email string) (bool, error)) *MockBlockedEmailRepo_IsEmailBlocked_Call
- type MockBlockedEmailRepo_UnblockEmail_Call
- func (_c *MockBlockedEmailRepo_UnblockEmail_Call) Return(err error) *MockBlockedEmailRepo_UnblockEmail_Call
- func (_c *MockBlockedEmailRepo_UnblockEmail_Call) Run(run func(ctx context.Context, email string)) *MockBlockedEmailRepo_UnblockEmail_Call
- func (_c *MockBlockedEmailRepo_UnblockEmail_Call) RunAndReturn(run func(ctx context.Context, email string) error) *MockBlockedEmailRepo_UnblockEmail_Call
- type MockCredentialPolicy
- func (_m *MockCredentialPolicy) EXPECT() *MockCredentialPolicy_Expecter
- func (_mock *MockCredentialPolicy) GeneratePassword(length int) (string, error)
- func (_mock *MockCredentialPolicy) HashPassword(password string) (string, error)
- func (_mock *MockCredentialPolicy) ValidateEmail(email string) error
- func (_mock *MockCredentialPolicy) ValidatePassword(password string) error
- func (_mock *MockCredentialPolicy) ValidateUsername(username string) error
- func (_mock *MockCredentialPolicy) VerifyPassword(hash string, password string) error
- type MockCredentialPolicy_Expecter
- func (_e *MockCredentialPolicy_Expecter) GeneratePassword(length any) *MockCredentialPolicy_GeneratePassword_Call
- func (_e *MockCredentialPolicy_Expecter) HashPassword(password any) *MockCredentialPolicy_HashPassword_Call
- func (_e *MockCredentialPolicy_Expecter) ValidateEmail(email any) *MockCredentialPolicy_ValidateEmail_Call
- func (_e *MockCredentialPolicy_Expecter) ValidatePassword(password any) *MockCredentialPolicy_ValidatePassword_Call
- func (_e *MockCredentialPolicy_Expecter) ValidateUsername(username any) *MockCredentialPolicy_ValidateUsername_Call
- func (_e *MockCredentialPolicy_Expecter) VerifyPassword(hash any, password any) *MockCredentialPolicy_VerifyPassword_Call
- type MockCredentialPolicy_GeneratePassword_Call
- func (_c *MockCredentialPolicy_GeneratePassword_Call) Return(s string, err error) *MockCredentialPolicy_GeneratePassword_Call
- func (_c *MockCredentialPolicy_GeneratePassword_Call) Run(run func(length int)) *MockCredentialPolicy_GeneratePassword_Call
- func (_c *MockCredentialPolicy_GeneratePassword_Call) RunAndReturn(run func(length int) (string, error)) *MockCredentialPolicy_GeneratePassword_Call
- type MockCredentialPolicy_HashPassword_Call
- func (_c *MockCredentialPolicy_HashPassword_Call) Return(s string, err error) *MockCredentialPolicy_HashPassword_Call
- func (_c *MockCredentialPolicy_HashPassword_Call) Run(run func(password string)) *MockCredentialPolicy_HashPassword_Call
- func (_c *MockCredentialPolicy_HashPassword_Call) RunAndReturn(run func(password string) (string, error)) *MockCredentialPolicy_HashPassword_Call
- type MockCredentialPolicy_ValidateEmail_Call
- func (_c *MockCredentialPolicy_ValidateEmail_Call) Return(err error) *MockCredentialPolicy_ValidateEmail_Call
- func (_c *MockCredentialPolicy_ValidateEmail_Call) Run(run func(email string)) *MockCredentialPolicy_ValidateEmail_Call
- func (_c *MockCredentialPolicy_ValidateEmail_Call) RunAndReturn(run func(email string) error) *MockCredentialPolicy_ValidateEmail_Call
- type MockCredentialPolicy_ValidatePassword_Call
- func (_c *MockCredentialPolicy_ValidatePassword_Call) Return(err error) *MockCredentialPolicy_ValidatePassword_Call
- func (_c *MockCredentialPolicy_ValidatePassword_Call) Run(run func(password string)) *MockCredentialPolicy_ValidatePassword_Call
- func (_c *MockCredentialPolicy_ValidatePassword_Call) RunAndReturn(run func(password string) error) *MockCredentialPolicy_ValidatePassword_Call
- type MockCredentialPolicy_ValidateUsername_Call
- func (_c *MockCredentialPolicy_ValidateUsername_Call) Return(err error) *MockCredentialPolicy_ValidateUsername_Call
- func (_c *MockCredentialPolicy_ValidateUsername_Call) Run(run func(username string)) *MockCredentialPolicy_ValidateUsername_Call
- func (_c *MockCredentialPolicy_ValidateUsername_Call) RunAndReturn(run func(username string) error) *MockCredentialPolicy_ValidateUsername_Call
- type MockCredentialPolicy_VerifyPassword_Call
- func (_c *MockCredentialPolicy_VerifyPassword_Call) Return(err error) *MockCredentialPolicy_VerifyPassword_Call
- func (_c *MockCredentialPolicy_VerifyPassword_Call) Run(run func(hash string, password string)) *MockCredentialPolicy_VerifyPassword_Call
- func (_c *MockCredentialPolicy_VerifyPassword_Call) RunAndReturn(run func(hash string, password string) error) *MockCredentialPolicy_VerifyPassword_Call
- type MockMailer
- func (_m *MockMailer) EXPECT() *MockMailer_Expecter
- func (_mock *MockMailer) SendAccountDeletedNotification(ctx context.Context, to string, username string) error
- func (_mock *MockMailer) SendDataExportNotificationEmail(ctx context.Context, to string, username string) error
- func (_mock *MockMailer) SendEmailUpdateVerificationEmail(ctx context.Context, to string, username string, token string) error
- type MockMailer_Expecter
- func (_e *MockMailer_Expecter) SendAccountDeletedNotification(ctx any, to any, username any) *MockMailer_SendAccountDeletedNotification_Call
- func (_e *MockMailer_Expecter) SendDataExportNotificationEmail(ctx any, to any, username any) *MockMailer_SendDataExportNotificationEmail_Call
- func (_e *MockMailer_Expecter) SendEmailUpdateVerificationEmail(ctx any, to any, username any, token any) *MockMailer_SendEmailUpdateVerificationEmail_Call
- type MockMailer_SendAccountDeletedNotification_Call
- func (_c *MockMailer_SendAccountDeletedNotification_Call) Return(err error) *MockMailer_SendAccountDeletedNotification_Call
- func (_c *MockMailer_SendAccountDeletedNotification_Call) Run(run func(ctx context.Context, to string, username string)) *MockMailer_SendAccountDeletedNotification_Call
- func (_c *MockMailer_SendAccountDeletedNotification_Call) RunAndReturn(run func(ctx context.Context, to string, username string) error) *MockMailer_SendAccountDeletedNotification_Call
- type MockMailer_SendDataExportNotificationEmail_Call
- func (_c *MockMailer_SendDataExportNotificationEmail_Call) Return(err error) *MockMailer_SendDataExportNotificationEmail_Call
- func (_c *MockMailer_SendDataExportNotificationEmail_Call) Run(run func(ctx context.Context, to string, username string)) *MockMailer_SendDataExportNotificationEmail_Call
- func (_c *MockMailer_SendDataExportNotificationEmail_Call) RunAndReturn(run func(ctx context.Context, to string, username string) error) *MockMailer_SendDataExportNotificationEmail_Call
- type MockMailer_SendEmailUpdateVerificationEmail_Call
- func (_c *MockMailer_SendEmailUpdateVerificationEmail_Call) Return(err error) *MockMailer_SendEmailUpdateVerificationEmail_Call
- func (_c *MockMailer_SendEmailUpdateVerificationEmail_Call) Run(run func(ctx context.Context, to string, username string, token string)) *MockMailer_SendEmailUpdateVerificationEmail_Call
- func (_c *MockMailer_SendEmailUpdateVerificationEmail_Call) RunAndReturn(run func(ctx context.Context, to string, username string, token string) error) *MockMailer_SendEmailUpdateVerificationEmail_Call
- type MockProfileServiceInterface
- func (_mock *MockProfileServiceInterface) ChangePassword(ctx context.Context, principal kernel.Principal, currentPassword string, ...) error
- func (_m *MockProfileServiceInterface) EXPECT() *MockProfileServiceInterface_Expecter
- func (_mock *MockProfileServiceInterface) ExportUserData(ctx context.Context, principal kernel.Principal) (*user.UserDataExport, error)
- func (_mock *MockProfileServiceInterface) GetProfile(ctx context.Context, principal kernel.Principal) (*user.Profile, error)
- func (_mock *MockProfileServiceInterface) UpdateCustomFields(ctx context.Context, principal kernel.Principal, customFields map[string]any, ...) error
- func (_mock *MockProfileServiceInterface) UpdateEmail(ctx context.Context, principal kernel.Principal, newEmail string, ...) error
- func (_mock *MockProfileServiceInterface) UpdateName(ctx context.Context, principal kernel.Principal, name string) error
- func (_mock *MockProfileServiceInterface) VerifyEmailUpdate(ctx context.Context, token string) (int, string, error)
- type MockProfileServiceInterface_ChangePassword_Call
- func (_c *MockProfileServiceInterface_ChangePassword_Call) Return(err error) *MockProfileServiceInterface_ChangePassword_Call
- func (_c *MockProfileServiceInterface_ChangePassword_Call) Run(...) *MockProfileServiceInterface_ChangePassword_Call
- func (_c *MockProfileServiceInterface_ChangePassword_Call) RunAndReturn(...) *MockProfileServiceInterface_ChangePassword_Call
- type MockProfileServiceInterface_Expecter
- func (_e *MockProfileServiceInterface_Expecter) ChangePassword(ctx any, principal any, currentPassword any, newPassword any) *MockProfileServiceInterface_ChangePassword_Call
- func (_e *MockProfileServiceInterface_Expecter) ExportUserData(ctx any, principal any) *MockProfileServiceInterface_ExportUserData_Call
- func (_e *MockProfileServiceInterface_Expecter) GetProfile(ctx any, principal any) *MockProfileServiceInterface_GetProfile_Call
- func (_e *MockProfileServiceInterface_Expecter) UpdateCustomFields(ctx any, principal any, customFields any, isAdmin any) *MockProfileServiceInterface_UpdateCustomFields_Call
- func (_e *MockProfileServiceInterface_Expecter) UpdateEmail(ctx any, principal any, newEmail any, currentPasswordHash any) *MockProfileServiceInterface_UpdateEmail_Call
- func (_e *MockProfileServiceInterface_Expecter) UpdateName(ctx any, principal any, name any) *MockProfileServiceInterface_UpdateName_Call
- func (_e *MockProfileServiceInterface_Expecter) VerifyEmailUpdate(ctx any, token any) *MockProfileServiceInterface_VerifyEmailUpdate_Call
- type MockProfileServiceInterface_ExportUserData_Call
- func (_c *MockProfileServiceInterface_ExportUserData_Call) Return(userDataExport *user.UserDataExport, err error) *MockProfileServiceInterface_ExportUserData_Call
- func (_c *MockProfileServiceInterface_ExportUserData_Call) Run(run func(ctx context.Context, principal kernel.Principal)) *MockProfileServiceInterface_ExportUserData_Call
- func (_c *MockProfileServiceInterface_ExportUserData_Call) RunAndReturn(...) *MockProfileServiceInterface_ExportUserData_Call
- type MockProfileServiceInterface_GetProfile_Call
- func (_c *MockProfileServiceInterface_GetProfile_Call) Return(profile *user.Profile, err error) *MockProfileServiceInterface_GetProfile_Call
- func (_c *MockProfileServiceInterface_GetProfile_Call) Run(run func(ctx context.Context, principal kernel.Principal)) *MockProfileServiceInterface_GetProfile_Call
- func (_c *MockProfileServiceInterface_GetProfile_Call) RunAndReturn(...) *MockProfileServiceInterface_GetProfile_Call
- type MockProfileServiceInterface_UpdateCustomFields_Call
- func (_c *MockProfileServiceInterface_UpdateCustomFields_Call) Return(err error) *MockProfileServiceInterface_UpdateCustomFields_Call
- func (_c *MockProfileServiceInterface_UpdateCustomFields_Call) Run(...) *MockProfileServiceInterface_UpdateCustomFields_Call
- func (_c *MockProfileServiceInterface_UpdateCustomFields_Call) RunAndReturn(...) *MockProfileServiceInterface_UpdateCustomFields_Call
- type MockProfileServiceInterface_UpdateEmail_Call
- func (_c *MockProfileServiceInterface_UpdateEmail_Call) Return(err error) *MockProfileServiceInterface_UpdateEmail_Call
- func (_c *MockProfileServiceInterface_UpdateEmail_Call) Run(...) *MockProfileServiceInterface_UpdateEmail_Call
- func (_c *MockProfileServiceInterface_UpdateEmail_Call) RunAndReturn(...) *MockProfileServiceInterface_UpdateEmail_Call
- type MockProfileServiceInterface_UpdateName_Call
- func (_c *MockProfileServiceInterface_UpdateName_Call) Return(err error) *MockProfileServiceInterface_UpdateName_Call
- func (_c *MockProfileServiceInterface_UpdateName_Call) Run(run func(ctx context.Context, principal kernel.Principal, name string)) *MockProfileServiceInterface_UpdateName_Call
- func (_c *MockProfileServiceInterface_UpdateName_Call) RunAndReturn(run func(ctx context.Context, principal kernel.Principal, name string) error) *MockProfileServiceInterface_UpdateName_Call
- type MockProfileServiceInterface_VerifyEmailUpdate_Call
- func (_c *MockProfileServiceInterface_VerifyEmailUpdate_Call) Return(n int, s string, err error) *MockProfileServiceInterface_VerifyEmailUpdate_Call
- func (_c *MockProfileServiceInterface_VerifyEmailUpdate_Call) Run(run func(ctx context.Context, token string)) *MockProfileServiceInterface_VerifyEmailUpdate_Call
- func (_c *MockProfileServiceInterface_VerifyEmailUpdate_Call) RunAndReturn(run func(ctx context.Context, token string) (int, string, error)) *MockProfileServiceInterface_VerifyEmailUpdate_Call
- type MockRoleAssigner
- type MockRoleAssigner_Expecter
- type MockRoleAssigner_IsAssignable_Call
- func (_c *MockRoleAssigner_IsAssignable_Call) Return(b bool) *MockRoleAssigner_IsAssignable_Call
- func (_c *MockRoleAssigner_IsAssignable_Call) Run(run func(role string)) *MockRoleAssigner_IsAssignable_Call
- func (_c *MockRoleAssigner_IsAssignable_Call) RunAndReturn(run func(role string) bool) *MockRoleAssigner_IsAssignable_Call
- type MockUserRepo
- func (_mock *MockUserRepo) CheckEmailExistsForOtherUser(ctx context.Context, userID int, email string) (bool, error)
- func (_mock *MockUserRepo) CountUsers(ctx context.Context, status string) (int, error)
- func (_mock *MockUserRepo) DeleteUser(ctx context.Context, userID int) error
- func (_m *MockUserRepo) EXPECT() *MockUserRepo_Expecter
- func (_mock *MockUserRepo) GetAllUsers(ctx context.Context, status string, limit int, offset int) ([]*user.User, error)
- func (_mock *MockUserRepo) GetPendingUsers(ctx context.Context, limit int, offset int) ([]*user.User, error)
- func (_mock *MockUserRepo) GetUserByID(ctx context.Context, userID int) (*user.User, error)
- func (_mock *MockUserRepo) GetUserStatus(ctx context.Context, userID int) (string, error)
- func (_mock *MockUserRepo) SetEmailVerified(ctx context.Context, userID int, emailVerified bool) error
- func (_mock *MockUserRepo) SoftDeleteUser(ctx context.Context, userID int) error
- func (_mock *MockUserRepo) SuspendUser(ctx context.Context, userID int) error
- func (_mock *MockUserRepo) UnsuspendUser(ctx context.Context, userID int) error
- func (_mock *MockUserRepo) UpdateProfile(ctx context.Context, userID int, name string, email string, role string, ...) error
- func (_mock *MockUserRepo) UpdateUserStatus(ctx context.Context, userID int, status string) error
- func (_mock *MockUserRepo) UpdateUserStatusIfCurrentStatus(ctx context.Context, userID int, currentStatus string, newStatus string) error
- type MockUserRepo_CheckEmailExistsForOtherUser_Call
- func (_c *MockUserRepo_CheckEmailExistsForOtherUser_Call) Return(b bool, err error) *MockUserRepo_CheckEmailExistsForOtherUser_Call
- func (_c *MockUserRepo_CheckEmailExistsForOtherUser_Call) Run(run func(ctx context.Context, userID int, email string)) *MockUserRepo_CheckEmailExistsForOtherUser_Call
- func (_c *MockUserRepo_CheckEmailExistsForOtherUser_Call) RunAndReturn(run func(ctx context.Context, userID int, email string) (bool, error)) *MockUserRepo_CheckEmailExistsForOtherUser_Call
- type MockUserRepo_CountUsers_Call
- func (_c *MockUserRepo_CountUsers_Call) Return(n int, err error) *MockUserRepo_CountUsers_Call
- func (_c *MockUserRepo_CountUsers_Call) Run(run func(ctx context.Context, status string)) *MockUserRepo_CountUsers_Call
- func (_c *MockUserRepo_CountUsers_Call) RunAndReturn(run func(ctx context.Context, status string) (int, error)) *MockUserRepo_CountUsers_Call
- type MockUserRepo_DeleteUser_Call
- func (_c *MockUserRepo_DeleteUser_Call) Return(err error) *MockUserRepo_DeleteUser_Call
- func (_c *MockUserRepo_DeleteUser_Call) Run(run func(ctx context.Context, userID int)) *MockUserRepo_DeleteUser_Call
- func (_c *MockUserRepo_DeleteUser_Call) RunAndReturn(run func(ctx context.Context, userID int) error) *MockUserRepo_DeleteUser_Call
- type MockUserRepo_Expecter
- func (_e *MockUserRepo_Expecter) CheckEmailExistsForOtherUser(ctx any, userID any, email any) *MockUserRepo_CheckEmailExistsForOtherUser_Call
- func (_e *MockUserRepo_Expecter) CountUsers(ctx any, status any) *MockUserRepo_CountUsers_Call
- func (_e *MockUserRepo_Expecter) DeleteUser(ctx any, userID any) *MockUserRepo_DeleteUser_Call
- func (_e *MockUserRepo_Expecter) GetAllUsers(ctx any, status any, limit any, offset any) *MockUserRepo_GetAllUsers_Call
- func (_e *MockUserRepo_Expecter) GetPendingUsers(ctx any, limit any, offset any) *MockUserRepo_GetPendingUsers_Call
- func (_e *MockUserRepo_Expecter) GetUserByID(ctx any, userID any) *MockUserRepo_GetUserByID_Call
- func (_e *MockUserRepo_Expecter) GetUserStatus(ctx any, userID any) *MockUserRepo_GetUserStatus_Call
- func (_e *MockUserRepo_Expecter) SetEmailVerified(ctx any, userID any, emailVerified any) *MockUserRepo_SetEmailVerified_Call
- func (_e *MockUserRepo_Expecter) SoftDeleteUser(ctx any, userID any) *MockUserRepo_SoftDeleteUser_Call
- func (_e *MockUserRepo_Expecter) SuspendUser(ctx any, userID any) *MockUserRepo_SuspendUser_Call
- func (_e *MockUserRepo_Expecter) UnsuspendUser(ctx any, userID any) *MockUserRepo_UnsuspendUser_Call
- func (_e *MockUserRepo_Expecter) UpdateProfile(ctx any, userID any, name any, email any, role any, customFields any) *MockUserRepo_UpdateProfile_Call
- func (_e *MockUserRepo_Expecter) UpdateUserStatus(ctx any, userID any, status any) *MockUserRepo_UpdateUserStatus_Call
- func (_e *MockUserRepo_Expecter) UpdateUserStatusIfCurrentStatus(ctx any, userID any, currentStatus any, newStatus any) *MockUserRepo_UpdateUserStatusIfCurrentStatus_Call
- type MockUserRepo_GetAllUsers_Call
- func (_c *MockUserRepo_GetAllUsers_Call) Return(users []*user.User, err error) *MockUserRepo_GetAllUsers_Call
- func (_c *MockUserRepo_GetAllUsers_Call) Run(run func(ctx context.Context, status string, limit int, offset int)) *MockUserRepo_GetAllUsers_Call
- func (_c *MockUserRepo_GetAllUsers_Call) RunAndReturn(...) *MockUserRepo_GetAllUsers_Call
- type MockUserRepo_GetPendingUsers_Call
- func (_c *MockUserRepo_GetPendingUsers_Call) Return(users []*user.User, err error) *MockUserRepo_GetPendingUsers_Call
- func (_c *MockUserRepo_GetPendingUsers_Call) Run(run func(ctx context.Context, limit int, offset int)) *MockUserRepo_GetPendingUsers_Call
- 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
- func (_c *MockUserRepo_GetUserByID_Call) Return(user1 *user.User, err error) *MockUserRepo_GetUserByID_Call
- func (_c *MockUserRepo_GetUserByID_Call) Run(run func(ctx context.Context, userID int)) *MockUserRepo_GetUserByID_Call
- func (_c *MockUserRepo_GetUserByID_Call) RunAndReturn(run func(ctx context.Context, userID int) (*user.User, error)) *MockUserRepo_GetUserByID_Call
- type MockUserRepo_GetUserStatus_Call
- func (_c *MockUserRepo_GetUserStatus_Call) Return(s string, err error) *MockUserRepo_GetUserStatus_Call
- func (_c *MockUserRepo_GetUserStatus_Call) Run(run func(ctx context.Context, userID int)) *MockUserRepo_GetUserStatus_Call
- func (_c *MockUserRepo_GetUserStatus_Call) RunAndReturn(run func(ctx context.Context, userID int) (string, error)) *MockUserRepo_GetUserStatus_Call
- type MockUserRepo_SetEmailVerified_Call
- func (_c *MockUserRepo_SetEmailVerified_Call) Return(err error) *MockUserRepo_SetEmailVerified_Call
- func (_c *MockUserRepo_SetEmailVerified_Call) Run(run func(ctx context.Context, userID int, emailVerified bool)) *MockUserRepo_SetEmailVerified_Call
- func (_c *MockUserRepo_SetEmailVerified_Call) RunAndReturn(run func(ctx context.Context, userID int, emailVerified bool) error) *MockUserRepo_SetEmailVerified_Call
- type MockUserRepo_SoftDeleteUser_Call
- func (_c *MockUserRepo_SoftDeleteUser_Call) Return(err error) *MockUserRepo_SoftDeleteUser_Call
- func (_c *MockUserRepo_SoftDeleteUser_Call) Run(run func(ctx context.Context, userID int)) *MockUserRepo_SoftDeleteUser_Call
- func (_c *MockUserRepo_SoftDeleteUser_Call) RunAndReturn(run func(ctx context.Context, userID int) error) *MockUserRepo_SoftDeleteUser_Call
- type MockUserRepo_SuspendUser_Call
- func (_c *MockUserRepo_SuspendUser_Call) Return(err error) *MockUserRepo_SuspendUser_Call
- func (_c *MockUserRepo_SuspendUser_Call) Run(run func(ctx context.Context, userID int)) *MockUserRepo_SuspendUser_Call
- func (_c *MockUserRepo_SuspendUser_Call) RunAndReturn(run func(ctx context.Context, userID int) error) *MockUserRepo_SuspendUser_Call
- type MockUserRepo_UnsuspendUser_Call
- func (_c *MockUserRepo_UnsuspendUser_Call) Return(err error) *MockUserRepo_UnsuspendUser_Call
- func (_c *MockUserRepo_UnsuspendUser_Call) Run(run func(ctx context.Context, userID int)) *MockUserRepo_UnsuspendUser_Call
- func (_c *MockUserRepo_UnsuspendUser_Call) RunAndReturn(run func(ctx context.Context, userID int) error) *MockUserRepo_UnsuspendUser_Call
- type MockUserRepo_UpdateProfile_Call
- type MockUserRepo_UpdateUserStatusIfCurrentStatus_Call
- func (_c *MockUserRepo_UpdateUserStatusIfCurrentStatus_Call) Return(err error) *MockUserRepo_UpdateUserStatusIfCurrentStatus_Call
- func (_c *MockUserRepo_UpdateUserStatusIfCurrentStatus_Call) Run(...) *MockUserRepo_UpdateUserStatusIfCurrentStatus_Call
- func (_c *MockUserRepo_UpdateUserStatusIfCurrentStatus_Call) RunAndReturn(...) *MockUserRepo_UpdateUserStatusIfCurrentStatus_Call
- type MockUserRepo_UpdateUserStatus_Call
- func (_c *MockUserRepo_UpdateUserStatus_Call) Return(err error) *MockUserRepo_UpdateUserStatus_Call
- func (_c *MockUserRepo_UpdateUserStatus_Call) Run(run func(ctx context.Context, userID int, status string)) *MockUserRepo_UpdateUserStatus_Call
- func (_c *MockUserRepo_UpdateUserStatus_Call) RunAndReturn(run func(ctx context.Context, userID int, status string) error) *MockUserRepo_UpdateUserStatus_Call
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type MockAccountDeletionServiceInterface ¶
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 (_m *MockAccountDeletionServiceInterface) EXPECT() *MockAccountDeletionServiceInterface_Expecter
func (*MockAccountDeletionServiceInterface) ValidateConfirmationString ¶
func (_mock *MockAccountDeletionServiceInterface) ValidateConfirmationString(confirmation string) error
ValidateConfirmationString provides a mock function for the type MockAccountDeletionServiceInterface
type MockAccountDeletionServiceInterface_DeleteAccount_Call ¶
MockAccountDeletionServiceInterface_DeleteAccount_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'DeleteAccount'
func (*MockAccountDeletionServiceInterface_DeleteAccount_Call) Run ¶
func (_c *MockAccountDeletionServiceInterface_DeleteAccount_Call) Run(run func(ctx context.Context, principal kernel.Principal, userEmail string)) *MockAccountDeletionServiceInterface_DeleteAccount_Call
func (*MockAccountDeletionServiceInterface_DeleteAccount_Call) RunAndReturn ¶
func (_c *MockAccountDeletionServiceInterface_DeleteAccount_Call) RunAndReturn(run func(ctx context.Context, principal kernel.Principal, userEmail string) error) *MockAccountDeletionServiceInterface_DeleteAccount_Call
type MockAccountDeletionServiceInterface_Expecter ¶
type MockAccountDeletionServiceInterface_Expecter struct {
// contains filtered or unexported fields
}
func (*MockAccountDeletionServiceInterface_Expecter) DeleteAccount ¶
func (_e *MockAccountDeletionServiceInterface_Expecter) DeleteAccount(ctx any, principal any, userEmail any) *MockAccountDeletionServiceInterface_DeleteAccount_Call
DeleteAccount is a helper method to define mock.On call
- ctx context.Context
- principal kernel.Principal
- userEmail string
func (*MockAccountDeletionServiceInterface_Expecter) ValidateConfirmationString ¶
func (_e *MockAccountDeletionServiceInterface_Expecter) ValidateConfirmationString(confirmation any) *MockAccountDeletionServiceInterface_ValidateConfirmationString_Call
ValidateConfirmationString is a helper method to define mock.On call
- confirmation string
type MockAccountDeletionServiceInterface_ValidateConfirmationString_Call ¶
MockAccountDeletionServiceInterface_ValidateConfirmationString_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'ValidateConfirmationString'
func (*MockAccountDeletionServiceInterface_ValidateConfirmationString_Call) Run ¶
func (_c *MockAccountDeletionServiceInterface_ValidateConfirmationString_Call) Run(run func(confirmation string)) *MockAccountDeletionServiceInterface_ValidateConfirmationString_Call
func (*MockAccountDeletionServiceInterface_ValidateConfirmationString_Call) RunAndReturn ¶
func (_c *MockAccountDeletionServiceInterface_ValidateConfirmationString_Call) RunAndReturn(run func(confirmation string) error) *MockAccountDeletionServiceInterface_ValidateConfirmationString_Call
type MockAdminCreateUserRepo ¶
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 ¶
func (_m *MockAdminCreateUserRepo) EXPECT() *MockAdminCreateUserRepo_Expecter
type MockAdminCreateUserRepo_CheckEmailExists_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 (_c *MockAdminCreateUserRepo_CheckEmailExists_Call) Return(b bool, err error) *MockAdminCreateUserRepo_CheckEmailExists_Call
func (*MockAdminCreateUserRepo_CheckEmailExists_Call) Run ¶
func (_c *MockAdminCreateUserRepo_CheckEmailExists_Call) Run(run func(ctx context.Context, email string)) *MockAdminCreateUserRepo_CheckEmailExists_Call
func (*MockAdminCreateUserRepo_CheckEmailExists_Call) RunAndReturn ¶
func (_c *MockAdminCreateUserRepo_CheckEmailExists_Call) RunAndReturn(run func(ctx context.Context, email string) (bool, error)) *MockAdminCreateUserRepo_CheckEmailExists_Call
type MockAdminCreateUserRepo_CheckUsernameExists_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 (_c *MockAdminCreateUserRepo_CheckUsernameExists_Call) Return(b bool, err error) *MockAdminCreateUserRepo_CheckUsernameExists_Call
func (*MockAdminCreateUserRepo_CheckUsernameExists_Call) Run ¶
func (_c *MockAdminCreateUserRepo_CheckUsernameExists_Call) Run(run func(ctx context.Context, username string)) *MockAdminCreateUserRepo_CheckUsernameExists_Call
func (*MockAdminCreateUserRepo_CheckUsernameExists_Call) RunAndReturn ¶
func (_c *MockAdminCreateUserRepo_CheckUsernameExists_Call) RunAndReturn(run func(ctx context.Context, username string) (bool, error)) *MockAdminCreateUserRepo_CheckUsernameExists_Call
type MockAdminCreateUserRepo_CreateUser_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 (_c *MockAdminCreateUserRepo_CreateUser_Call) Return(err error) *MockAdminCreateUserRepo_CreateUser_Call
func (*MockAdminCreateUserRepo_CreateUser_Call) Run ¶
func (_c *MockAdminCreateUserRepo_CreateUser_Call) Run(run func(ctx context.Context, user1 *user.User)) *MockAdminCreateUserRepo_CreateUser_Call
func (*MockAdminCreateUserRepo_CreateUser_Call) RunAndReturn ¶
func (_c *MockAdminCreateUserRepo_CreateUser_Call) RunAndReturn(run func(ctx context.Context, user1 *user.User) error) *MockAdminCreateUserRepo_CreateUser_Call
type MockAdminCreateUserRepo_Expecter ¶
type MockAdminCreateUserRepo_Expecter struct {
// contains filtered or unexported fields
}
func (*MockAdminCreateUserRepo_Expecter) CheckEmailExists ¶
func (_e *MockAdminCreateUserRepo_Expecter) CheckEmailExists(ctx any, email any) *MockAdminCreateUserRepo_CheckEmailExists_Call
CheckEmailExists is a helper method to define mock.On call
- ctx context.Context
- email string
func (*MockAdminCreateUserRepo_Expecter) CheckUsernameExists ¶
func (_e *MockAdminCreateUserRepo_Expecter) CheckUsernameExists(ctx any, username any) *MockAdminCreateUserRepo_CheckUsernameExists_Call
CheckUsernameExists is a helper method to define mock.On call
- ctx context.Context
- username string
func (*MockAdminCreateUserRepo_Expecter) CreateUser ¶
func (_e *MockAdminCreateUserRepo_Expecter) CreateUser(ctx any, user1 any) *MockAdminCreateUserRepo_CreateUser_Call
CreateUser is a helper method to define mock.On call
- ctx context.Context
- user1 *user.User
type MockBlockedEmailRepo ¶
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 (_m *MockBlockedEmailRepo) EXPECT() *MockBlockedEmailRepo_Expecter
func (*MockBlockedEmailRepo) IsEmailBlocked ¶
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 ¶
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 (_c *MockBlockedEmailRepo_BlockEmail_Call) Return(err error) *MockBlockedEmailRepo_BlockEmail_Call
func (*MockBlockedEmailRepo_BlockEmail_Call) Run ¶
func (_c *MockBlockedEmailRepo_BlockEmail_Call) Run(run func(ctx context.Context, email string, reason string)) *MockBlockedEmailRepo_BlockEmail_Call
func (*MockBlockedEmailRepo_BlockEmail_Call) RunAndReturn ¶
func (_c *MockBlockedEmailRepo_BlockEmail_Call) RunAndReturn(run func(ctx context.Context, email string, reason string) error) *MockBlockedEmailRepo_BlockEmail_Call
type MockBlockedEmailRepo_Expecter ¶
type MockBlockedEmailRepo_Expecter struct {
// contains filtered or unexported fields
}
func (*MockBlockedEmailRepo_Expecter) BlockEmail ¶
func (_e *MockBlockedEmailRepo_Expecter) BlockEmail(ctx any, email any, reason any) *MockBlockedEmailRepo_BlockEmail_Call
BlockEmail is a helper method to define mock.On call
- ctx context.Context
- email string
- reason string
func (*MockBlockedEmailRepo_Expecter) IsEmailBlocked ¶
func (_e *MockBlockedEmailRepo_Expecter) IsEmailBlocked(ctx any, email any) *MockBlockedEmailRepo_IsEmailBlocked_Call
IsEmailBlocked is a helper method to define mock.On call
- ctx context.Context
- email string
func (*MockBlockedEmailRepo_Expecter) UnblockEmail ¶
func (_e *MockBlockedEmailRepo_Expecter) UnblockEmail(ctx any, email any) *MockBlockedEmailRepo_UnblockEmail_Call
UnblockEmail is a helper method to define mock.On call
- ctx context.Context
- email string
type MockBlockedEmailRepo_IsEmailBlocked_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 (_c *MockBlockedEmailRepo_IsEmailBlocked_Call) Return(b bool, err error) *MockBlockedEmailRepo_IsEmailBlocked_Call
func (*MockBlockedEmailRepo_IsEmailBlocked_Call) Run ¶
func (_c *MockBlockedEmailRepo_IsEmailBlocked_Call) Run(run func(ctx context.Context, email string)) *MockBlockedEmailRepo_IsEmailBlocked_Call
func (*MockBlockedEmailRepo_IsEmailBlocked_Call) RunAndReturn ¶
func (_c *MockBlockedEmailRepo_IsEmailBlocked_Call) RunAndReturn(run func(ctx context.Context, email string) (bool, error)) *MockBlockedEmailRepo_IsEmailBlocked_Call
type MockBlockedEmailRepo_UnblockEmail_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 (_c *MockBlockedEmailRepo_UnblockEmail_Call) Return(err error) *MockBlockedEmailRepo_UnblockEmail_Call
func (*MockBlockedEmailRepo_UnblockEmail_Call) Run ¶
func (_c *MockBlockedEmailRepo_UnblockEmail_Call) Run(run func(ctx context.Context, email string)) *MockBlockedEmailRepo_UnblockEmail_Call
func (*MockBlockedEmailRepo_UnblockEmail_Call) RunAndReturn ¶
func (_c *MockBlockedEmailRepo_UnblockEmail_Call) RunAndReturn(run func(ctx context.Context, email string) error) *MockBlockedEmailRepo_UnblockEmail_Call
type MockCredentialPolicy ¶
MockCredentialPolicy is an autogenerated mock type for the CredentialPolicy type
func NewMockCredentialPolicy ¶
func NewMockCredentialPolicy(t interface {
mock.TestingT
Cleanup(func())
}) *MockCredentialPolicy
NewMockCredentialPolicy creates a new instance of MockCredentialPolicy. It also registers a testing interface on the mock and a cleanup function to assert the mocks expectations. The first argument is typically a *testing.T value.
func (*MockCredentialPolicy) EXPECT ¶
func (_m *MockCredentialPolicy) EXPECT() *MockCredentialPolicy_Expecter
func (*MockCredentialPolicy) GeneratePassword ¶
func (_mock *MockCredentialPolicy) GeneratePassword(length int) (string, error)
GeneratePassword provides a mock function for the type MockCredentialPolicy
func (*MockCredentialPolicy) HashPassword ¶
func (_mock *MockCredentialPolicy) HashPassword(password string) (string, error)
HashPassword provides a mock function for the type MockCredentialPolicy
func (*MockCredentialPolicy) ValidateEmail ¶
func (_mock *MockCredentialPolicy) ValidateEmail(email string) error
ValidateEmail provides a mock function for the type MockCredentialPolicy
func (*MockCredentialPolicy) ValidatePassword ¶
func (_mock *MockCredentialPolicy) ValidatePassword(password string) error
ValidatePassword provides a mock function for the type MockCredentialPolicy
func (*MockCredentialPolicy) ValidateUsername ¶
func (_mock *MockCredentialPolicy) ValidateUsername(username string) error
ValidateUsername provides a mock function for the type MockCredentialPolicy
func (*MockCredentialPolicy) VerifyPassword ¶
func (_mock *MockCredentialPolicy) VerifyPassword(hash string, password string) error
VerifyPassword provides a mock function for the type MockCredentialPolicy
type MockCredentialPolicy_Expecter ¶
type MockCredentialPolicy_Expecter struct {
// contains filtered or unexported fields
}
func (*MockCredentialPolicy_Expecter) GeneratePassword ¶
func (_e *MockCredentialPolicy_Expecter) GeneratePassword(length any) *MockCredentialPolicy_GeneratePassword_Call
GeneratePassword is a helper method to define mock.On call
- length int
func (*MockCredentialPolicy_Expecter) HashPassword ¶
func (_e *MockCredentialPolicy_Expecter) HashPassword(password any) *MockCredentialPolicy_HashPassword_Call
HashPassword is a helper method to define mock.On call
- password string
func (*MockCredentialPolicy_Expecter) ValidateEmail ¶
func (_e *MockCredentialPolicy_Expecter) ValidateEmail(email any) *MockCredentialPolicy_ValidateEmail_Call
ValidateEmail is a helper method to define mock.On call
- email string
func (*MockCredentialPolicy_Expecter) ValidatePassword ¶
func (_e *MockCredentialPolicy_Expecter) ValidatePassword(password any) *MockCredentialPolicy_ValidatePassword_Call
ValidatePassword is a helper method to define mock.On call
- password string
func (*MockCredentialPolicy_Expecter) ValidateUsername ¶
func (_e *MockCredentialPolicy_Expecter) ValidateUsername(username any) *MockCredentialPolicy_ValidateUsername_Call
ValidateUsername is a helper method to define mock.On call
- username string
func (*MockCredentialPolicy_Expecter) VerifyPassword ¶
func (_e *MockCredentialPolicy_Expecter) VerifyPassword(hash any, password any) *MockCredentialPolicy_VerifyPassword_Call
VerifyPassword is a helper method to define mock.On call
- hash string
- password string
type MockCredentialPolicy_GeneratePassword_Call ¶
MockCredentialPolicy_GeneratePassword_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'GeneratePassword'
func (*MockCredentialPolicy_GeneratePassword_Call) Return ¶
func (_c *MockCredentialPolicy_GeneratePassword_Call) Return(s string, err error) *MockCredentialPolicy_GeneratePassword_Call
func (*MockCredentialPolicy_GeneratePassword_Call) Run ¶
func (_c *MockCredentialPolicy_GeneratePassword_Call) Run(run func(length int)) *MockCredentialPolicy_GeneratePassword_Call
func (*MockCredentialPolicy_GeneratePassword_Call) RunAndReturn ¶
func (_c *MockCredentialPolicy_GeneratePassword_Call) RunAndReturn(run func(length int) (string, error)) *MockCredentialPolicy_GeneratePassword_Call
type MockCredentialPolicy_HashPassword_Call ¶
MockCredentialPolicy_HashPassword_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'HashPassword'
func (*MockCredentialPolicy_HashPassword_Call) Return ¶
func (_c *MockCredentialPolicy_HashPassword_Call) Return(s string, err error) *MockCredentialPolicy_HashPassword_Call
func (*MockCredentialPolicy_HashPassword_Call) Run ¶
func (_c *MockCredentialPolicy_HashPassword_Call) Run(run func(password string)) *MockCredentialPolicy_HashPassword_Call
func (*MockCredentialPolicy_HashPassword_Call) RunAndReturn ¶
func (_c *MockCredentialPolicy_HashPassword_Call) RunAndReturn(run func(password string) (string, error)) *MockCredentialPolicy_HashPassword_Call
type MockCredentialPolicy_ValidateEmail_Call ¶
MockCredentialPolicy_ValidateEmail_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'ValidateEmail'
func (*MockCredentialPolicy_ValidateEmail_Call) Return ¶
func (_c *MockCredentialPolicy_ValidateEmail_Call) Return(err error) *MockCredentialPolicy_ValidateEmail_Call
func (*MockCredentialPolicy_ValidateEmail_Call) Run ¶
func (_c *MockCredentialPolicy_ValidateEmail_Call) Run(run func(email string)) *MockCredentialPolicy_ValidateEmail_Call
func (*MockCredentialPolicy_ValidateEmail_Call) RunAndReturn ¶
func (_c *MockCredentialPolicy_ValidateEmail_Call) RunAndReturn(run func(email string) error) *MockCredentialPolicy_ValidateEmail_Call
type MockCredentialPolicy_ValidatePassword_Call ¶
MockCredentialPolicy_ValidatePassword_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'ValidatePassword'
func (*MockCredentialPolicy_ValidatePassword_Call) Return ¶
func (_c *MockCredentialPolicy_ValidatePassword_Call) Return(err error) *MockCredentialPolicy_ValidatePassword_Call
func (*MockCredentialPolicy_ValidatePassword_Call) Run ¶
func (_c *MockCredentialPolicy_ValidatePassword_Call) Run(run func(password string)) *MockCredentialPolicy_ValidatePassword_Call
func (*MockCredentialPolicy_ValidatePassword_Call) RunAndReturn ¶
func (_c *MockCredentialPolicy_ValidatePassword_Call) RunAndReturn(run func(password string) error) *MockCredentialPolicy_ValidatePassword_Call
type MockCredentialPolicy_ValidateUsername_Call ¶
MockCredentialPolicy_ValidateUsername_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'ValidateUsername'
func (*MockCredentialPolicy_ValidateUsername_Call) Return ¶
func (_c *MockCredentialPolicy_ValidateUsername_Call) Return(err error) *MockCredentialPolicy_ValidateUsername_Call
func (*MockCredentialPolicy_ValidateUsername_Call) Run ¶
func (_c *MockCredentialPolicy_ValidateUsername_Call) Run(run func(username string)) *MockCredentialPolicy_ValidateUsername_Call
func (*MockCredentialPolicy_ValidateUsername_Call) RunAndReturn ¶
func (_c *MockCredentialPolicy_ValidateUsername_Call) RunAndReturn(run func(username string) error) *MockCredentialPolicy_ValidateUsername_Call
type MockCredentialPolicy_VerifyPassword_Call ¶
MockCredentialPolicy_VerifyPassword_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'VerifyPassword'
func (*MockCredentialPolicy_VerifyPassword_Call) Return ¶
func (_c *MockCredentialPolicy_VerifyPassword_Call) Return(err error) *MockCredentialPolicy_VerifyPassword_Call
func (*MockCredentialPolicy_VerifyPassword_Call) Run ¶
func (_c *MockCredentialPolicy_VerifyPassword_Call) Run(run func(hash string, password string)) *MockCredentialPolicy_VerifyPassword_Call
func (*MockCredentialPolicy_VerifyPassword_Call) RunAndReturn ¶
func (_c *MockCredentialPolicy_VerifyPassword_Call) RunAndReturn(run func(hash string, password string) error) *MockCredentialPolicy_VerifyPassword_Call
type MockMailer ¶
MockMailer is an autogenerated mock type for the Mailer type
func NewMockMailer ¶
func NewMockMailer(t interface {
mock.TestingT
Cleanup(func())
}) *MockMailer
NewMockMailer creates a new instance of MockMailer. It also registers a testing interface on the mock and a cleanup function to assert the mocks expectations. The first argument is typically a *testing.T value.
func (*MockMailer) EXPECT ¶
func (_m *MockMailer) EXPECT() *MockMailer_Expecter
func (*MockMailer) 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 ¶
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 (_c *MockMailer_SendAccountDeletedNotification_Call) Return(err error) *MockMailer_SendAccountDeletedNotification_Call
func (*MockMailer_SendAccountDeletedNotification_Call) Run ¶
func (_c *MockMailer_SendAccountDeletedNotification_Call) Run(run func(ctx context.Context, to string, username string)) *MockMailer_SendAccountDeletedNotification_Call
func (*MockMailer_SendAccountDeletedNotification_Call) RunAndReturn ¶
func (_c *MockMailer_SendAccountDeletedNotification_Call) RunAndReturn(run func(ctx context.Context, to string, username string) error) *MockMailer_SendAccountDeletedNotification_Call
type MockMailer_SendDataExportNotificationEmail_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 (_c *MockMailer_SendDataExportNotificationEmail_Call) Return(err error) *MockMailer_SendDataExportNotificationEmail_Call
func (*MockMailer_SendDataExportNotificationEmail_Call) Run ¶
func (_c *MockMailer_SendDataExportNotificationEmail_Call) Run(run func(ctx context.Context, to string, username string)) *MockMailer_SendDataExportNotificationEmail_Call
func (*MockMailer_SendDataExportNotificationEmail_Call) RunAndReturn ¶
func (_c *MockMailer_SendDataExportNotificationEmail_Call) RunAndReturn(run func(ctx context.Context, to string, username string) error) *MockMailer_SendDataExportNotificationEmail_Call
type MockMailer_SendEmailUpdateVerificationEmail_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 (_c *MockMailer_SendEmailUpdateVerificationEmail_Call) Return(err error) *MockMailer_SendEmailUpdateVerificationEmail_Call
func (*MockMailer_SendEmailUpdateVerificationEmail_Call) Run ¶
func (_c *MockMailer_SendEmailUpdateVerificationEmail_Call) Run(run func(ctx context.Context, to string, username string, token string)) *MockMailer_SendEmailUpdateVerificationEmail_Call
func (*MockMailer_SendEmailUpdateVerificationEmail_Call) RunAndReturn ¶
func (_c *MockMailer_SendEmailUpdateVerificationEmail_Call) RunAndReturn(run func(ctx context.Context, to string, username string, token string) error) *MockMailer_SendEmailUpdateVerificationEmail_Call
type MockProfileServiceInterface ¶
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 (_m *MockProfileServiceInterface) EXPECT() *MockProfileServiceInterface_Expecter
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 ¶
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 (_c *MockProfileServiceInterface_ChangePassword_Call) Return(err error) *MockProfileServiceInterface_ChangePassword_Call
func (*MockProfileServiceInterface_ChangePassword_Call) Run ¶
func (_c *MockProfileServiceInterface_ChangePassword_Call) Run(run func(ctx context.Context, principal kernel.Principal, currentPassword string, newPassword string)) *MockProfileServiceInterface_ChangePassword_Call
func (*MockProfileServiceInterface_ChangePassword_Call) RunAndReturn ¶
func (_c *MockProfileServiceInterface_ChangePassword_Call) RunAndReturn(run func(ctx context.Context, principal kernel.Principal, currentPassword string, newPassword string) error) *MockProfileServiceInterface_ChangePassword_Call
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 ¶
func (_e *MockProfileServiceInterface_Expecter) ExportUserData(ctx any, principal any) *MockProfileServiceInterface_ExportUserData_Call
ExportUserData is a helper method to define mock.On call
- ctx context.Context
- principal kernel.Principal
func (*MockProfileServiceInterface_Expecter) GetProfile ¶
func (_e *MockProfileServiceInterface_Expecter) GetProfile(ctx any, principal any) *MockProfileServiceInterface_GetProfile_Call
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 ¶
func (_e *MockProfileServiceInterface_Expecter) UpdateName(ctx any, principal any, name any) *MockProfileServiceInterface_UpdateName_Call
UpdateName is a helper method to define mock.On call
- ctx context.Context
- principal kernel.Principal
- name string
func (*MockProfileServiceInterface_Expecter) VerifyEmailUpdate ¶
func (_e *MockProfileServiceInterface_Expecter) VerifyEmailUpdate(ctx any, token any) *MockProfileServiceInterface_VerifyEmailUpdate_Call
VerifyEmailUpdate is a helper method to define mock.On call
- ctx context.Context
- token string
type MockProfileServiceInterface_ExportUserData_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 (_c *MockProfileServiceInterface_ExportUserData_Call) Return(userDataExport *user.UserDataExport, err error) *MockProfileServiceInterface_ExportUserData_Call
func (*MockProfileServiceInterface_ExportUserData_Call) Run ¶
func (_c *MockProfileServiceInterface_ExportUserData_Call) Run(run func(ctx context.Context, principal kernel.Principal)) *MockProfileServiceInterface_ExportUserData_Call
func (*MockProfileServiceInterface_ExportUserData_Call) RunAndReturn ¶
func (_c *MockProfileServiceInterface_ExportUserData_Call) RunAndReturn(run func(ctx context.Context, principal kernel.Principal) (*user.UserDataExport, error)) *MockProfileServiceInterface_ExportUserData_Call
type MockProfileServiceInterface_GetProfile_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 (_c *MockProfileServiceInterface_GetProfile_Call) Return(profile *user.Profile, err error) *MockProfileServiceInterface_GetProfile_Call
func (*MockProfileServiceInterface_GetProfile_Call) Run ¶
func (_c *MockProfileServiceInterface_GetProfile_Call) Run(run func(ctx context.Context, principal kernel.Principal)) *MockProfileServiceInterface_GetProfile_Call
func (*MockProfileServiceInterface_GetProfile_Call) RunAndReturn ¶
func (_c *MockProfileServiceInterface_GetProfile_Call) RunAndReturn(run func(ctx context.Context, principal kernel.Principal) (*user.Profile, error)) *MockProfileServiceInterface_GetProfile_Call
type MockProfileServiceInterface_UpdateCustomFields_Call ¶
MockProfileServiceInterface_UpdateCustomFields_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'UpdateCustomFields'
func (*MockProfileServiceInterface_UpdateCustomFields_Call) Run ¶
func (_c *MockProfileServiceInterface_UpdateCustomFields_Call) Run(run func(ctx context.Context, principal kernel.Principal, customFields map[string]any, isAdmin bool)) *MockProfileServiceInterface_UpdateCustomFields_Call
func (*MockProfileServiceInterface_UpdateCustomFields_Call) RunAndReturn ¶
func (_c *MockProfileServiceInterface_UpdateCustomFields_Call) RunAndReturn(run func(ctx context.Context, principal kernel.Principal, customFields map[string]any, isAdmin bool) error) *MockProfileServiceInterface_UpdateCustomFields_Call
type MockProfileServiceInterface_UpdateEmail_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 (_c *MockProfileServiceInterface_UpdateEmail_Call) Return(err error) *MockProfileServiceInterface_UpdateEmail_Call
func (*MockProfileServiceInterface_UpdateEmail_Call) Run ¶
func (_c *MockProfileServiceInterface_UpdateEmail_Call) Run(run func(ctx context.Context, principal kernel.Principal, newEmail string, currentPasswordHash string)) *MockProfileServiceInterface_UpdateEmail_Call
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 ¶
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 (_c *MockProfileServiceInterface_UpdateName_Call) Return(err error) *MockProfileServiceInterface_UpdateName_Call
func (*MockProfileServiceInterface_UpdateName_Call) Run ¶
func (_c *MockProfileServiceInterface_UpdateName_Call) Run(run func(ctx context.Context, principal kernel.Principal, name string)) *MockProfileServiceInterface_UpdateName_Call
func (*MockProfileServiceInterface_UpdateName_Call) RunAndReturn ¶
func (_c *MockProfileServiceInterface_UpdateName_Call) RunAndReturn(run func(ctx context.Context, principal kernel.Principal, name string) error) *MockProfileServiceInterface_UpdateName_Call
type MockProfileServiceInterface_VerifyEmailUpdate_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 (_c *MockProfileServiceInterface_VerifyEmailUpdate_Call) Return(n int, s string, err error) *MockProfileServiceInterface_VerifyEmailUpdate_Call
func (*MockProfileServiceInterface_VerifyEmailUpdate_Call) Run ¶
func (_c *MockProfileServiceInterface_VerifyEmailUpdate_Call) Run(run func(ctx context.Context, token string)) *MockProfileServiceInterface_VerifyEmailUpdate_Call
func (*MockProfileServiceInterface_VerifyEmailUpdate_Call) RunAndReturn ¶
func (_c *MockProfileServiceInterface_VerifyEmailUpdate_Call) RunAndReturn(run func(ctx context.Context, token string) (int, string, error)) *MockProfileServiceInterface_VerifyEmailUpdate_Call
type MockRoleAssigner ¶
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 (_m *MockRoleAssigner) EXPECT() *MockRoleAssigner_Expecter
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 ¶
func (_e *MockRoleAssigner_Expecter) IsAssignable(role any) *MockRoleAssigner_IsAssignable_Call
IsAssignable is a helper method to define mock.On call
- role string
type MockRoleAssigner_IsAssignable_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 (_c *MockRoleAssigner_IsAssignable_Call) Return(b bool) *MockRoleAssigner_IsAssignable_Call
func (*MockRoleAssigner_IsAssignable_Call) Run ¶
func (_c *MockRoleAssigner_IsAssignable_Call) Run(run func(role string)) *MockRoleAssigner_IsAssignable_Call
func (*MockRoleAssigner_IsAssignable_Call) RunAndReturn ¶
func (_c *MockRoleAssigner_IsAssignable_Call) RunAndReturn(run func(role string) bool) *MockRoleAssigner_IsAssignable_Call
type MockUserRepo ¶
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 ¶
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 ¶
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 ¶
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 ¶
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 (_c *MockUserRepo_CheckEmailExistsForOtherUser_Call) Return(b bool, err error) *MockUserRepo_CheckEmailExistsForOtherUser_Call
func (*MockUserRepo_CheckEmailExistsForOtherUser_Call) Run ¶
func (_c *MockUserRepo_CheckEmailExistsForOtherUser_Call) Run(run func(ctx context.Context, userID int, email string)) *MockUserRepo_CheckEmailExistsForOtherUser_Call
func (*MockUserRepo_CheckEmailExistsForOtherUser_Call) RunAndReturn ¶
func (_c *MockUserRepo_CheckEmailExistsForOtherUser_Call) RunAndReturn(run func(ctx context.Context, userID int, email string) (bool, error)) *MockUserRepo_CheckEmailExistsForOtherUser_Call
type MockUserRepo_CountUsers_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 (_c *MockUserRepo_CountUsers_Call) Return(n int, err error) *MockUserRepo_CountUsers_Call
func (*MockUserRepo_CountUsers_Call) Run ¶
func (_c *MockUserRepo_CountUsers_Call) Run(run func(ctx context.Context, status string)) *MockUserRepo_CountUsers_Call
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 ¶
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 (_c *MockUserRepo_DeleteUser_Call) Return(err error) *MockUserRepo_DeleteUser_Call
func (*MockUserRepo_DeleteUser_Call) Run ¶
func (_c *MockUserRepo_DeleteUser_Call) Run(run func(ctx context.Context, userID int)) *MockUserRepo_DeleteUser_Call
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 ¶
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 ¶
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 (_c *MockUserRepo_GetPendingUsers_Call) Run(run func(ctx context.Context, limit int, offset int)) *MockUserRepo_GetPendingUsers_Call
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 ¶
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 (_c *MockUserRepo_GetUserByID_Call) Run(run func(ctx context.Context, userID int)) *MockUserRepo_GetUserByID_Call
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 ¶
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 (_c *MockUserRepo_GetUserStatus_Call) Return(s string, err error) *MockUserRepo_GetUserStatus_Call
func (*MockUserRepo_GetUserStatus_Call) Run ¶
func (_c *MockUserRepo_GetUserStatus_Call) Run(run func(ctx context.Context, userID int)) *MockUserRepo_GetUserStatus_Call
func (*MockUserRepo_GetUserStatus_Call) RunAndReturn ¶
func (_c *MockUserRepo_GetUserStatus_Call) RunAndReturn(run func(ctx context.Context, userID int) (string, error)) *MockUserRepo_GetUserStatus_Call
type MockUserRepo_SetEmailVerified_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 (_c *MockUserRepo_SetEmailVerified_Call) Return(err error) *MockUserRepo_SetEmailVerified_Call
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 ¶
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 (_c *MockUserRepo_SoftDeleteUser_Call) Return(err error) *MockUserRepo_SoftDeleteUser_Call
func (*MockUserRepo_SoftDeleteUser_Call) Run ¶
func (_c *MockUserRepo_SoftDeleteUser_Call) Run(run func(ctx context.Context, userID int)) *MockUserRepo_SoftDeleteUser_Call
func (*MockUserRepo_SoftDeleteUser_Call) RunAndReturn ¶
func (_c *MockUserRepo_SoftDeleteUser_Call) RunAndReturn(run func(ctx context.Context, userID int) error) *MockUserRepo_SoftDeleteUser_Call
type MockUserRepo_SuspendUser_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 (_c *MockUserRepo_SuspendUser_Call) Return(err error) *MockUserRepo_SuspendUser_Call
func (*MockUserRepo_SuspendUser_Call) Run ¶
func (_c *MockUserRepo_SuspendUser_Call) Run(run func(ctx context.Context, userID int)) *MockUserRepo_SuspendUser_Call
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 ¶
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 (_c *MockUserRepo_UnsuspendUser_Call) Return(err error) *MockUserRepo_UnsuspendUser_Call
func (*MockUserRepo_UnsuspendUser_Call) Run ¶
func (_c *MockUserRepo_UnsuspendUser_Call) Run(run func(ctx context.Context, userID int)) *MockUserRepo_UnsuspendUser_Call
func (*MockUserRepo_UnsuspendUser_Call) RunAndReturn ¶
func (_c *MockUserRepo_UnsuspendUser_Call) RunAndReturn(run func(ctx context.Context, userID int) error) *MockUserRepo_UnsuspendUser_Call
type MockUserRepo_UpdateProfile_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 (_c *MockUserRepo_UpdateProfile_Call) Return(err error) *MockUserRepo_UpdateProfile_Call
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 ¶
type MockUserRepo_UpdateUserStatusIfCurrentStatus_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 (_c *MockUserRepo_UpdateUserStatusIfCurrentStatus_Call) Return(err error) *MockUserRepo_UpdateUserStatusIfCurrentStatus_Call
func (*MockUserRepo_UpdateUserStatusIfCurrentStatus_Call) Run ¶
func (_c *MockUserRepo_UpdateUserStatusIfCurrentStatus_Call) Run(run func(ctx context.Context, userID int, currentStatus string, newStatus string)) *MockUserRepo_UpdateUserStatusIfCurrentStatus_Call
func (*MockUserRepo_UpdateUserStatusIfCurrentStatus_Call) RunAndReturn ¶
func (_c *MockUserRepo_UpdateUserStatusIfCurrentStatus_Call) RunAndReturn(run func(ctx context.Context, userID int, currentStatus string, newStatus string) error) *MockUserRepo_UpdateUserStatusIfCurrentStatus_Call
type MockUserRepo_UpdateUserStatus_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 (_c *MockUserRepo_UpdateUserStatus_Call) Return(err error) *MockUserRepo_UpdateUserStatus_Call
func (*MockUserRepo_UpdateUserStatus_Call) Run ¶
func (_c *MockUserRepo_UpdateUserStatus_Call) Run(run func(ctx context.Context, userID int, status string)) *MockUserRepo_UpdateUserStatus_Call
func (*MockUserRepo_UpdateUserStatus_Call) RunAndReturn ¶
func (_c *MockUserRepo_UpdateUserStatus_Call) RunAndReturn(run func(ctx context.Context, userID int, status string) error) *MockUserRepo_UpdateUserStatus_Call
Source Files
¶
- account_deletion_service_interface_mock.go
- admin_create_user_repo_mock.go
- blocked_email_repo_mock.go
- credential_policy_mock.go
- deletion_user_store_mock.go
- email_token_store_mock.go
- mailer_mock.go
- profile_service_interface_mock.go
- profile_user_store_mock.go
- role_assigner_mock.go
- system_field_provider_mock.go
- user_deletion_store_mock.go
- user_export_store_mock.go
- user_repo_mock.go