Documentation ¶
Index ¶
- Constants
- type ACL
- type Header
- type Object
- type Policy
- type PolicyConditions
- func (c *PolicyConditions) ACL(acl ACL)
- func (c *PolicyConditions) Bucket(bucket string)
- func (c *PolicyConditions) ContentLengthRange(from, to int)
- func (c *PolicyConditions) Equals(cond, match string)
- func (c *PolicyConditions) Redirect(url string)
- func (c *PolicyConditions) StartsWith(cond, match string)
- func (c *PolicyConditions) SuccessActionRedirect(url string)
- type S3
- type Writer
Constants ¶
View Source
const ( MaxObjectSize = 5 * 1024 * 1024 * 1024 * 1024 MinPartSize = 5 * 1024 * 1024 MaxPartSize = 1<<31 - 1 MaxNumParts = 10000 )
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Object ¶
type Object interface { // Key returns the object key. If a path was specified in the S3 configuration // it will be prepended to the key. Key() string // S3 returns the configuration this object is bound to. S3() S3 // Writer returns a new upload io.Writer Writer() Writer // Reader returns a new ReadCloser to read the file Reader() (io.ReadCloser, http.Header, error) // Exists checks if an object with the specified key already exists Exists() (bool, error) // Delete deletes an object Delete() error // Head does a HEAD request and returns the header Head() (Header, error) // ExpiringURL returns a signed, expiring URL for the object ExpiringURL(expiresIn time.Duration) (*url.URL, error) // FormURL returns a signed URL for multipart form uploads FormURL(acl ACL, policy Policy, query ...url.Values) (*url.URL, error) }
type Policy ¶
type Policy policyMap
func (Policy) Conditions ¶
func (p Policy) Conditions() *PolicyConditions
func (Policy) SetExpiration ¶
type PolicyConditions ¶
type PolicyConditions []interface{}
func (*PolicyConditions) ACL ¶
func (c *PolicyConditions) ACL(acl ACL)
func (*PolicyConditions) Bucket ¶
func (c *PolicyConditions) Bucket(bucket string)
func (*PolicyConditions) ContentLengthRange ¶
func (c *PolicyConditions) ContentLengthRange(from, to int)
func (*PolicyConditions) Equals ¶
func (c *PolicyConditions) Equals(cond, match string)
func (*PolicyConditions) Redirect ¶
func (c *PolicyConditions) Redirect(url string)
func (*PolicyConditions) StartsWith ¶
func (c *PolicyConditions) StartsWith(cond, match string)
func (*PolicyConditions) SuccessActionRedirect ¶
func (c *PolicyConditions) SuccessActionRedirect(url string)
type S3 ¶
type S3 struct { // Bucket is the S3 bucket to use Bucket string // AccessKey is the S3 access key AccessKey string // Secret is the S3 secret Secret string // Path is the path to prepend to all keys Path string }
S3 holds the S3 configuration
type Writer ¶
type Writer interface { io.WriteCloser // Abort aborts the current write/upload operation Abort() error }
Click to show internal directories.
Click to hide internal directories.