mirror of
https://github.com/pgsty/minio.git
synced 2026-07-19 20:20:25 +03:00
Support bucket versioning (#9377)
- Implement a new xl.json 2.0.0 format to support, this moves the entire marshaling logic to POSIX layer, top layer always consumes a common FileInfo construct which simplifies the metadata reads. - Implement list object versions - Migrate to siphash from crchash for new deployments for object placements. Fixes #2111
This commit is contained in:
@@ -160,6 +160,17 @@ type ObjectInfo struct {
|
||||
// Hex encoded unique entity tag of the object.
|
||||
ETag string
|
||||
|
||||
// Version ID of this object.
|
||||
VersionID string
|
||||
|
||||
// IsLatest indicates if this is the latest current version
|
||||
// latest can be true for delete marker or a version.
|
||||
IsLatest bool
|
||||
|
||||
// DeleteMarker indicates if the versionId corresponds
|
||||
// to a delete marker on an object.
|
||||
DeleteMarker bool
|
||||
|
||||
// A standard MIME type describing the format of the object.
|
||||
ContentType string
|
||||
|
||||
@@ -317,6 +328,53 @@ type ListMultipartsInfo struct {
|
||||
EncodingType string // Not supported yet.
|
||||
}
|
||||
|
||||
// DeletedObjectInfo - container for list objects versions deleted objects.
|
||||
type DeletedObjectInfo struct {
|
||||
// Name of the bucket.
|
||||
Bucket string
|
||||
|
||||
// Name of the object.
|
||||
Name string
|
||||
|
||||
// Date and time when the object was last modified.
|
||||
ModTime time.Time
|
||||
|
||||
// Version ID of this object.
|
||||
VersionID string
|
||||
|
||||
// Indicates the deleted marker is latest
|
||||
IsLatest bool
|
||||
}
|
||||
|
||||
// ListObjectVersionsInfo - container for list objects versions.
|
||||
type ListObjectVersionsInfo struct {
|
||||
// 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.
|
||||
IsTruncated bool
|
||||
|
||||
// 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: AWS S3 returns NextMarker only if you have delimiter request parameter specified,
|
||||
// MinIO always returns NextMarker.
|
||||
NextMarker string
|
||||
|
||||
// NextVersionIDMarker may be set of IsTruncated is true
|
||||
NextVersionIDMarker string
|
||||
|
||||
// List of objects info for this request.
|
||||
Objects []ObjectInfo
|
||||
|
||||
// List of deleted objects for this request.
|
||||
DeleteObjects []DeletedObjectInfo
|
||||
|
||||
// List of prefixes for this request.
|
||||
Prefixes []string
|
||||
}
|
||||
|
||||
// ListObjectsInfo - container for list objects.
|
||||
type ListObjectsInfo struct {
|
||||
// Indicates whether the returned list objects response is truncated. A
|
||||
|
||||
Reference in New Issue
Block a user