Documentation
¶
Index ¶
- func Login(login, password string) (map[string]interface{}, error)
- func ResetPassword(otp, password []byte) (map[string]interface{}, error)
- func VerifyAccount(otp []byte) (map[string]interface{}, error)
- type Account
- func (a *Account) ChangePassword(password []byte) (map[string]interface{}, error)
- func (a *Account) Create() (map[string]interface{}, error)
- func (a *Account) SendEmailOTP(email string, isVerification bool, host string) (map[string]interface{}, error)
- func (a *Account) Validate() (msg map[string]interface{}, ok bool)
- type Token
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func ResetPassword ¶
func VerifyAccount ¶
Types ¶
type Account ¶
type Account struct {
gorm.Model
Email string `json:"email,omitempty"`
Password string `json:"password"`
Token string `json:"token" gorm:"-:all"`
Phone string `json:"phone,omitempty"`
Username string `json:"username"`
Verified bool `json:"verified"`
VerificationOTP string `json:"-"`
RestorePasswordOTP string `json:"-"`
TimeVerificationOTPSet time.Time `json:"-"`
TimeForgotPasswordOTPSet time.Time `json:"-"`
}
func (*Account) ChangePassword ¶
func (*Account) SendEmailOTP ¶
Click to show internal directories.
Click to hide internal directories.