Documentation ¶
Overview ¶
Package awsauth implements AWS request signing using Signed Signature Version 2, Signed Signature Version 3, and Signed Signature Version 4. Supports S3 and STS.
Index ¶
- func Sign(request *http.Request, credentials ...Credentials) *http.Request
- func Sign2(request *http.Request, credentials ...Credentials) *http.Request
- func Sign3(request *http.Request, credentials ...Credentials) *http.Request
- func Sign4(request *http.Request, credentials ...Credentials) *http.Request
- func Sign4ForRegion(request *http.Request, region, service string, credentials ...Credentials) *http.Request
- func SignForRegion(request *http.Request, region, service string, credentials ...Credentials) *http.Request
- func SignS3(request *http.Request, credentials ...Credentials) *http.Request
- func SignS3Url(request *http.Request, expire time.Time, credentials ...Credentials) *http.Request
- type Credentials
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func Sign ¶
func Sign(request *http.Request, credentials ...Credentials) *http.Request
Sign signs a request bound for AWS. It automatically chooses the best authentication scheme based on the service the request is going to. It assumes region and service based on segments of request host domain.
func Sign2 ¶
func Sign2(request *http.Request, credentials ...Credentials) *http.Request
Sign2 signs a request with Signed Signature Version 2. If the service you're accessing supports Version 4, use that instead.
func Sign3 ¶
func Sign3(request *http.Request, credentials ...Credentials) *http.Request
Sign3 signs a request with Signed Signature Version 3. If the service you're accessing supports Version 4, use that instead.
func Sign4 ¶
func Sign4(request *http.Request, credentials ...Credentials) *http.Request
Sign4 signs a request with Signed Signature Version 4.
func Sign4ForRegion ¶
func Sign4ForRegion(request *http.Request, region, service string, credentials ...Credentials) *http.Request
Sign4ForRegion signs a request with Signed Signature Version 4, for an explicit region/service.
func SignForRegion ¶
func SignForRegion(request *http.Request, region, service string, credentials ...Credentials) *http.Request
SignForRegion signs a request bound for AWS, for an explicit region/service. If either region or service are empty, it will attempt to determine them from the domain. It automatically chooses the best authentication scheme based on the service the request is going to.
func SignS3 ¶
func SignS3(request *http.Request, credentials ...Credentials) *http.Request
SignS3 signs a request bound for Amazon S3 using their custom HTTP authentication scheme.