Documentation ¶
Index ¶
- Constants
- Variables
- func ArrStrCmp(src []string, dest []string) ([]string, []string)
- func ArrUintCmp(src []uint, dest []uint) ([]uint, []uint)
- func ConvertToPinYin(src string) (dst string)
- func DecodeStrFromBase64(str string) string
- func EncodePass(rawPassPhrase []byte) string
- func EncodeStr2Base64(str string) string
- func Err(c *gin.Context, err *RspError, data interface{})
- func Json2Struct(str string, obj interface{})
- func JsonI2Struct(str interface{}, obj interface{})
- func JsonToMap(jsonStr string) (m map[string]string, err error)
- func MapToJson(m map[string]string) (string, error)
- func Matches(encodedPassPhrase, rawPassPhrase []byte) bool
- func NewGenPasswd(passwd string) string
- func NewParPasswd(passwd string) string
- func RSADecrypt(base64Data, privateBytes []byte) ([]byte, error)
- func RSAEncrypt(data, publicBytes []byte) ([]byte, error)
- func Response(c *gin.Context, httpStatus int, code int, data gin.H, message string)
- func SendCode(sendto []string) error
- func SendMail(sendto []string, pass string) error
- func SliceToString(src []uint, delim string) string
- func StringToSlice(src string, delim string) []uint
- func Struct2Json(obj interface{}) string
- func Success(c *gin.Context, data interface{})
- type H
- type PageOption
- type RspError
Constants ¶
View Source
const ( SystemErr = 500 MySqlErr = 501 LdapErr = 505 OperationErr = 506 ValidatorErr = 412 )
Variables ¶
View Source
var VerificationCodeCache = cache.New(24*time.Hour, 48*time.Hour)
验证码放到缓存当中
Functions ¶
func ConvertToPinYin ¶
func EncodePass ¶
Encode encodes the []byte of raw password
Types ¶
type PageOption ¶
Click to show internal directories.
Click to hide internal directories.