forked from TrueCloudLab/frostfs-api-go
[#218] pkg/object: Add marshal operations for SplitInfo
Signed-off-by: Alex Vanin <alexey@nspcc.ru>
This commit is contained in:
parent
664ebfd8a7
commit
b683dbe7e6
3 changed files with 35 additions and 0 deletions
|
@ -47,3 +47,16 @@ func (s *SplitInfo) Link() *ID {
|
|||
func (s *SplitInfo) SetLink(v *ID) {
|
||||
(*object.SplitInfo)(s).SetLink(v.ToV2())
|
||||
}
|
||||
|
||||
func (s *SplitInfo) Marshal(b ...[]byte) ([]byte, error) {
|
||||
var buf []byte
|
||||
if len(b) > 0 {
|
||||
buf = b[0]
|
||||
}
|
||||
|
||||
return (*object.SplitInfo)(s).StableMarshal(buf)
|
||||
}
|
||||
|
||||
func (s *SplitInfo) Unmarshal(data []byte) error {
|
||||
return (*object.SplitInfo)(s).Unmarshal(data)
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue