Documentation ¶
Index ¶
- Constants
- func AuthHeaderValue(signatureStr, accessKeyStr string, signedHeaders []string) string
- func CanonicalHeaders(request *http.Request, signerHeaders []string) string
- func CanonicalQueryString(request *http.Request) string
- func CanonicalRequest(request *http.Request, signedHeaders []string) (string, error)
- func CanonicalURI(request *http.Request) string
- func HexEncodeSHA256Hash(body []byte) (string, error)
- func RequestPayload(request *http.Request) ([]byte, error)
- func SignStringToSign(stringToSign string, signingKey []byte) (string, error)
- func SignedHeaders(r *http.Request) []string
- func StringToSign(canonicalRequest string, t time.Time) (string, error)
- type Signer
Constants ¶
View Source
const ( DateFormat = "20060102T150405Z" SignAlgorithm = "SDK-HMAC-SHA256" HeaderXDateTime = "X-Sdk-Date" HeaderXHost = "host" HeaderXAuthorization = "Authorization" HeaderXContentSha256 = "X-Sdk-Content-Sha256" )
Variables ¶
This section is empty.
Functions ¶
func AuthHeaderValue ¶
Get the finalized value for the "Authorization" header. The signature parameter is the output from SignStringToSign
func CanonicalHeaders ¶
CanonicalHeaders
func CanonicalQueryString ¶
CanonicalQueryString
func CanonicalRequest ¶
Build a CanonicalRequest from a regular request string
func CanonicalURI ¶
CanonicalURI returns request uri
func HexEncodeSHA256Hash ¶
HexEncodeSHA256Hash returns hexcode of sha256
func SignStringToSign ¶
Create the HWS Signature.
Types ¶
Click to show internal directories.
Click to hide internal directories.