coding

package
v0.0.0-...-3f8f567 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Jan 26, 2021 License: Apache-2.0 Imports: 18 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func AesDecrypt

func AesDecrypt(encodeString string, key string) (string, error)

AesDecrypt AES算法解密

func AesEncrypt

func AesEncrypt(str, key string) (string, error)

AesEncrypt AES算法加密

func Base64Decode

func Base64Decode(src string) (string, error)

Base64Decode Base64格式解码

func Base64Encode

func Base64Encode(data string) string

Base64Encode Base64格式编码

func CRC32

func CRC32(str string) int

func CRC64

func CRC64(str string) int64

func DesDecrypt

func DesDecrypt(str, key string) (string, error)

DesDecrypt DES算法解密

func DesEncrypt

func DesEncrypt(str, key string) (string, error)

DesEncrypt DES算法加密

func GBKToUTF8

func GBKToUTF8(str string) string

func JSONDecode

func JSONDecode(str string) structs.M

JSONDecode Json解析(返回structs.M)

func JSONDecodeArray

func JSONDecodeArray(str string) []structs.M

JSONDecodeArray Json数组解析(返回[]structs.M)

func JSONEncode

func JSONEncode(value interface{}) string

JSONEncode Json编码

func JSONGet

func JSONGet(json string, path string) interface{}

JSONGet 快捷方式访问通过路径访问属性值(返回interface{})

func JSONGetBool

func JSONGetBool(json string, path string) bool

JSONGetBool 快捷方式访问通过路径访问属性值(返回bool值)

func JSONGetFloat

func JSONGetFloat(json string, path string) float64

JSONGetInt 快捷方式访问通过路径访问属性值(返回浮点数)

func JSONGetInt

func JSONGetInt(json string, path string) int64

JSONGetInt 快捷方式访问通过路径访问属性值(返回整数)

func JSONGetRaw

func JSONGetRaw(json string, path string) string

JSONGetRaw 快捷方式访问通过路径访问属性值(返回字符串,适合属性仍然是Json对象的场景)

func JSONGetString

func JSONGetString(json string, path string) string

JSONGetString 快捷方式访问通过路径访问属性值(返回字符串)

func MD5

func MD5(str string) (string, error)

func SHA1

func SHA1(str string) (string, error)

func SHA2

func SHA2(str string) (string, error)

func UTF8ToGBK

func UTF8ToGBK(str string) string

func XMLDecode

func XMLDecode(str string) structs.M

XMLDecode Xml格式解析

func XMLEncode

func XMLEncode(value interface{}) string

XMLEncode Xml格式编码

Types

This section is empty.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL