forked from TrueCloudLab/frostfs-node
[#1131] *: Adopt SDK changes
`object.Address` has been moved to `object/address` `object.ID` has been moved to `object/id` Signed-off-by: Pavel Karpy <carpawell@nspcc.ru>
This commit is contained in:
parent
1c821d6c36
commit
1667ec9e6d
139 changed files with 652 additions and 562 deletions
|
@ -4,6 +4,7 @@ import (
|
|||
objectV2 "github.com/nspcc-dev/neofs-api-go/v2/object"
|
||||
"github.com/nspcc-dev/neofs-api-go/v2/refs"
|
||||
"github.com/nspcc-dev/neofs-sdk-go/object"
|
||||
addressSDK "github.com/nspcc-dev/neofs-sdk-go/object/address"
|
||||
)
|
||||
|
||||
// Object represents the NeoFS object.
|
||||
|
@ -16,13 +17,13 @@ type Object struct {
|
|||
}
|
||||
|
||||
// Address returns address of the object.
|
||||
func (o *Object) Address() *object.Address {
|
||||
func (o *Object) Address() *addressSDK.Address {
|
||||
if o != nil {
|
||||
aV2 := new(refs.Address)
|
||||
aV2.SetObjectID(o.ID().ToV2())
|
||||
aV2.SetContainerID(o.ContainerID().ToV2())
|
||||
|
||||
return object.NewAddressFromV2(aV2)
|
||||
return addressSDK.NewAddressFromV2(aV2)
|
||||
}
|
||||
|
||||
return nil
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue