Documentation ¶
Index ¶
- Constants
- func AesDecrypt(cryted string, key string) string
- func AesEncrypt(orig string, key string) string
- func BytesToInt(b []byte, isSymbol bool) (int, error)
- func BytesToIntS(b []byte) (int, error)
- func Capitalize(str string) string
- func ConvertMapInterfaceToMapByField(list []map[string]interface{}, key string, value string) map[string]string
- func DeleteExtraSpace(s string) string
- func ExtendList(list *[]map[string]interface{}, _map map[string]string, key string, ...)
- func GetArrayByMap(_dict map[string]interface{}) []string
- func GetSnakeCaseStr(str string) string
- func GetUUID() string
- func IntToBytes(n int, b byte) ([]byte, error)
- func MD5(data []byte) string
- func PKCS7Padding(ciphertext []byte, blocksize int) []byte
- func PKCS7UnPadding(origData []byte) []byte
- func PutSelectResultToMapByField(list []map[string]interface{}, field string) map[string]interface{}
- func SelectIdsFromMapInterface(list []map[string]interface{}, key string) []string
Constants ¶
View Source
const (
// 可自定义盐值
TokenSalt = "DsideaL4r5t6y7u"
)
Variables ¶
This section is empty.
Functions ¶
func AesDecrypt ¶
func AesEncrypt ¶
func ConvertMapInterfaceToMapByField ¶
func ConvertMapInterfaceToMapByField(list []map[string]interface{}, key string, value string) map[string]string
* 功能:将数据库返回的查询结果映射成字典,用于扩展字段 作者:黄海 时间:2020-02-14
func ExtendList ¶
* 功能:扩展数据库查询结果集 作者:黄海 时间:2020-02-14
func GetArrayByMap ¶
* 功能:通过字典获取字符串数组 作者:黄海 时间:2020-02-14
func PutSelectResultToMapByField ¶
func PutSelectResultToMapByField(list []map[string]interface{}, field string) map[string]interface{}
* 功能:将一个数据库查询返回结果中的某一列,形成字典 作者:黄海 时间:2020-02-14
func SelectIdsFromMapInterface ¶
* 功能:从一个数据库的查询返回结果中获取指定字段的IDS 作者:黄海 时间:2020-02-14
Types ¶
This section is empty.
Click to show internal directories.
Click to hide internal directories.