[#30] core/object: Remove redundant Address type

Remove Address type. Makes Address method of the Object to return NeoFS SDK
Address type. Makes local storage to work with NeoFS SDK object address.

Signed-off-by: Leonard Lyubich <leonard@nspcc.ru>
This commit is contained in:
Leonard Lyubich 2020-09-16 15:07:23 +03:00 committed by Alex Vanin
parent 8366c146d7
commit 4326ff56a7
4 changed files with 11 additions and 42 deletions

View file

@ -25,15 +25,13 @@ func (o *Object) MarshalStableV2() ([]byte, error) {
}
// Address returns address of the object.
func (o *Object) Address() *Address {
func (o *Object) Address() *object.Address {
if o != nil {
aV2 := new(refs.Address)
aV2.SetObjectID(o.GetID().ToV2())
aV2.SetContainerID(o.GetContainerID().ToV2())
return &Address{
Address: object.NewAddressFromV2(aV2),
}
return object.NewAddressFromV2(aV2)
}
return nil