Documentation
¶
Index ¶
Constants ¶
View Source
const ( // MinPasswordLength 密码长度限制 MinPasswordLength = 8 MaxPasswordLength = 128 // MinRequiredCharTypes 密码强度要求 MinRequiredCharTypes = 3 // 至少包含3种字符类型 )
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Password ¶
type Password struct {
// contains filtered or unexported fields
}
Password 登录密码值对象
func NewEmptyPassword ¶
func NewEmptyPassword() Password
func NewPassword ¶
func NewPasswordByHashText ¶
type PasswordStrength ¶
type PasswordStrength int
PasswordStrength 密码强度等级
const ( PasswordStrengthWeak PasswordStrength = iota PasswordStrengthMedium PasswordStrengthStrong PasswordStrengthVeryStrong )
func EvaluatePasswordStrength ¶
func EvaluatePasswordStrength(password string) PasswordStrength
EvaluatePasswordStrength 评估密码强度
type Telephone ¶
type Telephone struct {
// contains filtered or unexported fields
}
Telephone 手机号值对象
func NewEmptyTelephone ¶
func NewEmptyTelephone() Telephone
func NewTelephone ¶
Click to show internal directories.
Click to hide internal directories.