Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type ConfirmEmailDetails ¶
type ConfirmEmailDetails struct { Email string `json:"email" binding:"required" valid:"email"` ConfirmEmailToken string `json:"confirm_email_token" binding:"required" valid:"length(36|36)"` }
ConfirmEmailDetails holds the details required to confirm the user's email.
func (*ConfirmEmailDetails) ConfirmEmail ¶
func (details *ConfirmEmailDetails) ConfirmEmail() *errors.ErrorCode
ConfirmEmail handles the email confirmation.
type DeleteDetails ¶
type DeleteDetails struct {
UserID uint
}
DeleteDetails holds the details required to delete the user.
func (*DeleteDetails) Delete ¶
func (details *DeleteDetails) Delete() *errors.ErrorCode
Delete handles the user deletion.
type RefreshTokenDetails ¶
type RefreshTokenDetails struct {
UserID uint
}
RefreshTokenDetails holds the details required to refresh the access token.
func (*RefreshTokenDetails) RefreshToken ¶
func (details *RefreshTokenDetails) RefreshToken() (string, *errors.ErrorCode)
RefreshToken handles the access token refresh.
type ResetPasswordDetails ¶
type ResetPasswordDetails struct { Email string `json:"email" binding:"required" valid:"email"` ResetPasswordToken string `json:"reset_password_token" binding:"required" valid:"length(36|36)"` Password string `json:"password" binding:"required" valid:"length(8|60)"` }
ResetPasswordDetails holds the details required to reset the user's password.
func (*ResetPasswordDetails) ResetPassword ¶
func (details *ResetPasswordDetails) ResetPassword() *errors.ErrorCode
ResetPassword handles the user password reset.
type ReturnUserDetails ¶
type ReturnUserDetails struct { FirstName string LastName string Email string Username string IsConfirmedEmail bool }
ReturnUserDetails holds the details that will be returned.
type SendConfirmEmailDetails ¶
type SendConfirmEmailDetails struct { Email string `json:"email" binding:"required" valid:"email"` ConfirmEmailURL string `json:"confirm_email_url" binding:"required" valid:"url"` }
SendConfirmEmailDetails holds the details required to send the email.
func (*SendConfirmEmailDetails) SendConfirmEmail ¶
func (details *SendConfirmEmailDetails) SendConfirmEmail() *errors.ErrorCode
SendConfirmEmail sends confirm email email to queue.
type SendResetPasswordEmailDetails ¶
type SendResetPasswordEmailDetails struct { Email string `json:"email" binding:"required" valid:"email"` ResetPasswordURL string `json:"reset_password_url" binding:"required" valid:"url"` }
SendResetPasswordEmailDetails holds the details required to send the email.
func (*SendResetPasswordEmailDetails) SendResetPasswordEmail ¶
func (details *SendResetPasswordEmailDetails) SendResetPasswordEmail() *errors.ErrorCode
SendResetPasswordEmail sends the reset password email to queue.
type SignInDetails ¶
type SignInDetails struct { Email string `json:"email" binding:"required" valid:"email"` Password string `json:"password" binding:"required" valid:"length(8|60)"` RememberMe bool `json:"remember_me"` }
SignInDetails holds the details required to sign in the user.
type SignOutDetails ¶
type SignOutDetails struct { Claims jwt.RefreshTokenClaims TokenString string }
SignOutDetails holds the details required to sign out the user.
func (*SignOutDetails) SignOut ¶
func (details *SignOutDetails) SignOut() *errors.ErrorCode
SignOut handles the user sign out.
func (*SignOutDetails) SignOutAll ¶
func (details *SignOutDetails) SignOutAll() *errors.ErrorCode
SignOutAll handles the user sign out of all sessions.
type SignUpDetails ¶
type SignUpDetails struct { Email string `json:"email" binding:"required" valid:"email"` Username string `json:"username" binding:"required" valid:"length(3|40)"` Password string `json:"password" binding:"required" valid:"length(8|60)"` FirstName string `json:"first_name" binding:"required" valid:"length(1|32)"` LastName string `json:"last_name" binding:"required" valid:"length(1|32)"` ConfirmEmailURL string `json:"confirm_email_url" binding:"required" valid:"url"` }
SignUpDetails holds the details required to sign up the user.
func (*SignUpDetails) SignUp ¶
func (details *SignUpDetails) SignUp() *errors.ErrorCode
SignUp handles the user sign up.
type UpdateDetails ¶
type UpdateDetails struct { Claims jwt.RefreshTokenClaims Email string `json:"email" valid:"optional,email"` Username string `json:"username" valid:"optional,length(3|40)"` Password string `json:"password" valid:"optional,length(8|60)"` FirstName string `json:"first_name" valid:"optional,length(1|32)"` LastName string `json:"last_name" valid:"optional,length(1|32)"` }
UpdateDetails holds the details required to update the user.
func (*UpdateDetails) Update ¶
func (details *UpdateDetails) Update() *errors.ErrorCode
Update handles the user update.
type UserDetailsDetails ¶
type UserDetailsDetails struct {
UserID uint
}
UserDetailsDetails holds the details required to get the user's details.
func (*UserDetailsDetails) UserDetails ¶
func (details *UserDetailsDetails) UserDetails() (*ReturnUserDetails, *errors.ErrorCode)
UserDetails handles getting the user's details.