Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
var ParseV2Error = errs.Class("parse v2")
ParseV2Error is the default error class for V2 parsing errors.
var ParseV2FromHeaderError = errs.Class("header")
ParseV2FromHeaderError is the default error class for V2 parsing header errors.
var ParseV2FromQueryError = errs.Class("query")
ParseV2FromQueryError is the default error class for V2 parsing query errors.
var ParseV4CredentialError = errs.Class("credential")
ParseV4CredentialError is the default error class for V4 parsing credential errors.
var ParseV4Error = errs.Class("parse v4")
ParseV4Error is the default error class for V4 parsing errors.
var ParseV4FromHeaderError = errs.Class("header")
ParseV4FromHeaderError is the default error class for V4 parsing header errors.
var ParseV4FromQueryError = errs.Class("query")
ParseV4FromQueryError is the default error class for V4 parsing query errors.
Functions ¶
This section is empty.
Types ¶
type Checker ¶
Checker implements the Ok interface for validating signatures against a given request and secret.
type Credentials ¶
Credentials are the key and secret associated with this request.
func GetCredentials ¶
func GetCredentials(ctx context.Context) *Credentials
GetCredentials returns the credentials.
type SecretKeyGetter ¶
type SecretKeyGetter interface {
Get(ctx context.Context, accessKeyID string) (secretKey string, err error)
}
SecretKeyGetter returns a secret key from an access key.
type V2 ¶
V2 data
func ParseV2FromHeader ¶
ParseV2FromHeader parses a V2 signature from the request headers.
func ParseV2FromQuery ¶
ParseV2FromQuery parses a V2 signature from the query parameters.
type V4 ¶
type V4 struct { Credential *V4Credential SignedHeaders []string Signature string ContentSHA256 string Date time.Time FromHeader bool }
V4 data
func ParseV4FromHeader ¶
ParseV4FromHeader parses a V4 signature from the request headers.
func ParseV4FromQuery ¶
ParseV4FromQuery parses a V4 signature from the query parameters.
type V4Credential ¶
V4Credential data
func ParseV4Credential ¶
func ParseV4Credential(data string) (*V4Credential, error)
ParseV4Credential parses the credential into it's parts.