signer

package
v3.3.4 Latest Latest
Warning

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

Go to latest
Published: Sep 28, 2024 License: MIT Imports: 14 Imported by: 4

Documentation

Index

Constants

This section is empty.

Variables

View Source
var AwsDefaultVars = map[string]interface{}{
	"region":  "us-east-2",
	"service": "sts",
}
View Source
var AwsInternalOnlyVars = map[string]interface{}{
	"aws-id":     struct{}{},
	"aws-secret": struct{}{},
}
View Source
var AwsSkipList = map[string]interface{}{
	"region": struct{}{},
}

Functions

func GetCtxWithArgs

func GetCtxWithArgs(maps ...map[string]interface{}) context.Context

GetCtxWithArgs creates and returns context with signature args

Types

type AWSOptions

type AWSOptions struct {
	AwsID          string
	AwsSecretToken string
	Service        string
	Region         string
}

AWSOptions

func (*AWSOptions) Validate

func (a *AWSOptions) Validate() error

Validate Signature Arguments

type AWSSigner

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

AWS v4 signer

func NewAwsSigner

func NewAwsSigner(opts *AWSOptions) (*AWSSigner, error)

NewAwsSigner

func NewAwsSignerFromConfig

func NewAwsSignerFromConfig(opts *AWSOptions) (*AWSSigner, error)

NewAwsSignerFromConfig

func (*AWSSigner) SignHTTP

func (a *AWSSigner) SignHTTP(ctx context.Context, request *http.Request) error

SignHTTP

type Signer

type Signer interface {
	SignHTTP(ctx context.Context, request *http.Request) error
}

func NewSigner

func NewSigner(args SignerArgs) (signer Signer, err error)

type SignerArg

type SignerArg string

An Argument that can be passed to Signer

type SignerArgs

type SignerArgs interface {
	Validate() error
}

Jump to

Keyboard shortcuts

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