Documentation ¶
Index ¶
- Constants
- func CalculateSign(content, signType, key string) (string, error)
- func GetCurrTS() int64
- func GetCurrTSStr() string
- func HTTPGet(uri string) ([]byte, error)
- func HTTPGetContext(ctx context.Context, uri string) ([]byte, error)
- func HTTPPost(uri string, data string) ([]byte, error)
- func HTTPPostContext(ctx context.Context, uri string, data string) ([]byte, error)
- func NewHTTPPost(uri string, data string) ([]byte, error)
- func OrderParam(p map[string]string, bizKey string, key string) (returnStr string)
- func ParamSign(p map[string]string, urlKey, key string) (string, error)
- func PostFile(fieldname, filename, uri string) ([]byte, error)
- func PostJSON(uri string, obj interface{}) ([]byte, error)
- func PostJSONWithRespContentType(uri string, obj interface{}) ([]byte, string, error)
- func PostMultipartForm(fields []MultipartFormField, uri string) (respBody []byte, err error)
- func PostXML(uri string, obj interface{}) ([]byte, error)
- func PostXMLWithTLS(uri string, obj interface{}, ca, key string) ([]byte, error)
- func UrlParam(p map[string]string, bizKey string) (returnStr string)
- type BasicError
- type CommonError
- type MultipartFormField
- type ReturnCommonError
- type SubError
Constants ¶
View Source
const ( SignTypeMD5 = `MD5` SignTypeHMACSHA256 = `HMAC-SHA256` )
ark sign method
View Source
const ( BASE_BACK_URL = "https://partner.kaola.com" //商家后台 USER_OAUTH_URL = "https://oauth.kaola.com/oauth/authorize" //用户授权地址 BASE_API_URL = "https://openapi.kaola.com/router" //用户API请求地址 )
Variables ¶
This section is empty.
Functions ¶
func CalculateSign ¶
CalculateSign calculate sign
func HTTPGetContext ¶
HTTPGetContext get 请求
func HTTPPostContext ¶
HTTPPostContext post 请求
func OrderParam ¶
OrderParam trade params
func PostJSONWithRespContentType ¶
PostJSONWithRespContentType post json数据请求,且返回数据类型
func PostMultipartForm ¶
func PostMultipartForm(fields []MultipartFormField, uri string) (respBody []byte, err error)
PostMultipartForm 上传文件或其他多个字段
func PostXMLWithTLS ¶
PostXMLWithTLS perform a HTTP/POST request with XML body and TLS
Types ¶
type BasicError ¶
type CommonError ¶
type MultipartFormField ¶
MultipartFormField 保存文件或其他字段信息
type ReturnCommonError ¶
Click to show internal directories.
Click to hide internal directories.