sigv4

package
v0.25.0 Latest Latest
Warning

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

Go to latest
Published: Mar 15, 2024 License: Apache-2.0 Imports: 20 Imported by: 4

Documentation

Index

Constants

View Source
const SigV4MiddlewareName = "sigv4"

SigV4MiddlewareName the middleware name used by SigV4Middleware.

Variables

This section is empty.

Functions

func New

func New(cfg *Config, next http.RoundTripper, opts ...Opts) (http.RoundTripper, error)

New instantiates a new signing middleware with an optional succeeding middleware. The http.DefaultTransport will be used if nil

func SigV4Middleware added in v0.25.0

func SigV4Middleware(verboseLogging bool) httpclient.Middleware

SigV4Middleware applies AWS Signature Version 4 request signing for the outgoing request.

Types

type Config

type Config struct {
	AuthType string

	Profile string

	Service string

	AccessKey    string
	SecretKey    string
	SessionToken string

	AssumeRoleARN string
	ExternalID    string
	Region        string
}

type Opts added in v0.10.0

type Opts struct {
	VerboseMode bool
}

type RoundTripperFunc

type RoundTripperFunc func(req *http.Request) (*http.Response, error)

The RoundTripperFunc type is an adapter to allow the use of ordinary functions as RoundTrippers. If f is a function with the appropriate signature, RoundTripperFunc(f) is a RoundTripper that calls f.

func (RoundTripperFunc) RoundTrip

func (rt RoundTripperFunc) RoundTrip(r *http.Request) (*http.Response, error)

RoundTrip implements the RoundTripper interface.

Jump to

Keyboard shortcuts

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