Documentation ¶
Overview ¶
Package s3post provides a function to sign a S3 POST upload policy
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Post ¶
type Post struct {
// contains filtered or unexported fields
}
Post holds information necessary for signing POST policy documents.
func New ¶
New returns an instance of Post that uses the passed in region and secret. If either is empty, environment variables will be used.
func (*Post) Sign ¶
Sign takes a POST policy and outputs the signed version of the policy as well as a signature to include in the POST form.
Signature is created by the calculation process here: http://docs.aws.amazon.com/AmazonS3/latest/API/sigv4-authentication-HTTPPOST.html
Returns the base64-encoded policy and the hex-encoded and signed policy. If an error occurs two empty strings will be returned.
Directories ¶
Path | Synopsis |
---|---|
examples
|
|
Package policy provides functionlity to create a POST policy for uploading a file directly from a browser to S3.
|
Package policy provides functionlity to create a POST policy for uploading a file directly from a browser to S3. |