Documentation ¶
Index ¶
Constants ¶
View Source
const ( AccessKey string = "a0817987-f3e0-459e-cb09-bdb7d91d6c0e" Secret string = "bae8be05-26cc-6a4d-7fa9-7f81729a9541" Version string = "CAF1" Algorithm string = "HMAC-SHA256" )
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type RequestSignature ¶
type RequestSignature struct { Method string // 请求方法 Uri string // 请求URI Params []RequestParams // 请求参数, 按照键名排序 Headers []RequestHeaders // 请求头, 按照键名排序 Body []byte // 请求体 AccessKey string // 访问密钥 Secret string // 密钥 Version string // 版本号 Algorithm string // 算法 }
请求签名结构体
func NewDefaultRequestSignature ¶
func NewDefaultRequestSignature(method string, uri string, params []RequestParams, headers []RequestHeaders, body []byte) *RequestSignature
创建请求签名对象
func (*RequestSignature) GenAuthorization ¶
func (r *RequestSignature) GenAuthorization() string
生成签名授权字符串
Click to show internal directories.
Click to hide internal directories.