Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Config ¶
type Config struct { // Bucket is the bucket name. Bucket string // Key is the key in s3 bucket. // One of Key or Source must be specified Key string // Source is the local file path. Used only by Write. Source string // Prefix is added to the Key attribute and used as final S3 // bucket key. Prefix string // Content of the file. Used only by Write. Content io.ReadSeeker // ContentType is the content-type of file. ContentType string // MaxSize is the maximum size of Read or Write operation. MaxSize int64 // VersionID is the version of S3 object. Used only // by Read. VersionID string // Region is the AWS region of the bucket. // File URL is constructed only if Region sepcified. Region string }
Config represents the input configuration for file S3 file Read and Write functions.
type File ¶
type File struct { // Bucket is the bucket of file. Bucket string // Key is the key of object in bucket. Key string // VersionID is the version of s3 object. VersionID string // Hash is the md5 of content in hex representation. Hash string // Body is the content of object. Set by Read function. Body io.ReadCloser // ContentType is the content-type header of s3 object. ContentType string // Region is the region of bucket. Region string // URL is the https URL of the file. // Example: https://s3.eu-central-1.amazonaws.com/mybucket/mykey URL string }
File represents S3 Object
Click to show internal directories.
Click to hide internal directories.