frostfs-node/pkg/core/object/object.go
Leonard Lyubich 7ccd1625af [#1214] *: Use single Object type in whole project
Remove `Object` and `RawObject` types from `pkg/core/object` package.
Use `Object` type from NeoFS SDK Go library everywhere. Avoid using the
deprecated elements.

Signed-off-by: Leonard Lyubich <leonard@nspcc.ru>
2022-03-04 17:45:00 +03:00

19 lines
390 B
Go

package object
import (
"github.com/nspcc-dev/neofs-sdk-go/object"
addressSDK "github.com/nspcc-dev/neofs-sdk-go/object/address"
)
// AddressOf returns address of the object.
func AddressOf(obj *object.Object) *addressSDK.Address {
if obj != nil {
addr := addressSDK.NewAddress()
addr.SetObjectID(obj.ID())
addr.SetContainerID(obj.ContainerID())
return addr
}
return nil
}