utils

package
Version: v1.2.9 Latest Latest
Warning

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

Go to latest
Published: Mar 2, 2021 License: MIT Imports: 12 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func HmacSha256

func HmacSha256(str string, key string) string

HmacSha256 HMAC-SHA256加密

func MAP2XML

func MAP2XML(m map[string]interface{}) string

MAP2XML map转xml

func MAPMerge

func MAPMerge(args ...map[string]interface{}) (m map[string]interface{})

MAPMerge map合并

func MD5

func MD5(str string) string

MD5 md5加密

func RandomStr

func RandomStr() string

RandomStr 随机字符串

func SignHMACSHA256 added in v1.2.4

func SignHMACSHA256(m map[string]interface{}, key string) (sign string)

Sign 生成签名 HMAC-SHA256加密

func SignMD5 added in v1.2.4

func SignMD5(m map[string]interface{}, key string) (sign string)

SignMD5 生成签名 MD5加密

func SortKey

func SortKey(m map[string]interface{}) string

SortKey map排序

func Struct2Map

func Struct2Map(params interface{}) (m map[string]interface{})

Struct2Map 结构体转map

func XML2MAP

func XML2MAP(b []byte) (m map[string]string)

XML2MAP xml转map

Types

This section is empty.

Source Files

Jump to

Keyboard shortcuts

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