aws

package
v1.2.1 Latest Latest
Warning

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

Go to latest
Published: Jul 28, 2015 License: MIT Imports: 11 Imported by: 0

Documentation

Overview

Provide AWS signature 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

View Source
const DynamoTargetPrefix = "DynamoDB_20120810." // This is the Dynamo API version we support

Variables

View Source
var MaxResponseError = errors.New("Exceeded maximum response size of 25MB")
View Source
var MaxResponseSize int64 = 25 * 1024 * 1024 // 25MB maximum response

Functions

func FixEndpointUrl added in v1.2.1

func FixEndpointUrl(endpoint string) string

Types

type AwsSigner

type AwsSigner struct {
	AccessKey string
	SecretKey string
	Region    string
	Service   string
}

func (*AwsSigner) SignRequest

func (info *AwsSigner) SignRequest(request *http.Request, bodyBytes []byte)

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)

type Signer

type Signer interface {
	SignRequest(*http.Request, []byte)
}

Jump to

Keyboard shortcuts

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