auth_v4

package
Version: v0.0.0-...-1f046af Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Jun 15, 2015 License: BSD-2-Clause Imports: 15 Imported by: 0

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

View Source
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

View Source
var Client *http.Client

Client for executing requests.

Functions

func GetRespReqID

func GetRespReqID(response http.Response) (string, error)

GetRespReqID retrieves the unique identifier from the AWS Response

func MatchCheckSum

func MatchCheckSum(response http.Response, respbody []byte) (bool, error)

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

func RawReq(reqJSON []byte, amzTarget string) ([]byte, string, int, error)

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

func Req

func Req(reqJSON []byte, amzTarget string) ([]byte, string, int, error)

Req will sign and transmit the request to the AWS DynamoDB endpoint. This method uses the global conf.Vals to obtain credential and configuation information. At one point, RawReq and Req were different, now RawReq is just an alias.

func ReqWithConf

func ReqWithConf(reqJSON []byte, amzTarget string, c *conf.AWS_Conf) ([]byte, string, int, error)

ReqConf is just a wrapper for RawReq if we need to massage data before dispatch. Uses parameterized conf.

Types

This section is empty.

Source Files

Directories

Path Synopsis
Manages signing tasks required by AWS Auth v4 requests to DynamoDB.
Manages signing tasks required by AWS Auth v4 requests to DynamoDB.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL