forked from TrueCloudLab/frostfs-node
[#38] localstore: Finalize object to meta converter
Use CutPayload method of RawObject in order to make object meta structure from source object. Signed-off-by: Leonard Lyubich <leonard@nspcc.ru>
This commit is contained in:
parent
2f57855775
commit
21fc85540a
1 changed files with 1 additions and 7 deletions
|
@ -46,13 +46,7 @@ func metaFromObject(o *object.Object) *ObjectMeta {
|
||||||
meta := new(ObjectMeta)
|
meta := new(ObjectMeta)
|
||||||
meta.savedAtEpoch = 10
|
meta.savedAtEpoch = 10
|
||||||
|
|
||||||
raw := object.NewRaw()
|
meta.head = object.NewRawFromObject(o).CutPayload().Object()
|
||||||
raw.SetID(o.GetID())
|
|
||||||
raw.SetContainerID(o.GetContainerID())
|
|
||||||
raw.SetOwnerID(o.GetOwnerID())
|
|
||||||
// TODO: set other meta fields
|
|
||||||
|
|
||||||
meta.head = raw.Object()
|
|
||||||
|
|
||||||
return meta
|
return meta
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue