Documentation ¶
Index ¶
- Constants
- Variables
- func CurrentAwsAvailabilityZone() (string, error)
- func CurrentAwsRegion() (string, error)
- func Encode(s string) string
- func ExtractError(b []byte) error
- func ExtractErrorsResponse(b []byte) error
- func ParamsForAction(i interface{}) (url.Values, error)
- func QueryPrefix(version, action string) string
- type Action
- type Client
- func (client *Client) DoSignedRequest(method string, endpoint, action string, extraAttributes map[string]string) (rsp *Response, e error)
- func (client *Client) SignAwsRequest(req *http.Request)
- func (client *Client) SignAwsRequestV2(req *http.Request, t time.Time)
- func (client *Client) SignS3Request(req *http.Request)
- type Error
- type ErrorResponse
- type ErrorsResponse
- type RequestV4
- type Response
- type Version
Constants ¶
View Source
const ( CONTENT_MD5 = "Content-Md5" CONTENT_TYPE = "Content-Type" CONTENT_EXPIRES = "Expires" CONTENT_ACL = "x-amz-acl" ENV_AWS_ACCESS_KEY = "AWS_ACCESS_KEY_ID" ENV_AWS_SECRET_KEY = "AWS_SECRET_ACCESS_KEY" ENV_AWS_DEFAULT_REGION = "AWS_DEFAULT_REGION" )
Variables ¶
View Source
var (
Debug = os.Getenv("DEBUG") == "true"
)
Functions ¶
func CurrentAwsRegion ¶
func ExtractError ¶
func ExtractErrorsResponse ¶
func ParamsForAction ¶
func QueryPrefix ¶
Types ¶
type Client ¶
type Client struct {
Key, Secret, Region, SecurityToken string
}
func NewFromEnv ¶
func NewFromEnv() *Client
func (*Client) DoSignedRequest ¶
func (client *Client) DoSignedRequest(method string, endpoint, action string, extraAttributes map[string]string) (rsp *Response, e error)
list of endpoints
func (*Client) SignAwsRequest ¶
func (*Client) SignAwsRequestV2 ¶
func (*Client) SignS3Request ¶
authentication: http://s3.amazonaws.com/doc/s3-developer-guide/RESTAuthentication.html upload: http://docs.aws.amazon.com/AmazonS3/latest/API/RESTObjectPUT.html
type ErrorResponse ¶
type ErrorsResponse ¶
Source Files ¶
Click to show internal directories.
Click to hide internal directories.