signing

package
v1.0.1 Latest Latest
Warning

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

Go to latest
Published: Mar 8, 2021 License: MIT Imports: 14 Imported by: 1

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 {
	SignHTTP(ctx context.Context, credentials aws.Credentials, r *http.Request, payloadHash string, service string, region string, signingTime time.Time, optFns ...func(options *signer.SignerOptions)) 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, credentials aws.Credentials, 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