Documentation ¶
Index ¶
- func Decrypt(s string) string
- func Encrypt(s string) string
- func GBK2Str(s string) string
- func GenDecrypt(encrypted string, key []byte) ([]byte, error)
- func GenEncrypt(value, key []byte) (string, error)
- func GinJSONData(code int, data interface{}, message string) gin.H
- func PKCS7Padding(ciphertext []byte, blockSize int) []byte
- func PKCS7UnPadding(origData []byte) []byte
- func SetCookie(c *gin.Context, name, value string, maxAge int)
- func Str2GBK(s string) string
- func StrClean(s string) string
- func StrCut(s, begin, end string) string
- func StrMap2GBK(m map[string]string) (result map[string]string)
- func StrReplace(s string, m map[string]string) string
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func GinJSONData ¶
GinJSONData 返回统一的JSON响应数据
func StrMap2GBK ¶
StrMap2GBK 将map的所有字符串转为GBK编码. 由于正方教务系统还没有中文的key. 所以对value做转换就OK了.
Types ¶
This section is empty.
Click to show internal directories.
Click to hide internal directories.