forked from TrueCloudLab/frostfs-node
[#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>
This commit is contained in:
parent
19ad349b27
commit
7ccd1625af
100 changed files with 847 additions and 965 deletions
|
@ -10,6 +10,7 @@ import (
|
|||
"github.com/nspcc-dev/neofs-node/pkg/core/object"
|
||||
"github.com/nspcc-dev/neofs-node/pkg/services/object_manager/transformer"
|
||||
"github.com/nspcc-dev/neofs-sdk-go/checksum"
|
||||
objectSDK "github.com/nspcc-dev/neofs-sdk-go/object"
|
||||
"github.com/nspcc-dev/tzhash/tz"
|
||||
)
|
||||
|
||||
|
@ -35,7 +36,7 @@ var (
|
|||
ErrWrongPayloadSize = errors.New("wrong payload size")
|
||||
)
|
||||
|
||||
func (t *validatingTarget) WriteHeader(obj *object.RawObject) error {
|
||||
func (t *validatingTarget) WriteHeader(obj *objectSDK.Object) error {
|
||||
t.payloadSz = obj.PayloadSize()
|
||||
chunkLn := uint64(len(obj.Payload()))
|
||||
|
||||
|
@ -61,7 +62,7 @@ func (t *validatingTarget) WriteHeader(obj *object.RawObject) error {
|
|||
|
||||
t.checksum = cs.Sum()
|
||||
|
||||
if err := t.fmt.Validate(obj.Object()); err != nil {
|
||||
if err := t.fmt.Validate(obj); err != nil {
|
||||
return fmt.Errorf("(%T) coult not validate object format: %w", t, err)
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue