forked from TrueCloudLab/frostfs-s3-gw
[#122] Add list object versions
Signed-off-by: Denis Kirillov <denis@nspcc.ru>
This commit is contained in:
parent
d5aef7566f
commit
43185de52a
5 changed files with 127 additions and 56 deletions
|
@ -54,9 +54,10 @@ type (
|
|||
|
||||
// ObjectVersionInfo stores info about objects versions.
|
||||
ObjectVersionInfo struct {
|
||||
Object *ObjectInfo
|
||||
IsLatest bool
|
||||
VersionID string
|
||||
Object *ObjectInfo
|
||||
IsLatest bool
|
||||
VersionID string
|
||||
CreationEpoch uint64
|
||||
}
|
||||
|
||||
// DeletedObjectInfo stores info about deleted versions of objects.
|
||||
|
@ -156,7 +157,7 @@ func objectVersionInfoFromMeta(bkt *BucketInfo, meta *object.Object, prefix, del
|
|||
if oi == nil {
|
||||
return nil
|
||||
}
|
||||
return &ObjectVersionInfo{Object: oi, IsLatest: true, VersionID: unversionedObjectVersionID}
|
||||
return &ObjectVersionInfo{Object: oi, VersionID: meta.ID().String(), CreationEpoch: meta.CreationEpoch()}
|
||||
}
|
||||
|
||||
func filenameFromObject(o *object.Object) string {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue