aws

package
v1.7.11 Latest Latest
Warning

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

Go to latest
Published: Apr 29, 2022 License: Apache-2.0 Imports: 13 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func GetHTTPPlugin

func GetHTTPPlugin() http.Plugin

GetHTTPPlugin is required as part of the Secretless plugin spec for HTTP connector plugins. It returns the HTTP plugin.

func NewConnector

func NewConnector(conRes connector.Resources) http.Connector

NewConnector returns an http.Connector that decorates each incoming http request with authorization data.

func PluginInfo

func PluginInfo() map[string]string

PluginInfo is required as part of the Secretless plugin spec. It provides important metadata about the plugin.

Types

type Connector

type Connector struct {
	// contains filtered or unexported fields
}

Connector injects an HTTP request with AWS authorization headers.

func (*Connector) Connect

func (c *Connector) Connect(
	req *gohttp.Request,
	credentialsByID connector.CredentialValuesByID,
) error

Connect is the function that implements the http.Connector func signature. It has access to the client http.Request and the credentials (as a map), and is expected to decorate the request with Authorization headers.

Connect uses the "accessKeyId", "secretAccessKey" and optional "accessToken" credentials to sign the Authorization header, following the AWS signature format.

Jump to

Keyboard shortcuts

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