[#209] v2/object: Add splitID to unified structure

* Add getters/setters
* Support stable marshaling
* Support converters

Signed-off-by: Alex Vanin <alexey@nspcc.ru>
This commit is contained in:
Alex Vanin 2020-11-24 20:14:03 +03:00 committed by Alex Vanin
parent d441193952
commit b9778464b9
4 changed files with 29 additions and 0 deletions

View file

@ -33,6 +33,8 @@ type SplitHeader struct {
parHdr *Header
children []*refs.ObjectID
splitID []byte
}
type Header struct {
@ -380,6 +382,20 @@ func (h *SplitHeader) SetChildren(v []*refs.ObjectID) {
}
}
func (h *SplitHeader) GetSplitID() []byte {
if h != nil {
return h.splitID
}
return nil
}
func (h *SplitHeader) SetSplitID(v []byte) {
if h != nil {
h.splitID = v
}
}
func (h *Header) GetVersion() *refs.Version {
if h != nil {
return h.version