Documentation
¶
Index ¶
- func CheckPassword(hash, pass string) error
- func ExtractPhone(c *gin.Context) string
- func GeneratePassword(passwd string) ([]byte, error)
- func ValidBirthday(birth string) bool
- func ValidEmail(email string) bool
- func ValidName(name string) bool
- func ValidPassword(pw string) bool
- func ValidPhone(phone string) bool
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func CheckPassword ¶
CheckPassword is the util that use bcrypt package to check password with hash return nil for success and nil for failure
func ExtractPhone ¶
ExtractPhone extract phone from jwt payload
func GeneratePassword ¶
GeneratePassword is the util that use bcrypt package to generage password hash
func ValidBirthday ¶
ValidBirthday is the utility that check the validation of birthday
func ValidEmail ¶
ValidEmail is the util that check the validation of email
func ValidName ¶
ValidName is the util that check the validation of username length is between 4 to 16 and all number are forbidden
func ValidPassword ¶
ValidPassword is the util that check the validation of password
Types ¶
This section is empty.
Click to show internal directories.
Click to hide internal directories.