Documentation
¶
Index ¶
- Constants
- func ComputeSignature(method, path, query, timestamp string, body []byte, secret string) string
- func ParseJSONResponse(resp *http.Response, target interface{}) error
- func ValidateSignature(method, path, query, timestamp string, body []byte, signature, secret string) bool
- type Client
- type Config
Constants ¶
View Source
const ( // HeaderSignature is the header containing the HMAC signature HeaderSignature = "X-Signature" // HeaderTimestamp is the header containing the request timestamp HeaderTimestamp = "X-Timestamp" )
Variables ¶
This section is empty.
Functions ¶
func ComputeSignature ¶
ComputeSignature computes the HMAC-SHA256 signature for an HTTP request The signature is computed as: HMAC-SHA256(method + path + query + timestamp + body, secret)
func ParseJSONResponse ¶
ParseJSONResponse parses a JSON response from an HTTP response
Types ¶
Click to show internal directories.
Click to hide internal directories.