[#209] pkg/object: Support splitID field in SDK library
Signed-off-by: Alex Vanin <alexey@nspcc.ru>
This commit is contained in:
parent
b9778464b9
commit
6b0bd42f25
3 changed files with 34 additions and 0 deletions
|
@ -251,6 +251,21 @@ func (o *rwObject) setChildren(v ...*ID) {
|
|||
})
|
||||
}
|
||||
|
||||
// SplitID return split identity of split object. If object is not split
|
||||
// returns nil.
|
||||
func (o *rwObject) SplitID() []byte {
|
||||
return (*object.Object)(o).
|
||||
GetHeader().
|
||||
GetSplit().
|
||||
GetSplitID()
|
||||
}
|
||||
|
||||
func (o *rwObject) setSplitID(id []byte) {
|
||||
o.setSplitFields(func(split *object.SplitHeader) {
|
||||
split.SetSplitID(id)
|
||||
})
|
||||
}
|
||||
|
||||
// ParentID returns identifier of the parent object.
|
||||
func (o *rwObject) ParentID() *ID {
|
||||
return NewIDFromV2(
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue