Documentation ¶
Index ¶
- func AesDecrypt(ciphertext []byte) ([]byte, error)
- func AesEncrypt(plaintext []byte) ([]byte, error)
- func Compare(inputPwd, hashPwd string) error
- func EncodeMD5(value string) string
- func GenerateToken(loginName string) (string, error)
- func GetPage(c *gin.Context) int
- func GetRandomCode() string
- func GetRandomSalt() string
- func GetRandomString(length int) string
- func GetTrans() ut.Translator
- func GetValidate() *validator.Validate
- func RegPhone(phone string) bool
- func RegUserName(username string) bool
- func ValidEmail(email string) bool
- type Claims
- type Error
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func RegUserName ¶
Types ¶
type Claims ¶
type Claims struct { LoginName []byte `json:"loginname"` jwt.StandardClaims }
Claims 声明
type Error ¶
Error 带有错误码 与 错误信息的错误类
func ErrNewCode ¶
ErrNew returns an error that formats as the given text.
Source Files ¶
Click to show internal directories.
Click to hide internal directories.