utils

package
v0.0.0-...-4f13b8d Latest Latest
Warning

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

Go to latest
Published: May 8, 2020 License: MIT Imports: 15 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func CheckPointer

func CheckPointer(obj interface{}) error

CheckPointer 检查是否为指针对象

func ComputeHmac256

func ComputeHmac256(str string, secret string) string

ComputeHmac256 HMAC SHA256加密

func DecodeGzip

func DecodeGzip(data []byte) ([]byte, error)

DecodeGzip 解压gzip数据

func EncodeQueryString

func EncodeQueryString(params map[string]interface{}) string

EncodeQueryString 拼接query字符串

func MergeMap

func MergeMap(map1, map2 map[string]interface{}) map[string]interface{}

MergeMap 合并两个map

func Parse2Obj

func Parse2Obj(resp *simplejson.Json, obj interface{}) (*simplejson.Json, error)

Parse2Obj 将json解析到obj中

func Sign

func Sign(method, host, path, secretKey string, params map[string]interface{}) string

Sign 签名请求

func UinxMillisecond

func UinxMillisecond() int64

UinxMillisecond 取毫秒时间戳

Types

This section is empty.

Jump to

Keyboard shortcuts

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