aws

package module
v1.0.0 Latest Latest
Warning

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

Go to latest
Published: Aug 7, 2021 License: MIT Imports: 10 Imported by: 1

README

AWS

aws provides signing of HTTP requests to Amazon Services, and a versatile S3 client.

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Signer

type Signer interface {
	Sign(*http.Request)
}

Signer allows to sign a request..

type Transport

type Transport struct {
	// Signer is the underlying request signer used when making requests.
	Signer Signer

	// Transport is the underlying HTTP transport to use when making requests.
	// It will default to http.DefaultTransport if nil.
	Transport http.RoundTripper
}

Transport allows to make signed calls to AWS endpoints.

func (*Transport) RoundTrip

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

RoundTrip implements the RoundTripper interface.

type V4Signer

type V4Signer struct {
	Region        string
	SecretKey     string
	AccessKey     string
	SecurityToken string
	Service       string

	Clock func() time.Time
}

V4Signer allows to sign a request following AWS V4 signature requirements.

func (*V4Signer) Sign

func (s *V4Signer) Sign(r *http.Request)

Sign signs the given http.Request.

func (*V4Signer) Transport

func (s *V4Signer) Transport() http.RoundTripper

Transport returns a http.RoundTripper using this signer to sign requests.

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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