forked from TrueCloudLab/frostfs-api-go
[#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:
parent
d441193952
commit
b9778464b9
4 changed files with 29 additions and 0 deletions
|
@ -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
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue