[#33] core/object: Add to-SDK object converting method
Signed-off-by: Leonard Lyubich <leonard@nspcc.ru>
This commit is contained in:
parent
3d25d6c217
commit
d3349a293a
1 changed files with 9 additions and 0 deletions
|
@ -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{
|
||||
|
|
Loading…
Reference in a new issue