s3auth

package
v0.0.0-...-25342eb Latest Latest
Warning

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

Go to latest
Published: Sep 6, 2016 License: Apache-2.0 Imports: 12 Imported by: 0

Documentation

Index

Constants

View Source
const (
	SignV2Algorithm = "AWS"
	SignV4Algorithm = "AWS4-HMAC-SHA256"
	DateFormat      = "20060102T150405Z"
)

Signature related constants.

Variables

This section is empty.

Functions

This section is empty.

Types

type CredentialsV2

type CredentialsV2 struct {
	AccessKey string
	SecretKey string
	Region    string
}

CredentialsV2 - for signature-V2 calculation

func (CredentialsV2) Sign

func (c CredentialsV2) Sign(method string, encodedResource string, encodedQuery string, headers http.Header) string

Sign - return the Authorization header value.

type CredentialsV4

type CredentialsV4 struct {
	AccessKey string
	SecretKey string
	Region    string
}

CredentialsV4 - S3 creds for AWS S3 Signature V4.

func (CredentialsV4) Sign

func (c CredentialsV4) Sign(method string, encodedResource string, encodedQuery string, headers http.Header) (authHeader string)

Sign - Signa and return Authorization header value.

type Signer

type Signer interface {
	Sign(method string, encodedResource string, encodedQuery string, headers http.Header) string
}

Signer interface for objects implementing Sign methods.

Jump to

Keyboard shortcuts

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