Documentation ¶
Index ¶
- func CreateUser(email string, password string, name string, deviceName string, ...) (user *models.User, err error)
- func DeleteAccount(user models.User) (deletedUser models.User, err error)
- func ResetPassword(password string, token string) (resetUser *models.User, err error)
- func SendForgotPasswordEmail(email string) (resetUser *models.User, err error)
- func VerifyPasswordResetToken(token interface{}) (tokenUser *models.User, err error)
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func CreateUser ¶
func CreateUser(email string, password string, name string, deviceName string, clientID uuid.UUID) (user *models.User, err error)
CreateUser creates a user account with details provided
func DeleteAccount ¶
DeleteAccount deletes a user account
This is a permanent delete, not a soft delete. The User model has a BeforeDelete hook to remove/clean associated data
func ResetPassword ¶
ResetPassword changes the password for a user after verifying the token
The token here is a reset password token sent to a user when they request a password change as part of the forgot password flow
func SendForgotPasswordEmail ¶
SendForgotPasswordEmail sends an email with a unique reset password link to an email address associated to a user
func VerifyPasswordResetToken ¶
VerifyPasswordResetToken retrieves a user associated with a password reset token
Types ¶
This section is empty.
Click to show internal directories.
Click to hide internal directories.