| 
									
										
										
										
											2015-06-26 17:10:47 +08:00
										 |  |  | /* | 
					
						
							| 
									
										
										
										
											2017-01-18 02:02:58 +08:00
										 |  |  |  * Minio Cloud Storage, (C) 2016, 2017 Minio, Inc. | 
					
						
							| 
									
										
										
										
											2015-06-26 17:10:47 +08:00
										 |  |  |  * | 
					
						
							|  |  |  |  * Licensed under the Apache License, Version 2.0 (the "License"); | 
					
						
							|  |  |  |  * you may not use this file except in compliance with the License. | 
					
						
							|  |  |  |  * You may obtain a copy of the License at | 
					
						
							|  |  |  |  * | 
					
						
							|  |  |  |  *     http://www.apache.org/licenses/LICENSE-2.0
 | 
					
						
							|  |  |  |  * | 
					
						
							|  |  |  |  * Unless required by applicable law or agreed to in writing, software | 
					
						
							|  |  |  |  * distributed under the License is distributed on an "AS IS" BASIS, | 
					
						
							|  |  |  |  * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. | 
					
						
							|  |  |  |  * See the License for the specific language governing permissions and | 
					
						
							|  |  |  |  * limitations under the License. | 
					
						
							|  |  |  |  */ | 
					
						
							|  |  |  | 
 | 
					
						
							| 
									
										
										
										
											2016-08-19 07:23:42 +08:00
										 |  |  | package cmd | 
					
						
							| 
									
										
										
										
											2015-06-26 17:10:47 +08:00
										 |  |  | 
 | 
					
						
							| 
									
										
										
										
											2016-04-13 16:00:30 +08:00
										 |  |  | import "time" | 
					
						
							| 
									
										
										
										
											2015-07-04 12:02:31 +08:00
										 |  |  | 
 | 
					
						
							| 
									
										
										
										
											2016-10-06 03:48:07 +08:00
										 |  |  | // BackendType - represents different backend types.
 | 
					
						
							|  |  |  | type BackendType int | 
					
						
							|  |  |  | 
 | 
					
						
							|  |  |  | // Enum for different backend types.
 | 
					
						
							|  |  |  | const ( | 
					
						
							|  |  |  | 	Unknown BackendType = iota | 
					
						
							|  |  |  | 	// Filesystem backend.
 | 
					
						
							|  |  |  | 	FS | 
					
						
							| 
									
										
										
										
											2016-12-21 10:49:48 +08:00
										 |  |  | 	// Multi disk XL (single, distributed) backend.
 | 
					
						
							| 
									
										
										
										
											2016-10-06 03:48:07 +08:00
										 |  |  | 	XL | 
					
						
							|  |  |  | 	// Add your own backend.
 | 
					
						
							|  |  |  | ) | 
					
						
							|  |  |  | 
 | 
					
						
							| 
									
										
										
										
											2016-05-27 05:13:10 +08:00
										 |  |  | // StorageInfo - represents total capacity of underlying storage.
 | 
					
						
							|  |  |  | type StorageInfo struct { | 
					
						
							| 
									
										
										
										
											2016-06-09 21:24:11 +08:00
										 |  |  | 	// Total disk space.
 | 
					
						
							|  |  |  | 	Total int64 | 
					
						
							|  |  |  | 	// Free available disk space.
 | 
					
						
							|  |  |  | 	Free int64 | 
					
						
							| 
									
										
										
										
											2016-10-06 03:48:07 +08:00
										 |  |  | 	// Backend type.
 | 
					
						
							|  |  |  | 	Backend struct { | 
					
						
							|  |  |  | 		// Represents various backend types, currently on FS and XL.
 | 
					
						
							|  |  |  | 		Type BackendType | 
					
						
							|  |  |  | 
 | 
					
						
							|  |  |  | 		// Following fields are only meaningful if BackendType is XL.
 | 
					
						
							|  |  |  | 		OnlineDisks  int // Online disks during server startup.
 | 
					
						
							|  |  |  | 		OfflineDisks int // Offline disks during server startup.
 | 
					
						
							| 
									
										
										
										
											2016-10-10 14:03:10 +08:00
										 |  |  | 		ReadQuorum   int // Minimum disks required for successful read operations.
 | 
					
						
							|  |  |  | 		WriteQuorum  int // Minimum disks required for successful write operations.
 | 
					
						
							| 
									
										
										
										
											2016-10-06 03:48:07 +08:00
										 |  |  | 	} | 
					
						
							| 
									
										
										
										
											2016-05-27 05:13:10 +08:00
										 |  |  | } | 
					
						
							|  |  |  | 
 | 
					
						
							| 
									
										
										
										
											2017-01-20 01:34:18 +08:00
										 |  |  | type healStatus int | 
					
						
							|  |  |  | 
 | 
					
						
							|  |  |  | const ( | 
					
						
							|  |  |  | 	healthy           healStatus = iota // Object is healthy
 | 
					
						
							|  |  |  | 	canHeal                             // Object can be healed
 | 
					
						
							|  |  |  | 	corrupted                           // Object can't be healed
 | 
					
						
							|  |  |  | 	quorumUnavailable                   // Object can't be healed until read quorum is available
 | 
					
						
							|  |  |  | ) | 
					
						
							|  |  |  | 
 | 
					
						
							|  |  |  | // HealBucketInfo - represents healing related information of a bucket.
 | 
					
						
							|  |  |  | type HealBucketInfo struct { | 
					
						
							|  |  |  | 	Status healStatus | 
					
						
							|  |  |  | } | 
					
						
							|  |  |  | 
 | 
					
						
							| 
									
										
										
										
											2016-06-09 21:24:11 +08:00
										 |  |  | // BucketInfo - represents bucket metadata.
 | 
					
						
							| 
									
										
										
											
												objectAPI: Fix object API interface, remove unnecessary structs.
ObjectAPI changes.
```
ListObjects(bucket, prefix, marker, delimiter string, maxKeys int) (ListObjectsInfo, *probe.Error)
ListMultipartUploads(bucket, objectPrefix, keyMarker, uploadIDMarker, delimiter string, maxUploads int) (ListMultipartsInfo, *probe.Error)
ListObjectParts(bucket, object, uploadID string, partNumberMarker, maxParts int) (ListPartsInfo, *probe.Error)
CompleteMultipartUpload(bucket string, object string, uploadID string, parts []completePart) (ObjectInfo, *probe.Error)
```
											
										 
											2016-04-03 16:34:20 +08:00
										 |  |  | type BucketInfo struct { | 
					
						
							| 
									
										
										
										
											2016-06-09 21:24:11 +08:00
										 |  |  | 	// Name of the bucket.
 | 
					
						
							|  |  |  | 	Name string | 
					
						
							|  |  |  | 
 | 
					
						
							|  |  |  | 	// Date and time when the bucket was created.
 | 
					
						
							| 
									
										
										
											
												objectAPI: Fix object API interface, remove unnecessary structs.
ObjectAPI changes.
```
ListObjects(bucket, prefix, marker, delimiter string, maxKeys int) (ListObjectsInfo, *probe.Error)
ListMultipartUploads(bucket, objectPrefix, keyMarker, uploadIDMarker, delimiter string, maxUploads int) (ListMultipartsInfo, *probe.Error)
ListObjectParts(bucket, object, uploadID string, partNumberMarker, maxParts int) (ListPartsInfo, *probe.Error)
CompleteMultipartUpload(bucket string, object string, uploadID string, parts []completePart) (ObjectInfo, *probe.Error)
```
											
										 
											2016-04-03 16:34:20 +08:00
										 |  |  | 	Created time.Time | 
					
						
							| 
									
										
										
										
											2017-01-18 02:02:58 +08:00
										 |  |  | 
 | 
					
						
							| 
									
										
										
										
											2017-01-20 01:34:18 +08:00
										 |  |  | 	// Healing information
 | 
					
						
							|  |  |  | 	HealBucketInfo *HealBucketInfo `xml:"HealBucketInfo,omitempty"` | 
					
						
							|  |  |  | } | 
					
						
							| 
									
										
										
										
											2017-01-18 02:02:58 +08:00
										 |  |  | 
 | 
					
						
							| 
									
										
										
										
											2017-01-20 01:34:18 +08:00
										 |  |  | // HealObjectInfo - represents healing related information of an object.
 | 
					
						
							|  |  |  | type HealObjectInfo struct { | 
					
						
							| 
									
										
										
										
											2017-01-18 02:02:58 +08:00
										 |  |  | 	Status              healStatus | 
					
						
							|  |  |  | 	MissingDataCount    int | 
					
						
							|  |  |  | 	MissingPartityCount int | 
					
						
							|  |  |  | } | 
					
						
							|  |  |  | 
 | 
					
						
							| 
									
										
										
										
											2016-06-09 21:24:11 +08:00
										 |  |  | // ObjectInfo - represents object metadata.
 | 
					
						
							| 
									
										
										
											
												objectAPI: Fix object API interface, remove unnecessary structs.
ObjectAPI changes.
```
ListObjects(bucket, prefix, marker, delimiter string, maxKeys int) (ListObjectsInfo, *probe.Error)
ListMultipartUploads(bucket, objectPrefix, keyMarker, uploadIDMarker, delimiter string, maxUploads int) (ListMultipartsInfo, *probe.Error)
ListObjectParts(bucket, object, uploadID string, partNumberMarker, maxParts int) (ListPartsInfo, *probe.Error)
CompleteMultipartUpload(bucket string, object string, uploadID string, parts []completePart) (ObjectInfo, *probe.Error)
```
											
										 
											2016-04-03 16:34:20 +08:00
										 |  |  | type ObjectInfo struct { | 
					
						
							| 
									
										
										
										
											2016-06-09 21:24:11 +08:00
										 |  |  | 	// Name of the bucket.
 | 
					
						
							|  |  |  | 	Bucket string | 
					
						
							|  |  |  | 
 | 
					
						
							|  |  |  | 	// Name of the object.
 | 
					
						
							|  |  |  | 	Name string | 
					
						
							|  |  |  | 
 | 
					
						
							|  |  |  | 	// Date and time when the object was last modified.
 | 
					
						
							|  |  |  | 	ModTime time.Time | 
					
						
							|  |  |  | 
 | 
					
						
							|  |  |  | 	// Total object size.
 | 
					
						
							|  |  |  | 	Size int64 | 
					
						
							|  |  |  | 
 | 
					
						
							|  |  |  | 	// IsDir indicates if the object is prefix.
 | 
					
						
							|  |  |  | 	IsDir bool | 
					
						
							|  |  |  | 
 | 
					
						
							|  |  |  | 	// Hex encoded md5 checksum of the object.
 | 
					
						
							|  |  |  | 	MD5Sum string | 
					
						
							|  |  |  | 
 | 
					
						
							|  |  |  | 	// A standard MIME type describing the format of the object.
 | 
					
						
							|  |  |  | 	ContentType string | 
					
						
							|  |  |  | 
 | 
					
						
							|  |  |  | 	// Specifies what content encodings have been applied to the object and thus
 | 
					
						
							|  |  |  | 	// what decoding mechanisms must be applied to obtain the object referenced
 | 
					
						
							|  |  |  | 	// by the Content-Type header field.
 | 
					
						
							| 
									
										
										
										
											2016-05-20 08:10:08 +08:00
										 |  |  | 	ContentEncoding string | 
					
						
							| 
									
										
										
										
											2016-07-13 03:45:17 +08:00
										 |  |  | 
 | 
					
						
							|  |  |  | 	// User-Defined metadata
 | 
					
						
							| 
									
										
										
										
											2017-01-20 01:34:18 +08:00
										 |  |  | 	UserDefined    map[string]string | 
					
						
							|  |  |  | 	HealObjectInfo *HealObjectInfo `xml:"HealObjectInfo,omitempty"` | 
					
						
							| 
									
										
										
										
											2015-07-04 12:02:31 +08:00
										 |  |  | } | 
					
						
							|  |  |  | 
 | 
					
						
							| 
									
										
										
										
											2016-06-09 21:24:11 +08:00
										 |  |  | // ListPartsInfo - represents list of all parts.
 | 
					
						
							| 
									
										
										
											
												objectAPI: Fix object API interface, remove unnecessary structs.
ObjectAPI changes.
```
ListObjects(bucket, prefix, marker, delimiter string, maxKeys int) (ListObjectsInfo, *probe.Error)
ListMultipartUploads(bucket, objectPrefix, keyMarker, uploadIDMarker, delimiter string, maxUploads int) (ListMultipartsInfo, *probe.Error)
ListObjectParts(bucket, object, uploadID string, partNumberMarker, maxParts int) (ListPartsInfo, *probe.Error)
CompleteMultipartUpload(bucket string, object string, uploadID string, parts []completePart) (ObjectInfo, *probe.Error)
```
											
										 
											2016-04-03 16:34:20 +08:00
										 |  |  | type ListPartsInfo struct { | 
					
						
							| 
									
										
										
										
											2016-06-09 21:24:11 +08:00
										 |  |  | 	// Name of the bucket.
 | 
					
						
							|  |  |  | 	Bucket string | 
					
						
							|  |  |  | 
 | 
					
						
							|  |  |  | 	// Name of the object.
 | 
					
						
							|  |  |  | 	Object string | 
					
						
							|  |  |  | 
 | 
					
						
							|  |  |  | 	// Upload ID identifying the multipart upload whose parts are being listed.
 | 
					
						
							|  |  |  | 	UploadID string | 
					
						
							|  |  |  | 
 | 
					
						
							|  |  |  | 	// The class of storage used to store the object.
 | 
					
						
							|  |  |  | 	StorageClass string | 
					
						
							|  |  |  | 
 | 
					
						
							|  |  |  | 	// Part number after which listing begins.
 | 
					
						
							|  |  |  | 	PartNumberMarker int | 
					
						
							|  |  |  | 
 | 
					
						
							|  |  |  | 	// When a list is truncated, this element specifies the last part in the list,
 | 
					
						
							|  |  |  | 	// as well as the value to use for the part-number-marker request parameter
 | 
					
						
							|  |  |  | 	// in a subsequent request.
 | 
					
						
							| 
									
										
										
										
											2015-07-04 12:02:31 +08:00
										 |  |  | 	NextPartNumberMarker int | 
					
						
							|  |  |  | 
 | 
					
						
							| 
									
										
										
										
											2016-06-09 21:24:11 +08:00
										 |  |  | 	// Maximum number of parts that were allowed in the response.
 | 
					
						
							|  |  |  | 	MaxParts int | 
					
						
							|  |  |  | 
 | 
					
						
							|  |  |  | 	// Indicates whether the returned list of parts is truncated.
 | 
					
						
							|  |  |  | 	IsTruncated bool | 
					
						
							|  |  |  | 
 | 
					
						
							|  |  |  | 	// List of all parts.
 | 
					
						
							|  |  |  | 	Parts []partInfo | 
					
						
							|  |  |  | 
 | 
					
						
							|  |  |  | 	EncodingType string // Not supported yet.
 | 
					
						
							| 
									
										
										
										
											2015-07-04 12:02:31 +08:00
										 |  |  | } | 
					
						
							|  |  |  | 
 | 
					
						
							| 
									
										
										
										
											2016-06-09 21:24:11 +08:00
										 |  |  | // ListMultipartsInfo - represnets bucket resources for incomplete multipart uploads.
 | 
					
						
							| 
									
										
										
											
												objectAPI: Fix object API interface, remove unnecessary structs.
ObjectAPI changes.
```
ListObjects(bucket, prefix, marker, delimiter string, maxKeys int) (ListObjectsInfo, *probe.Error)
ListMultipartUploads(bucket, objectPrefix, keyMarker, uploadIDMarker, delimiter string, maxUploads int) (ListMultipartsInfo, *probe.Error)
ListObjectParts(bucket, object, uploadID string, partNumberMarker, maxParts int) (ListPartsInfo, *probe.Error)
CompleteMultipartUpload(bucket string, object string, uploadID string, parts []completePart) (ObjectInfo, *probe.Error)
```
											
										 
											2016-04-03 16:34:20 +08:00
										 |  |  | type ListMultipartsInfo struct { | 
					
						
							| 
									
										
										
										
											2016-06-09 21:24:11 +08:00
										 |  |  | 	// Together with upload-id-marker, this parameter specifies the multipart upload
 | 
					
						
							|  |  |  | 	// after which listing should begin.
 | 
					
						
							|  |  |  | 	KeyMarker string | 
					
						
							|  |  |  | 
 | 
					
						
							|  |  |  | 	// Together with key-marker, specifies the multipart upload after which listing
 | 
					
						
							|  |  |  | 	// should begin. If key-marker is not specified, the upload-id-marker parameter
 | 
					
						
							|  |  |  | 	// is ignored.
 | 
					
						
							|  |  |  | 	UploadIDMarker string | 
					
						
							|  |  |  | 
 | 
					
						
							|  |  |  | 	// When a list is truncated, this element specifies the value that should be
 | 
					
						
							|  |  |  | 	// used for the key-marker request parameter in a subsequent request.
 | 
					
						
							|  |  |  | 	NextKeyMarker string | 
					
						
							|  |  |  | 
 | 
					
						
							|  |  |  | 	// When a list is truncated, this element specifies the value that should be
 | 
					
						
							|  |  |  | 	// used for the upload-id-marker request parameter in a subsequent request.
 | 
					
						
							| 
									
										
										
										
											2015-07-04 12:02:31 +08:00
										 |  |  | 	NextUploadIDMarker string | 
					
						
							| 
									
										
										
										
											2016-06-09 21:24:11 +08:00
										 |  |  | 
 | 
					
						
							|  |  |  | 	// Maximum number of multipart uploads that could have been included in the
 | 
					
						
							|  |  |  | 	// response.
 | 
					
						
							|  |  |  | 	MaxUploads int | 
					
						
							|  |  |  | 
 | 
					
						
							|  |  |  | 	// Indicates whether the returned list of multipart uploads is truncated. A
 | 
					
						
							|  |  |  | 	// value of true indicates that the list was truncated. The list can be truncated
 | 
					
						
							|  |  |  | 	// if the number of multipart uploads exceeds the limit allowed or specified
 | 
					
						
							|  |  |  | 	// by max uploads.
 | 
					
						
							|  |  |  | 	IsTruncated bool | 
					
						
							|  |  |  | 
 | 
					
						
							|  |  |  | 	// List of all pending uploads.
 | 
					
						
							|  |  |  | 	Uploads []uploadMetadata | 
					
						
							|  |  |  | 
 | 
					
						
							|  |  |  | 	// When a prefix is provided in the request, The result contains only keys
 | 
					
						
							|  |  |  | 	// starting with the specified prefix.
 | 
					
						
							|  |  |  | 	Prefix string | 
					
						
							|  |  |  | 
 | 
					
						
							|  |  |  | 	// A character used to truncate the object prefixes.
 | 
					
						
							|  |  |  | 	// NOTE: only supported delimiter is '/'.
 | 
					
						
							|  |  |  | 	Delimiter string | 
					
						
							|  |  |  | 
 | 
					
						
							|  |  |  | 	// CommonPrefixes contains all (if there are any) keys between Prefix and the
 | 
					
						
							|  |  |  | 	// next occurrence of the string specified by delimiter.
 | 
					
						
							|  |  |  | 	CommonPrefixes []string | 
					
						
							|  |  |  | 
 | 
					
						
							|  |  |  | 	EncodingType string // Not supported yet.
 | 
					
						
							| 
									
										
										
										
											2015-07-04 12:02:31 +08:00
										 |  |  | } | 
					
						
							|  |  |  | 
 | 
					
						
							| 
									
										
										
											
												objectAPI: Fix object API interface, remove unnecessary structs.
ObjectAPI changes.
```
ListObjects(bucket, prefix, marker, delimiter string, maxKeys int) (ListObjectsInfo, *probe.Error)
ListMultipartUploads(bucket, objectPrefix, keyMarker, uploadIDMarker, delimiter string, maxUploads int) (ListMultipartsInfo, *probe.Error)
ListObjectParts(bucket, object, uploadID string, partNumberMarker, maxParts int) (ListPartsInfo, *probe.Error)
CompleteMultipartUpload(bucket string, object string, uploadID string, parts []completePart) (ObjectInfo, *probe.Error)
```
											
										 
											2016-04-03 16:34:20 +08:00
										 |  |  | // ListObjectsInfo - container for list objects.
 | 
					
						
							|  |  |  | type ListObjectsInfo struct { | 
					
						
							| 
									
										
										
										
											2016-06-09 21:24:11 +08:00
										 |  |  | 	// Indicates whether the returned list objects response is truncated. A
 | 
					
						
							|  |  |  | 	// value of true indicates that the list was truncated. The list can be truncated
 | 
					
						
							|  |  |  | 	// if the number of objects exceeds the limit allowed or specified
 | 
					
						
							|  |  |  | 	// by max keys.
 | 
					
						
							| 
									
										
										
										
											2016-01-20 09:49:48 +08:00
										 |  |  | 	IsTruncated bool | 
					
						
							| 
									
										
										
										
											2016-06-09 21:24:11 +08:00
										 |  |  | 
 | 
					
						
							|  |  |  | 	// 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.
 | 
					
						
							|  |  |  | 	//
 | 
					
						
							|  |  |  | 	// NOTE: This element is returned only if you have delimiter request parameter
 | 
					
						
							|  |  |  | 	// specified.
 | 
					
						
							|  |  |  | 	NextMarker string | 
					
						
							|  |  |  | 
 | 
					
						
							|  |  |  | 	// List of objects info for this request.
 | 
					
						
							|  |  |  | 	Objects []ObjectInfo | 
					
						
							|  |  |  | 
 | 
					
						
							|  |  |  | 	// List of prefixes for this request.
 | 
					
						
							|  |  |  | 	Prefixes []string | 
					
						
							| 
									
										
										
										
											2016-01-20 09:49:48 +08:00
										 |  |  | } | 
					
						
							|  |  |  | 
 | 
					
						
							| 
									
										
										
										
											2016-06-09 21:24:11 +08:00
										 |  |  | // partInfo - represents individual part metadata.
 | 
					
						
							| 
									
										
										
											
												objectAPI: Fix object API interface, remove unnecessary structs.
ObjectAPI changes.
```
ListObjects(bucket, prefix, marker, delimiter string, maxKeys int) (ListObjectsInfo, *probe.Error)
ListMultipartUploads(bucket, objectPrefix, keyMarker, uploadIDMarker, delimiter string, maxUploads int) (ListMultipartsInfo, *probe.Error)
ListObjectParts(bucket, object, uploadID string, partNumberMarker, maxParts int) (ListPartsInfo, *probe.Error)
CompleteMultipartUpload(bucket string, object string, uploadID string, parts []completePart) (ObjectInfo, *probe.Error)
```
											
										 
											2016-04-03 16:34:20 +08:00
										 |  |  | type partInfo struct { | 
					
						
							| 
									
										
										
										
											2016-06-09 21:24:11 +08:00
										 |  |  | 	// Part number that identifies the part. This is a positive integer between
 | 
					
						
							|  |  |  | 	// 1 and 10,000.
 | 
					
						
							|  |  |  | 	PartNumber int | 
					
						
							|  |  |  | 
 | 
					
						
							|  |  |  | 	// Date and time at which the part was uploaded.
 | 
					
						
							| 
									
										
										
											
												objectAPI: Fix object API interface, remove unnecessary structs.
ObjectAPI changes.
```
ListObjects(bucket, prefix, marker, delimiter string, maxKeys int) (ListObjectsInfo, *probe.Error)
ListMultipartUploads(bucket, objectPrefix, keyMarker, uploadIDMarker, delimiter string, maxUploads int) (ListMultipartsInfo, *probe.Error)
ListObjectParts(bucket, object, uploadID string, partNumberMarker, maxParts int) (ListPartsInfo, *probe.Error)
CompleteMultipartUpload(bucket string, object string, uploadID string, parts []completePart) (ObjectInfo, *probe.Error)
```
											
										 
											2016-04-03 16:34:20 +08:00
										 |  |  | 	LastModified time.Time | 
					
						
							| 
									
										
										
										
											2016-06-09 21:24:11 +08:00
										 |  |  | 
 | 
					
						
							|  |  |  | 	// Entity tag returned when the part was initially uploaded.
 | 
					
						
							|  |  |  | 	ETag string | 
					
						
							|  |  |  | 
 | 
					
						
							|  |  |  | 	// Size in bytes of the part.
 | 
					
						
							|  |  |  | 	Size int64 | 
					
						
							| 
									
										
										
											
												objectAPI: Fix object API interface, remove unnecessary structs.
ObjectAPI changes.
```
ListObjects(bucket, prefix, marker, delimiter string, maxKeys int) (ListObjectsInfo, *probe.Error)
ListMultipartUploads(bucket, objectPrefix, keyMarker, uploadIDMarker, delimiter string, maxUploads int) (ListMultipartsInfo, *probe.Error)
ListObjectParts(bucket, object, uploadID string, partNumberMarker, maxParts int) (ListPartsInfo, *probe.Error)
CompleteMultipartUpload(bucket string, object string, uploadID string, parts []completePart) (ObjectInfo, *probe.Error)
```
											
										 
											2016-04-03 16:34:20 +08:00
										 |  |  | } | 
					
						
							|  |  |  | 
 | 
					
						
							| 
									
										
										
										
											2016-06-09 21:24:11 +08:00
										 |  |  | // uploadMetadata - represents metadata in progress multipart upload.
 | 
					
						
							| 
									
										
										
											
												objectAPI: Fix object API interface, remove unnecessary structs.
ObjectAPI changes.
```
ListObjects(bucket, prefix, marker, delimiter string, maxKeys int) (ListObjectsInfo, *probe.Error)
ListMultipartUploads(bucket, objectPrefix, keyMarker, uploadIDMarker, delimiter string, maxUploads int) (ListMultipartsInfo, *probe.Error)
ListObjectParts(bucket, object, uploadID string, partNumberMarker, maxParts int) (ListPartsInfo, *probe.Error)
CompleteMultipartUpload(bucket string, object string, uploadID string, parts []completePart) (ObjectInfo, *probe.Error)
```
											
										 
											2016-04-03 16:34:20 +08:00
										 |  |  | type uploadMetadata struct { | 
					
						
							| 
									
										
										
										
											2016-06-09 21:24:11 +08:00
										 |  |  | 	// Object name for which the multipart upload was initiated.
 | 
					
						
							|  |  |  | 	Object string | 
					
						
							|  |  |  | 
 | 
					
						
							|  |  |  | 	// Unique identifier for this multipart upload.
 | 
					
						
							|  |  |  | 	UploadID string | 
					
						
							|  |  |  | 
 | 
					
						
							|  |  |  | 	// Date and time at which the multipart upload was initiated.
 | 
					
						
							|  |  |  | 	Initiated time.Time | 
					
						
							|  |  |  | 
 | 
					
						
							|  |  |  | 	StorageClass string // Not supported yet.
 | 
					
						
							| 
									
										
										
											
												objectAPI: Fix object API interface, remove unnecessary structs.
ObjectAPI changes.
```
ListObjects(bucket, prefix, marker, delimiter string, maxKeys int) (ListObjectsInfo, *probe.Error)
ListMultipartUploads(bucket, objectPrefix, keyMarker, uploadIDMarker, delimiter string, maxUploads int) (ListMultipartsInfo, *probe.Error)
ListObjectParts(bucket, object, uploadID string, partNumberMarker, maxParts int) (ListPartsInfo, *probe.Error)
CompleteMultipartUpload(bucket string, object string, uploadID string, parts []completePart) (ObjectInfo, *probe.Error)
```
											
										 
											2016-04-03 16:34:20 +08:00
										 |  |  | } | 
					
						
							|  |  |  | 
 | 
					
						
							|  |  |  | // completePart - completed part container.
 | 
					
						
							|  |  |  | type completePart struct { | 
					
						
							| 
									
										
										
										
											2016-06-09 21:24:11 +08:00
										 |  |  | 	// Part number identifying the part. This is a positive integer between 1 and
 | 
					
						
							|  |  |  | 	// 10,000
 | 
					
						
							| 
									
										
										
										
											2015-10-17 02:26:01 +08:00
										 |  |  | 	PartNumber int | 
					
						
							| 
									
										
										
										
											2016-06-09 21:24:11 +08:00
										 |  |  | 
 | 
					
						
							|  |  |  | 	// Entity tag returned when the part was uploaded.
 | 
					
						
							|  |  |  | 	ETag string | 
					
						
							| 
									
										
										
										
											2015-10-17 02:26:01 +08:00
										 |  |  | } | 
					
						
							|  |  |  | 
 | 
					
						
							| 
									
										
										
										
											2016-06-09 21:24:11 +08:00
										 |  |  | // completedParts - is a collection satisfying sort.Interface.
 | 
					
						
							| 
									
										
										
											
												objectAPI: Fix object API interface, remove unnecessary structs.
ObjectAPI changes.
```
ListObjects(bucket, prefix, marker, delimiter string, maxKeys int) (ListObjectsInfo, *probe.Error)
ListMultipartUploads(bucket, objectPrefix, keyMarker, uploadIDMarker, delimiter string, maxUploads int) (ListMultipartsInfo, *probe.Error)
ListObjectParts(bucket, object, uploadID string, partNumberMarker, maxParts int) (ListPartsInfo, *probe.Error)
CompleteMultipartUpload(bucket string, object string, uploadID string, parts []completePart) (ObjectInfo, *probe.Error)
```
											
										 
											2016-04-03 16:34:20 +08:00
										 |  |  | type completedParts []completePart | 
					
						
							| 
									
										
										
										
											2015-10-17 02:26:01 +08:00
										 |  |  | 
 | 
					
						
							|  |  |  | func (a completedParts) Len() int           { return len(a) } | 
					
						
							|  |  |  | func (a completedParts) Swap(i, j int)      { a[i], a[j] = a[j], a[i] } | 
					
						
							|  |  |  | func (a completedParts) Less(i, j int) bool { return a[i].PartNumber < a[j].PartNumber } | 
					
						
							|  |  |  | 
 | 
					
						
							| 
									
										
										
										
											2016-06-09 21:24:11 +08:00
										 |  |  | // completeMultipartUpload - represents input fields for completing multipart upload.
 | 
					
						
							| 
									
										
										
											
												objectAPI: Fix object API interface, remove unnecessary structs.
ObjectAPI changes.
```
ListObjects(bucket, prefix, marker, delimiter string, maxKeys int) (ListObjectsInfo, *probe.Error)
ListMultipartUploads(bucket, objectPrefix, keyMarker, uploadIDMarker, delimiter string, maxUploads int) (ListMultipartsInfo, *probe.Error)
ListObjectParts(bucket, object, uploadID string, partNumberMarker, maxParts int) (ListPartsInfo, *probe.Error)
CompleteMultipartUpload(bucket string, object string, uploadID string, parts []completePart) (ObjectInfo, *probe.Error)
```
											
										 
											2016-04-03 16:34:20 +08:00
										 |  |  | type completeMultipartUpload struct { | 
					
						
							| 
									
										
										
										
											2016-04-13 16:00:30 +08:00
										 |  |  | 	Parts []completePart `xml:"Part"` | 
					
						
							| 
									
										
										
										
											2015-10-17 02:26:01 +08:00
										 |  |  | } |