Documentation
¶
Overview ¶
Manages AWS Auth v4 requests to DynamoDB. See http://docs.aws.amazon.com/general/latest/gr/signature-version-4.html for more information on v4 signed requests. For examples, see any of the package in the `endpoints` directory.
Index ¶
- Constants
- Variables
- func GetRespReqID(response http.Response) (string, error)
- func MatchCheckSum(response http.Response, respbody []byte) (bool, error)
- func RawReq(reqJSON []byte, amzTarget string) ([]byte, string, int, error)
- func RawReqWithConf(reqJSON []byte, amzTarget string, c *conf.AWS_Conf) ([]byte, string, int, error)
- func Req(reqJSON []byte, amzTarget string) ([]byte, string, int, error)
- func ReqWithConf(reqJSON []byte, amzTarget string, c *conf.AWS_Conf) ([]byte, string, int, error)
Constants ¶
const (
IAM_WARN_MESSAGE = "check roles sources and make sure you have run one of the roles " +
"management functions in package conf_iam, such as GoIAM"
)
Variables ¶
var Client *http.Client
Client for executing requests.
Functions ¶
func GetRespReqID ¶
GetRespReqID retrieves the unique identifier from the AWS Response
func MatchCheckSum ¶
MatchCheckSum will perform a local crc32 on the response body and match it against the aws crc32 *** WARNING *** There seems to be a mismatch between what Go calculates and what AWS (java?) calculates here, I believe related to utf8 (go) vs utf16 (java), but I don't know enough about encodings to solve it. So until that issue is solved, don't use this.
func RawReq ¶
RawReq will sign and transmit the request to the AWS DynamoDB endpoint. This method uses the global conf.Vals to obtain credential and configuation information.
func RawReqWithConf ¶
func RawReqWithConf(reqJSON []byte, amzTarget string, c *conf.AWS_Conf) ([]byte, string, int, error)
RawReqWithConf will sign and transmit the request to the AWS DynamoDB endpoint. reqJSON is the json request amzTarget is the dynamoDB endpoint c is the configuration struct returns []byte respBody, string aws reqID, int http code, error
Types ¶
This section is empty.