[#33] core/object: Add to-SDK object converting method

Signed-off-by: Leonard Lyubich <leonard@nspcc.ru>
remotes/KirillovDenis/release/v0.21.1
Leonard Lyubich 2020-09-21 17:25:03 +03:00 committed by Alex Vanin
parent 3d25d6c217
commit d3349a293a
1 changed files with 9 additions and 0 deletions

View File

@ -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{