Documentation ¶
Index ¶
- func AesDecrypt(crypted, key []byte) ([]byte, error)
- func AesEncrypt(origData, key []byte) ([]byte, error)
- func Base64Decode(sourceStr string) (string, error)
- func Base64Encode(sourceStr string) string
- func GenNonceStr() string
- func GenShortUuid() string
- func GenTransId() string
- func GenUuid() string
- func GetBetweenStr(str, start, end string) string
- func GetTLSConfig(certPath, keyPath string) (*tls.Config, error)
- func GetWxTime(timestamp ...int) string
- func HttpGet(url string) (string, error)
- func HttpGetOriginData(getUrl string) (body []byte)
- func HttpPost(url string, data string) (string, error)
- func HttpPostWithSignHeader(url string, data string, sign string) (string, error)
- func IsEmpty(value interface{}) bool
- func IsLiveMode() bool
- func Json2Map(jsonStr string) (s map[string]interface{}, err error)
- func JsonDecode(jsonStr string, structModel interface{}) error
- func JsonEncode(structModel interface{}) (string, error)
- func MapKeyFirstToLower(data map[string]interface{}) (retData map[string]interface{})
- func Md5(str string) string
- func PKCS7Padding(ciphertext []byte, blockSize int) []byte
- func PKCS7UnPadding(origData []byte) []byte
- func Rand() float64
- func RandWithMax(maxNum int) int32
- func SecurePost(url string, data string, certPath string, keyPath string) (string, error)
- func StrFirstToUpper(str string) string
- func StringSliceUnique(slc []string) []string
- func Struct2Map(obj interface{}) (data map[string]interface{}, err error)
- func SubString(str string, begin, length int) (substr string)
- func TimeStr2Time(timeStr, format string) int
- func Timestamp() int
- func VerifyIdCard(idCard string) bool
- func WxTimeStr2Timestamp(timeStr string) int
- func XmlDecode(xmlStr string) (map[string]interface{}, error)
- func XmlEncode(xmlMap map[string]interface{}) (string, error)
- type XmlCDATA
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func AesDecrypt ¶
func AesEncrypt ¶
func Base64Decode ¶
func Base64Encode ¶
func GenShortUuid ¶
func GenShortUuid() string
func HttpGetOriginData ¶
func HttpPostWithSignHeader ¶
func JsonDecode ¶
func JsonEncode ¶
func MapKeyFirstToLower ¶
map的key周字符小写
func PKCS7Padding ¶
func PKCS7UnPadding ¶
func RandWithMax ¶
func SecurePost ¶
func Struct2Map ¶
结构体转map,tag: `data:"aliasName;required"`
func TimeStr2Time ¶
func WxTimeStr2Timestamp ¶
Types ¶
Click to show internal directories.
Click to hide internal directories.