Documentation
¶
Index ¶
- type BucketInfo
- type CommonPrefix
- type CopyRequestData
- type GetRequestData
- type ListBucketResult
- type ListMultipartUploadsResult
- type ListObjectPartsResult
- type MultipartObjectInfo
- type MultipartObjectPart
- type MultipartRequestData
- type ObjectInfo
- type ObjectInfoOwner
- type PutMeta
- type PutRequestData
- type ReadMeta
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type BucketInfo ¶
type BucketInfo struct {
// The name of the bucket.
Name string
// Date the bucket was created.
CreationDate time.Time
}
BucketInfo container for bucket metadata.
type CommonPrefix ¶
type CommonPrefix struct {
Prefix string
}
CommonPrefix is used as virtual folders in object storage
type CopyRequestData ¶
CopyRequestData can provide specific metadata, notably a version Id
type GetRequestData ¶
GetRequestData passes optional Range instructions for reading file data
type ListBucketResult ¶
type ListBucketResult struct {
// A response can contain CommonPrefixes only if you have
// specified a delimiter.
CommonPrefixes []CommonPrefix
// Metadata about each object returned.
Contents []ObjectInfo
Delimiter string
// Encoding type used to encode object keys in the response.
EncodingType string
// A flag that indicates whether or not ListObjects returned all of the results
// that satisfied the search criteria.
IsTruncated bool
Marker string
MaxKeys int64
Name string
// When response is truncated (the IsTruncated element value in
// the response is true), you can use the key name in this field
// as marker in the subsequent request to get next set of objects.
// Object storage lists objects in alphabetical order Note: This
// element is returned only if you have delimiter request
// parameter specified. If response does not include the NextMaker
// and it is truncated, you can use the value of the last Key in
// the response as the marker in the subsequent request to get the
// next set of object keys.
NextMarker string
Prefix string
}
ListBucketResult container for listObjects response.
type ListMultipartUploadsResult ¶
type ListMultipartUploadsResult struct {
Bucket string
KeyMarker string
UploadIDMarker string `xml:"UploadIdMarker"`
NextKeyMarker string
NextUploadIDMarker string `xml:"NextUploadIdMarker"`
EncodingType string
MaxUploads int64
IsTruncated bool
Uploads []MultipartObjectInfo `xml:"Upload"`
Prefix string
Delimiter string
// A response can contain CommonPrefixes only if you specify a delimiter.
CommonPrefixes []CommonPrefix
}
ListMultipartUploadsResult container for ListMultipartUploads response
type ListObjectPartsResult ¶
type ListObjectPartsResult struct {
Bucket string
Key string
UploadID string `xml:"UploadId"`
Initiator struct {
ID string
DisplayName string
}
Owner struct {
DisplayName string
ID string
}
StorageClass string
PartNumberMarker int
NextPartNumberMarker int
MaxParts int
// Indicates whether the returned list of parts is truncated.
IsTruncated bool
ObjectParts []MultipartObjectPart `xml:"Part"`
EncodingType string
}
ListObjectPartsResult container for ListObjectParts response.
type MultipartObjectInfo ¶
type MultipartObjectInfo struct {
// Date and time at which the multipart upload was initiated.
Initiated time.Time `type:"timestamp" timestampFormat:"iso8601"`
Initiator struct {
ID string
DisplayName string
}
Owner struct {
DisplayName string
ID string
}
// The type of storage to use for the object. Defaults to 'STANDARD'.
StorageClass string
// Key of the object for which the multipart upload was initiated.
Key string
// Size in bytes of the object.
Size int64
// Upload ID that identifies the multipart upload.
UploadID string `xml:"UploadId"`
// Error
Err error
}
MultipartObjectInfo container for multipart object metadata.
type MultipartObjectPart ¶
type MultipartObjectPart struct {
// Part number identifies the part.
PartNumber int
// Date and time the part was uploaded.
LastModified time.Time
// Entity tag returned when the part was uploaded, usually md5sum
// of the part.
ETag string
// Size of the uploaded part data.
Size int64
}
MultipartObjectPart container for particular part of an object. Can be used as CompletePart as well
type MultipartRequestData ¶
type MultipartRequestData struct {
Metadata map[string]string
ListKeyMarker string
ListUploadIDMarker string
ListDelimiter string
ListMaxUploads int
}
MultipartRequestData is a metadata container for Multipart List Requests
type ObjectInfo ¶
type ObjectInfo struct {
// An ETag is optionally set to md5sum of an object. In case of multipart objects,
// ETag is of the form MD5SUM-N where MD5SUM is md5sum of all individual md5sums of
// each parts concatenated into one string.
ETag string `json:"etag"`
Key string `json:"name"` // Name of the object
LastModified time.Time `json:"lastModified"` // Date and time the object was last modified.
Size int64 `json:"size"` // Size in bytes of the object.
ContentType string `json:"contentType"` // A standard MIME type describing the format of the object data.
// Collection of additional metadata on the object.
// eg: x-amz-meta-*, content-encoding etc.
Metadata http.Header `json:"metadata" xml:"-"`
// Owner name.
Owner *ObjectInfoOwner
// The class of storage used to store the object.
StorageClass string `json:"storageClass"`
// Error
Err error `json:"-"`
}
ObjectInfo container for object metadata.
type ObjectInfoOwner ¶
type PutMeta ¶
type PutMeta struct {
UserMetadata map[string]string
Progress io.Reader
ContentType string
ContentEncoding string
ContentDisposition string
ContentLanguage string
CacheControl string
NumThreads uint
StorageClass string
WebsiteRedirectLocation string
}
PutMeta represents options specified by user for PutObject call
type PutRequestData ¶
type PutRequestData struct {
Size int64
Md5Sum []byte
Sha256Sum []byte
Metadata map[string]string
MultipartUploadID string
MultipartPartID int
}
PutRequestData passes content-specific information during uploads
func (*PutRequestData) ContentTypeUnknown ¶
func (p *PutRequestData) ContentTypeUnknown() bool
ContentTypeUnknown checks if cType is empty or generic "application/octet-stream"
func (*PutRequestData) MetaContentType ¶
func (p *PutRequestData) MetaContentType() string
MetaContentType looks for Content-Type or content-type key in metadata