signing

package
v0.3.2 Latest Latest
Warning

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

Go to latest
Published: Jun 5, 2020 License: MIT Imports: 11 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	MissingSigner  = errors.New("signer is required to perform http request")
	MissingService = errors.New("aws service is required to perform http request")
	MissingRegion  = errors.New("aws region is required to perform http request")
)

Functions

func NewReverseProxy

func NewReverseProxy(endpointUrl *url.URL, transport http.RoundTripper) *httputil.ReverseProxy

Types

type Signer

type Signer interface {
	Sign(ctx context.Context, r *http.Request, body io.ReadSeeker, service, region string, signTime time.Time) (http.Header, error)
}

Signer represents an interface that v1 and v2 aws sdk follows to sign http requests

type Transport

type Transport struct {
	BaseTransport http.RoundTripper
	// contains filtered or unexported fields
}

Transport implements http.RoundTripper and optionally wraps another RoundTripper

func NewTransport

func NewTransport(signer Signer, service, region string) *Transport

Creates a new transport that can be used by http.Client If region is unspecified, AWS_REGION environment variable is used

func (*Transport) RoundTrip

func (t *Transport) RoundTrip(req *http.Request) (*http.Response, error)

Jump to

Keyboard shortcuts

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