[#218] pkg/object: Add marshal operations for SplitInfo

Signed-off-by: Alex Vanin <alexey@nspcc.ru>
This commit is contained in:
Alex Vanin 2020-12-02 16:57:06 +03:00
parent 664ebfd8a7
commit b683dbe7e6
3 changed files with 35 additions and 0 deletions

View file

@ -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)
}