From d3349a293a9e72df0c8ee0cb651232fd59a6c053 Mon Sep 17 00:00:00 2001 From: Leonard Lyubich Date: Mon, 21 Sep 2020 17:25:03 +0300 Subject: [PATCH] [#33] core/object: Add to-SDK object converting method Signed-off-by: Leonard Lyubich --- pkg/core/object/object.go | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/pkg/core/object/object.go b/pkg/core/object/object.go index 032db35c..66ca0749 100644 --- a/pkg/core/object/object.go +++ b/pkg/core/object/object.go @@ -28,6 +28,15 @@ func (o *Object) Address() *object.Address { return nil } +// SDK returns NeoFS SDK object instance. +func (o *Object) SDK() *object.Object { + if o != nil { + return o.Object + } + + return nil +} + // NewFromV2 constructs Object instance from v2 Object message. func NewFromV2(obj *objectV2.Object) *Object { return &Object{