utils

package
v0.0.0-...-ed8de99 Latest Latest
Warning

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

Go to latest
Published: Mar 10, 2023 License: MIT Imports: 21 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func CheckWxResp

func CheckWxResp(resp *http.Response) (map[string]interface{}, error)

func CheckWxRespForPay

func CheckWxRespForPay(resp *http.Response) (map[string]interface{}, error)

func GenerateAuthorization

func GenerateAuthorization(method, urlStr, data, mchId, privateKey, serialNo string) (string, error)

生成签名头

func GetJson

func GetJson(url string) (map[string]interface{}, error)

func ParsePrivateKey

func ParsePrivateKey(privateKey string) (*rsa.PrivateKey, error)

func RsaSign

func RsaSign(signContent string, privateKey string, hash crypto.Hash) string

sha256 with rsa

func SendJson

func SendJson(targetUrl string, data interface{}, escapeHtml ...bool) (map[string]interface{}, error)

func SendJsonForPay

func SendJsonForPay(url string, data interface{}, mchId, privateKey, serialNo string) (map[string]interface{}, error)

Types

This section is empty.

Jump to

Keyboard shortcuts

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