Documentation ¶
Overview ¶
Package aws handles AWS signature v4 and other AWS-specific auth functions.
This package is internalized because we don't want to have the interface of methodology such as request signing to have to be solidified to external users of dynago yet, and so we can iterate rapidly on this.
Index ¶
Constants ¶
const DynamoTargetPrefix = "DynamoDB_20120810."
DynamoTargetPrefix is the Dynamo API version we support.
Variables ¶
var ErrMaxResponse = errors.New("Exceeded maximum response size of 25MB")
ErrMaxResponse is returned when responses are too big.
var MaxResponseSize int64 = 25 * 1024 * 1024 // 25MB maximum response
MaxResponseSize is the maximum size of a response.
Functions ¶
func FixEndpointUrl ¶ added in v1.2.1
Types ¶
type AwsSigner ¶
AwsSigner signs requests with the AWS v4 request signing algorithm.
This is required for all aws requests to ensure:
- request bodies and headers are not tampered with in flight.
- It also prevents replay attacks
- It also handles authentication without sending or revealing the shared secret
type RequestMaker ¶
type RequestMaker struct { // These are required to be set Endpoint string Signer Signer BuildError func(*http.Request, []byte, *http.Response, []byte) error // These can be optionally set Caller http.Client DebugRequests bool DebugResponses bool DebugFunc func(string, ...interface{}) }
RequestMaker is the default AwsRequester used by Dynago.
The RequestMaker has its properties exposed as public to allow easier construction. Directly modifying properties on the RequestMaker after construction is not goroutine-safe so it should be avoided except for in special cases (testing, mocking).
func (*RequestMaker) MakeRequest ¶
func (r *RequestMaker) MakeRequest(target string, body []byte) ([]byte, error)