Documentation ¶
Index ¶
- func AesDecrypt(src []byte, key []byte) []byte
- func AesEncrypt(src, key []byte) ([]byte, error)
- func Assert(err error, msg interface{})
- func AssignMap(maps ...map[interface{}]interface{}) map[interface{}]interface{}
- func Base64Decoding(enc string) (string, error)
- func Base64Encoding(str string) string
- func BcryptHash(src string) string
- func BcryptVerify(hash, src string) bool
- func ByteToReadCloser(b []byte) io.ReadCloser
- func ByteToReader(b []byte) io.Reader
- func BytesCombine(pBytes ...[]byte) []byte
- func FuncName(f interface{}) string
- func HasFile(f string) bool
- func RandomStr(length int) string
- func StructToMap(v interface{}) map[string]interface{}
- func ToString(v interface{}) string
- func ToStruct(raw interface{}, v interface{}) error
- func XID() string
- type ErrorData
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func AesDecrypt ¶
func AesEncrypt ¶
func AssignMap ¶
func AssignMap(maps ...map[interface{}]interface{}) map[interface{}]interface{}
AssignMap 合并多个map
func BcryptHash ¶
func BcryptVerify ¶
func ByteToReadCloser ¶
func ByteToReadCloser(b []byte) io.ReadCloser
ByteToReadCloser 将字节转换成一次性的读取流
func BytesCombine ¶
func StructToMap ¶
func StructToMap(v interface{}) map[string]interface{}
StructToMap 把结构体转成map,key使用json定义的key
Types ¶
Click to show internal directories.
Click to hide internal directories.