[#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:
Leonard Lyubich 2022-03-03 17:19:05 +03:00 committed by Alex Vanin
parent 19ad349b27
commit 7ccd1625af
100 changed files with 847 additions and 965 deletions

View file

@ -7,7 +7,7 @@ import (
"github.com/nspcc-dev/neofs-node/pkg/services/object_manager/placement"
"github.com/nspcc-dev/neofs-node/pkg/util/logger"
cid "github.com/nspcc-dev/neofs-sdk-go/container/id"
objectSDK "github.com/nspcc-dev/neofs-sdk-go/object"
"github.com/nspcc-dev/neofs-sdk-go/object"
oidSDK "github.com/nspcc-dev/neofs-sdk-go/object/id"
"go.uber.org/zap"
)
@ -64,7 +64,7 @@ func (exec *execCtx) containerID() *cid.ID {
return exec.prm.cid
}
func (exec *execCtx) searchFilters() objectSDK.SearchFilters {
func (exec *execCtx) searchFilters() object.SearchFilters {
return exec.prm.filters
}

View file

@ -4,7 +4,7 @@ import (
coreclient "github.com/nspcc-dev/neofs-node/pkg/core/client"
"github.com/nspcc-dev/neofs-node/pkg/services/object/util"
cid "github.com/nspcc-dev/neofs-sdk-go/container/id"
objectSDK "github.com/nspcc-dev/neofs-sdk-go/object"
"github.com/nspcc-dev/neofs-sdk-go/object"
oidSDK "github.com/nspcc-dev/neofs-sdk-go/object/id"
)
@ -16,7 +16,7 @@ type Prm struct {
cid *cid.ID
filters objectSDK.SearchFilters
filters object.SearchFilters
forwarder RequestForwarder
}
@ -53,6 +53,6 @@ func (p *Prm) WithContainerID(id *cid.ID) {
}
// WithSearchFilters sets search filters.
func (p *Prm) WithSearchFilters(fs objectSDK.SearchFilters) {
func (p *Prm) WithSearchFilters(fs object.SearchFilters) {
p.filters = fs
}

View file

@ -18,7 +18,7 @@ import (
searchsvc "github.com/nspcc-dev/neofs-node/pkg/services/object/search"
"github.com/nspcc-dev/neofs-node/pkg/services/object/util"
cid "github.com/nspcc-dev/neofs-sdk-go/container/id"
objectSDK "github.com/nspcc-dev/neofs-sdk-go/object"
"github.com/nspcc-dev/neofs-sdk-go/object"
oidSDK "github.com/nspcc-dev/neofs-sdk-go/object/id"
)
@ -110,7 +110,7 @@ func (s *Service) toPrm(req *objectV2.SearchRequest, stream objectSvc.SearchStre
body := req.GetBody()
p.WithContainerID(cid.NewFromV2(body.GetContainerID()))
p.WithSearchFilters(objectSDK.NewSearchFiltersFromV2(body.GetFilters()))
p.WithSearchFilters(object.NewSearchFiltersFromV2(body.GetFilters()))
return p, nil
}