From 0f478a9dc6793802695f2fee650b7c041f60d665 Mon Sep 17 00:00:00 2001 From: Pavel Karpy Date: Mon, 7 Jun 2021 13:43:14 +0300 Subject: [PATCH] [#301] pkg/object: Add `MarshalHeaderJSON` method Signed-off-by: Pavel Karpy --- pkg/object/object.go | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/pkg/object/object.go b/pkg/object/object.go index e447be5..55000dc 100644 --- a/pkg/object/object.go +++ b/pkg/object/object.go @@ -37,3 +37,9 @@ func (o *Object) ToV2() *object.Object { return nil } + +// MarshalHeaderJSON marshals object's header +// into JSON format. +func (o *Object) MarshalHeaderJSON() ([]byte, error) { + return (*object.Object)(o.rwObject).GetHeader().MarshalJSON() +}