From 95893927aaf47eff0fcb7c0343daa5589aaa4c81 Mon Sep 17 00:00:00 2001 From: Evgenii Stratonikov Date: Wed, 10 Nov 2021 10:08:33 +0300 Subject: [PATCH] *: replace neofs-api-go with neofs-sdk-go Signed-off-by: Evgenii Stratonikov --- .../internal/modules/morph/container.go | 2 +- cmd/neofs-cli/internal/client/client.go | 20 ++++++------- cmd/neofs-cli/internal/client/prm.go | 15 +++++----- cmd/neofs-cli/modules/accounting.go | 4 +-- cmd/neofs-cli/modules/container.go | 22 +++++++------- cmd/neofs-cli/modules/control.go | 6 ++-- cmd/neofs-cli/modules/netmap.go | 2 +- cmd/neofs-cli/modules/object.go | 16 +++++----- cmd/neofs-cli/modules/root.go | 14 ++++----- cmd/neofs-cli/modules/storagegroup.go | 4 +-- cmd/neofs-cli/modules/util.go | 6 ++-- .../internal/commands/inspect/inspect.go | 2 +- cmd/neofs-lens/internal/commands/list/list.go | 2 +- cmd/neofs-node/attributes.go | 2 +- cmd/neofs-node/cache.go | 10 +++---- cmd/neofs-node/config.go | 12 ++++---- cmd/neofs-node/container.go | 12 ++++---- cmd/neofs-node/control.go | 2 +- cmd/neofs-node/netmap.go | 2 +- cmd/neofs-node/object.go | 16 +++++----- cmd/neofs-node/reputation/common/remote.go | 2 +- .../reputation/intermediate/contract.go | 2 +- .../reputation/intermediate/remote.go | 4 +-- .../reputation/internal/client/client.go | 4 +-- cmd/neofs-node/reputation/local/remote.go | 4 +-- go.mod | 2 +- go.sum | Bin 99026 -> 99050 bytes pkg/core/client/client.go | 2 +- pkg/core/client/util.go | 2 +- pkg/core/container/delete.go | 4 +-- pkg/core/container/fmt.go | 4 +-- pkg/core/container/fmt_test.go | 10 +++---- pkg/core/container/storage.go | 4 +-- pkg/core/netmap/storage.go | 2 +- pkg/core/object/fmt.go | 6 ++-- pkg/core/object/fmt_test.go | 16 +++++----- pkg/core/object/object.go | 2 +- pkg/core/object/raw.go | 2 +- pkg/core/version/version.go | 4 +-- pkg/core/version/version_test.go | 6 ++-- pkg/innerring/internal/client/client.go | 6 ++-- pkg/innerring/internal/client/prm.go | 2 +- pkg/innerring/processors/audit/process.go | 6 ++-- pkg/innerring/processors/audit/processor.go | 4 +-- pkg/innerring/processors/audit/scheduler.go | 2 +- .../processors/audit/scheduler_test.go | 6 ++-- pkg/innerring/processors/container/common.go | 6 ++-- .../processors/container/process_container.go | 6 ++-- .../processors/container/process_eacl.go | 4 +-- .../processors/netmap/cleanup_table.go | 2 +- .../processors/netmap/cleanup_table_test.go | 2 +- .../netmap/nodevalidation/locode/calls.go | 2 +- .../nodevalidation/locode/calls_test.go | 2 +- .../netmap/nodevalidation/locode/validator.go | 2 +- .../netmap/nodevalidation/maddress/calls.go | 2 +- .../netmap/nodevalidation/validator.go | 2 +- .../processors/netmap/process_cleanup.go | 2 +- .../processors/netmap/process_peers.go | 2 +- pkg/innerring/processors/netmap/processor.go | 2 +- .../processors/reputation/process_put.go | 2 +- .../processors/settlement/audit/calculate.go | 8 ++--- .../processors/settlement/audit/prm.go | 4 +-- .../processors/settlement/basic/context.go | 2 +- .../processors/settlement/common/types.go | 4 +-- .../processors/settlement/common/util.go | 2 +- pkg/innerring/rpc.go | 8 ++--- pkg/innerring/settlement.go | 14 ++++----- .../blobovnicza/blobovnicza_test.go | 8 ++--- .../blobovnicza/delete.go | 2 +- pkg/local_object_storage/blobovnicza/get.go | 2 +- .../blobovnicza/get_range.go | 2 +- .../blobovnicza/iterate.go | 2 +- pkg/local_object_storage/blobovnicza/put.go | 2 +- .../blobstor/blobovnicza.go | 2 +- .../blobstor/blobovnicza_test.go | 6 ++-- pkg/local_object_storage/blobstor/exists.go | 2 +- .../blobstor/fstree/fstree.go | 4 +-- .../blobstor/fstree/fstree_test.go | 6 ++-- pkg/local_object_storage/blobstor/iterate.go | 2 +- .../blobstor/iterate_test.go | 4 +-- pkg/local_object_storage/blobstor/put.go | 2 +- pkg/local_object_storage/blobstor/util.go | 2 +- pkg/local_object_storage/engine/container.go | 2 +- pkg/local_object_storage/engine/delete.go | 2 +- .../engine/engine_test.go | 19 ++++++------ pkg/local_object_storage/engine/exists.go | 2 +- pkg/local_object_storage/engine/get.go | 2 +- pkg/local_object_storage/engine/head.go | 2 +- pkg/local_object_storage/engine/head_test.go | 6 ++-- pkg/local_object_storage/engine/inhume.go | 2 +- .../engine/inhume_test.go | 6 ++-- pkg/local_object_storage/engine/range.go | 2 +- pkg/local_object_storage/engine/select.go | 4 +-- pkg/local_object_storage/engine/shards.go | 2 +- .../metabase/containers.go | 2 +- .../metabase/containers_test.go | 8 ++--- .../metabase/control_test.go | 2 +- pkg/local_object_storage/metabase/db.go | 2 +- pkg/local_object_storage/metabase/db_test.go | 25 ++++++++-------- pkg/local_object_storage/metabase/delete.go | 2 +- .../metabase/delete_test.go | 8 ++--- pkg/local_object_storage/metabase/exists.go | 4 +-- .../metabase/exists_test.go | 8 ++--- pkg/local_object_storage/metabase/get.go | 4 +-- pkg/local_object_storage/metabase/get_test.go | 6 ++-- .../metabase/graveyard.go | 2 +- .../metabase/graveyard_test.go | 2 +- pkg/local_object_storage/metabase/inhume.go | 2 +- .../metabase/iterators.go | 4 +-- .../metabase/iterators_test.go | 2 +- pkg/local_object_storage/metabase/movable.go | 2 +- pkg/local_object_storage/metabase/put.go | 2 +- pkg/local_object_storage/metabase/select.go | 4 +-- .../metabase/select_test.go | 28 +++++++++--------- pkg/local_object_storage/metabase/small.go | 2 +- pkg/local_object_storage/metabase/util.go | 4 +-- pkg/local_object_storage/shard/container.go | 2 +- pkg/local_object_storage/shard/control.go | 2 +- .../shard/control_test.go | 4 +-- pkg/local_object_storage/shard/delete.go | 2 +- pkg/local_object_storage/shard/delete_test.go | 4 +-- pkg/local_object_storage/shard/exists.go | 2 +- pkg/local_object_storage/shard/gc.go | 2 +- pkg/local_object_storage/shard/get.go | 2 +- pkg/local_object_storage/shard/get_test.go | 6 ++-- pkg/local_object_storage/shard/head.go | 2 +- pkg/local_object_storage/shard/head_test.go | 6 ++-- pkg/local_object_storage/shard/inhume.go | 2 +- pkg/local_object_storage/shard/inhume_test.go | 4 +-- pkg/local_object_storage/shard/list.go | 4 +-- pkg/local_object_storage/shard/list_test.go | 4 +-- pkg/local_object_storage/shard/move.go | 2 +- pkg/local_object_storage/shard/range.go | 2 +- pkg/local_object_storage/shard/select.go | 4 +-- pkg/local_object_storage/shard/shard.go | 2 +- pkg/local_object_storage/shard/shard_test.go | 23 +++++++------- pkg/local_object_storage/util/splitinfo.go | 2 +- .../util/splitinfo_test.go | 2 +- pkg/local_object_storage/writecache/delete.go | 2 +- pkg/local_object_storage/writecache/flush.go | 2 +- pkg/local_object_storage/writecache/get.go | 2 +- .../writecache/iterate.go | 2 +- pkg/local_object_storage/writecache/put.go | 2 +- .../writecache/storage.go | 2 +- .../writecache/writecache.go | 2 +- pkg/morph/client/audit/wrapper/result.go | 4 +-- pkg/morph/client/audit/wrapper/result_test.go | 6 ++-- pkg/morph/client/balance/wrapper/balanceOf.go | 7 +++-- pkg/morph/client/balance/wrapper/transfer.go | 18 +++++------ .../client/container/wrapper/container.go | 12 ++++---- pkg/morph/client/container/wrapper/eacl.go | 10 +++---- pkg/morph/client/neofsid/wrapper/keys.go | 2 +- pkg/morph/client/netmap/client.go | 2 +- pkg/morph/client/netmap/wrapper/netmap.go | 2 +- pkg/morph/client/netmap/wrapper/snapshot.go | 2 +- .../client/netmap/wrapper/update_state.go | 2 +- pkg/morph/client/reputation/wrapper/get.go | 2 +- pkg/morph/client/reputation/wrapper/put.go | 2 +- pkg/morph/event/netmap/update_peer.go | 2 +- pkg/morph/event/netmap/update_peer_notary.go | 2 +- pkg/morph/event/netmap/update_peer_test.go | 2 +- pkg/morph/event/reputation/put.go | 2 +- pkg/morph/event/reputation/put_test.go | 2 +- pkg/network/cache/client.go | 4 +-- pkg/network/cache/multi.go | 18 +++++------ pkg/network/group.go | 2 +- pkg/network/validation.go | 2 +- pkg/network/validation_test.go | 2 +- pkg/services/accounting/morph/executor.go | 2 +- pkg/services/audit/auditor/context.go | 8 ++--- pkg/services/audit/auditor/pdp.go | 4 +-- pkg/services/audit/auditor/pop.go | 6 ++-- pkg/services/audit/auditor/por.go | 2 +- pkg/services/audit/report.go | 6 ++-- pkg/services/audit/task.go | 8 ++--- .../announcement/load/controller/calls.go | 2 +- .../load/controller/calls_test.go | 6 ++-- .../announcement/load/controller/deps.go | 2 +- .../announcement/load/controller/util.go | 2 +- .../announcement/load/route/calls.go | 2 +- .../container/announcement/load/route/deps.go | 2 +- .../load/route/placement/calls.go | 2 +- .../announcement/load/route/placement/deps.go | 4 +-- .../container/announcement/load/route/util.go | 2 +- .../announcement/load/storage/storage.go | 2 +- .../announcement/load/storage/storage_test.go | 6 ++-- pkg/services/container/morph/executor.go | 16 +++++----- pkg/services/control/ir/server/sign.go | 2 +- pkg/services/control/server/gc.go | 2 +- .../control/server/netmap_snapshot.go | 2 +- pkg/services/control/server/sign.go | 2 +- pkg/services/netmap/executor.go | 8 ++--- pkg/services/object/acl/acl.go | 10 +++---- pkg/services/object/acl/acl_test.go | 12 ++++---- pkg/services/object/acl/basic_helper.go | 2 +- pkg/services/object/acl/basic_helper_test.go | 2 +- pkg/services/object/acl/classifier.go | 20 ++++++------- pkg/services/object/acl/eacl/types.go | 4 +-- pkg/services/object/acl/eacl/v2/eacl_test.go | 10 +++---- pkg/services/object/acl/eacl/v2/headers.go | 10 +++---- pkg/services/object/acl/eacl/v2/localstore.go | 2 +- pkg/services/object/acl/eacl/v2/object.go | 6 ++-- pkg/services/object/acl/eacl/validator.go | 2 +- .../object/acl/eacl/validator_test.go | 2 +- pkg/services/object/delete/exec.go | 4 +-- pkg/services/object/delete/local.go | 2 +- pkg/services/object/delete/prm.go | 2 +- pkg/services/object/delete/service.go | 4 +-- pkg/services/object/delete/util.go | 2 +- pkg/services/object/delete/v2/util.go | 2 +- pkg/services/object/get/assemble.go | 2 +- pkg/services/object/get/exec.go | 4 +-- pkg/services/object/get/get.go | 2 +- pkg/services/object/get/get_test.go | 12 ++++---- pkg/services/object/get/local.go | 2 +- pkg/services/object/get/prm.go | 2 +- pkg/services/object/get/remote.go | 2 +- pkg/services/object/get/service.go | 4 +-- pkg/services/object/get/util.go | 2 +- pkg/services/object/get/v2/service.go | 2 +- pkg/services/object/get/v2/util.go | 4 +-- pkg/services/object/head/prm.go | 2 +- pkg/services/object/head/remote.go | 6 ++-- pkg/services/object/internal/client/client.go | 15 +++++----- pkg/services/object/put/remote.go | 2 +- pkg/services/object/put/res.go | 2 +- pkg/services/object/put/validation.go | 6 ++-- pkg/services/object/search/exec.go | 4 +-- pkg/services/object/search/prm.go | 4 +-- pkg/services/object/search/search_test.go | 14 ++++----- pkg/services/object/search/service.go | 6 ++-- pkg/services/object/search/util.go | 4 +-- pkg/services/object/search/v2/streamer.go | 2 +- pkg/services/object/search/v2/util.go | 4 +-- pkg/services/object/util/chain.go | 2 +- pkg/services/object/util/key.go | 2 +- pkg/services/object/util/key_test.go | 2 +- pkg/services/object/util/placement.go | 4 +-- pkg/services/object/util/prm.go | 13 ++++---- .../object_manager/placement/netmap.go | 4 +-- .../object_manager/placement/traverser.go | 6 ++-- .../placement/traverser_test.go | 6 ++-- .../object_manager/storagegroup/collect.go | 12 ++++---- .../object_manager/storagegroup/search.go | 2 +- .../object_manager/transformer/fmt.go | 8 ++--- .../object_manager/transformer/transformer.go | 8 ++--- .../object_manager/transformer/types.go | 2 +- pkg/services/policer/check.go | 4 +-- pkg/services/policer/policer.go | 2 +- pkg/services/policer/queue.go | 2 +- pkg/services/replicator/task.go | 4 +-- pkg/services/reputation/common/managers.go | 2 +- pkg/services/session/storage/executor.go | 2 +- pkg/services/session/storage/storage.go | 2 +- pkg/services/util/response/service.go | 4 +-- pkg/util/attributes/parser.go | 2 +- 256 files changed, 596 insertions(+), 597 deletions(-) diff --git a/cmd/neofs-adm/internal/modules/morph/container.go b/cmd/neofs-adm/internal/modules/morph/container.go index de063c475..0f4dae49b 100644 --- a/cmd/neofs-adm/internal/modules/morph/container.go +++ b/cmd/neofs-adm/internal/modules/morph/container.go @@ -14,7 +14,7 @@ import ( "github.com/nspcc-dev/neo-go/pkg/util" "github.com/nspcc-dev/neo-go/pkg/vm/emit" "github.com/nspcc-dev/neo-go/pkg/vm/stackitem" - cid "github.com/nspcc-dev/neofs-api-go/pkg/container/id" + cid "github.com/nspcc-dev/neofs-sdk-go/container/id" "github.com/spf13/cobra" "github.com/spf13/viper" ) diff --git a/cmd/neofs-cli/internal/client/client.go b/cmd/neofs-cli/internal/client/client.go index 6a8177032..262a7b8ba 100644 --- a/cmd/neofs-cli/internal/client/client.go +++ b/cmd/neofs-cli/internal/client/client.go @@ -6,15 +6,15 @@ import ( "io" "math" - "github.com/nspcc-dev/neofs-api-go/pkg" - "github.com/nspcc-dev/neofs-api-go/pkg/accounting" - "github.com/nspcc-dev/neofs-api-go/pkg/acl/eacl" - "github.com/nspcc-dev/neofs-api-go/pkg/client" - "github.com/nspcc-dev/neofs-api-go/pkg/container" - cid "github.com/nspcc-dev/neofs-api-go/pkg/container/id" - "github.com/nspcc-dev/neofs-api-go/pkg/netmap" - "github.com/nspcc-dev/neofs-api-go/pkg/object" - "github.com/nspcc-dev/neofs-api-go/pkg/session" + "github.com/nspcc-dev/neofs-sdk-go/accounting" + "github.com/nspcc-dev/neofs-sdk-go/client" + "github.com/nspcc-dev/neofs-sdk-go/container" + cid "github.com/nspcc-dev/neofs-sdk-go/container/id" + "github.com/nspcc-dev/neofs-sdk-go/eacl" + "github.com/nspcc-dev/neofs-sdk-go/netmap" + "github.com/nspcc-dev/neofs-sdk-go/object" + "github.com/nspcc-dev/neofs-sdk-go/session" + "github.com/nspcc-dev/neofs-sdk-go/version" ) // BalanceOfPrm groups parameters of BalanceOf operation. @@ -251,7 +251,7 @@ func (x NodeInfoRes) NodeInfo() *netmap.NodeInfo { } // LatestVersion returns latest NeoFS API version in use. -func (x NodeInfoRes) LatestVersion() *pkg.Version { +func (x NodeInfoRes) LatestVersion() *version.Version { return x.cliRes.LatestVersion() } diff --git a/cmd/neofs-cli/internal/client/prm.go b/cmd/neofs-cli/internal/client/prm.go index 37c13cfd8..9b0e33474 100644 --- a/cmd/neofs-cli/internal/client/prm.go +++ b/cmd/neofs-cli/internal/client/prm.go @@ -4,13 +4,12 @@ import ( "crypto/ecdsa" "io" - "github.com/nspcc-dev/neofs-api-go/pkg" - "github.com/nspcc-dev/neofs-api-go/pkg/client" - cid "github.com/nspcc-dev/neofs-api-go/pkg/container/id" - "github.com/nspcc-dev/neofs-api-go/pkg/object" - "github.com/nspcc-dev/neofs-api-go/pkg/owner" - "github.com/nspcc-dev/neofs-api-go/pkg/session" - "github.com/nspcc-dev/neofs-api-go/pkg/token" + "github.com/nspcc-dev/neofs-sdk-go/client" + cid "github.com/nspcc-dev/neofs-sdk-go/container/id" + "github.com/nspcc-dev/neofs-sdk-go/object" + "github.com/nspcc-dev/neofs-sdk-go/owner" + "github.com/nspcc-dev/neofs-sdk-go/session" + "github.com/nspcc-dev/neofs-sdk-go/token" ) // here are small structures with public setters to share between parameter structures @@ -107,7 +106,7 @@ func (x *commonObjectPrm) SetTTL(ttl uint32) { } // SetXHeaders sets request X-Headers. -func (x *commonObjectPrm) SetXHeaders(xhdrs []*pkg.XHeader) { +func (x *commonObjectPrm) SetXHeaders(xhdrs []*session.XHeader) { for _, xhdr := range xhdrs { x.opts = append(x.opts, client.WithXHeader(xhdr)) } diff --git a/cmd/neofs-cli/modules/accounting.go b/cmd/neofs-cli/modules/accounting.go index c13c18587..83868a493 100644 --- a/cmd/neofs-cli/modules/accounting.go +++ b/cmd/neofs-cli/modules/accounting.go @@ -4,9 +4,9 @@ import ( "fmt" "math" - "github.com/nspcc-dev/neofs-api-go/pkg/accounting" - "github.com/nspcc-dev/neofs-api-go/pkg/owner" internalclient "github.com/nspcc-dev/neofs-node/cmd/neofs-cli/internal/client" + "github.com/nspcc-dev/neofs-sdk-go/accounting" + "github.com/nspcc-dev/neofs-sdk-go/owner" "github.com/spf13/cobra" "github.com/spf13/viper" ) diff --git a/cmd/neofs-cli/modules/container.go b/cmd/neofs-cli/modules/container.go index c3468f9f6..5f8c4acf4 100644 --- a/cmd/neofs-cli/modules/container.go +++ b/cmd/neofs-cli/modules/container.go @@ -11,18 +11,18 @@ import ( "time" "github.com/google/uuid" - "github.com/nspcc-dev/neofs-api-go/pkg" - "github.com/nspcc-dev/neofs-api-go/pkg/acl" - "github.com/nspcc-dev/neofs-api-go/pkg/acl/eacl" - "github.com/nspcc-dev/neofs-api-go/pkg/container" - cid "github.com/nspcc-dev/neofs-api-go/pkg/container/id" - "github.com/nspcc-dev/neofs-api-go/pkg/netmap" - "github.com/nspcc-dev/neofs-api-go/pkg/object" - "github.com/nspcc-dev/neofs-api-go/pkg/owner" - "github.com/nspcc-dev/neofs-api-go/pkg/session" internalclient "github.com/nspcc-dev/neofs-node/cmd/neofs-cli/internal/client" "github.com/nspcc-dev/neofs-node/pkg/core/version" - "github.com/nspcc-dev/neofs-sdk-go/pkg/policy" + "github.com/nspcc-dev/neofs-sdk-go/acl" + "github.com/nspcc-dev/neofs-sdk-go/container" + cid "github.com/nspcc-dev/neofs-sdk-go/container/id" + "github.com/nspcc-dev/neofs-sdk-go/eacl" + "github.com/nspcc-dev/neofs-sdk-go/netmap" + "github.com/nspcc-dev/neofs-sdk-go/object" + "github.com/nspcc-dev/neofs-sdk-go/owner" + "github.com/nspcc-dev/neofs-sdk-go/policy" + "github.com/nspcc-dev/neofs-sdk-go/session" + versionSDK "github.com/nspcc-dev/neofs-sdk-go/version" "github.com/spf13/cobra" ) @@ -782,7 +782,7 @@ func parseEACL(eaclPath string) (*eacl.Table, error) { func validateAndFixEACLVersion(table *eacl.Table) { v := table.Version() if !version.IsValid(v) { - table.SetVersion(*pkg.SDKVersion()) + table.SetVersion(*versionSDK.Current()) } } diff --git a/cmd/neofs-cli/modules/control.go b/cmd/neofs-cli/modules/control.go index 1f6491577..c11b05cc2 100644 --- a/cmd/neofs-cli/modules/control.go +++ b/cmd/neofs-cli/modules/control.go @@ -5,13 +5,13 @@ import ( "crypto/tls" "fmt" - "github.com/nspcc-dev/neofs-api-go/pkg/client" - "github.com/nspcc-dev/neofs-api-go/pkg/object" - "github.com/nspcc-dev/neofs-api-go/util/signature" "github.com/nspcc-dev/neofs-node/pkg/services/control" ircontrol "github.com/nspcc-dev/neofs-node/pkg/services/control/ir" ircontrolsrv "github.com/nspcc-dev/neofs-node/pkg/services/control/ir/server" controlSvc "github.com/nspcc-dev/neofs-node/pkg/services/control/server" + "github.com/nspcc-dev/neofs-sdk-go/client" + "github.com/nspcc-dev/neofs-sdk-go/object" + "github.com/nspcc-dev/neofs-sdk-go/util/signature" "github.com/spf13/cobra" "github.com/spf13/viper" ) diff --git a/cmd/neofs-cli/modules/netmap.go b/cmd/neofs-cli/modules/netmap.go index ddd544447..a2c32e326 100644 --- a/cmd/neofs-cli/modules/netmap.go +++ b/cmd/neofs-cli/modules/netmap.go @@ -6,10 +6,10 @@ import ( "github.com/mr-tron/base58" "github.com/nspcc-dev/neo-go/pkg/config/netmode" - "github.com/nspcc-dev/neofs-api-go/pkg/netmap" internalclient "github.com/nspcc-dev/neofs-node/cmd/neofs-cli/internal/client" "github.com/nspcc-dev/neofs-node/pkg/morph/client/netmap/wrapper" "github.com/nspcc-dev/neofs-node/pkg/services/control" + "github.com/nspcc-dev/neofs-sdk-go/netmap" "github.com/spf13/cobra" ) diff --git a/cmd/neofs-cli/modules/object.go b/cmd/neofs-cli/modules/object.go index bfa21ee94..473dda9d8 100644 --- a/cmd/neofs-cli/modules/object.go +++ b/cmd/neofs-cli/modules/object.go @@ -12,14 +12,14 @@ import ( "strings" "time" - "github.com/nspcc-dev/neofs-api-go/pkg" - cid "github.com/nspcc-dev/neofs-api-go/pkg/container/id" - "github.com/nspcc-dev/neofs-api-go/pkg/object" - "github.com/nspcc-dev/neofs-api-go/pkg/owner" - "github.com/nspcc-dev/neofs-api-go/pkg/session" - "github.com/nspcc-dev/neofs-api-go/pkg/token" objectV2 "github.com/nspcc-dev/neofs-api-go/v2/object" internalclient "github.com/nspcc-dev/neofs-node/cmd/neofs-cli/internal/client" + "github.com/nspcc-dev/neofs-sdk-go/checksum" + cid "github.com/nspcc-dev/neofs-sdk-go/container/id" + "github.com/nspcc-dev/neofs-sdk-go/object" + "github.com/nspcc-dev/neofs-sdk-go/owner" + "github.com/nspcc-dev/neofs-sdk-go/session" + "github.com/nspcc-dev/neofs-sdk-go/token" "github.com/spf13/cobra" ) @@ -326,7 +326,7 @@ func prepareSessionPrmWithOwner( type objectPrm interface { bearerPrm SetTTL(uint32) - SetXHeaders([]*pkg.XHeader) + SetXHeaders([]*session.XHeader) } func prepareObjectPrm(cmd *cobra.Command, prms ...objectPrm) { @@ -561,7 +561,7 @@ func getObjectHash(cmd *cobra.Command, _ []string) { res, err := internalclient.HeadObject(headPrm) exitOnErr(cmd, errf("rpc error: %w", err)) - var cs *pkg.Checksum + var cs *checksum.Checksum if tz { cs = res.Header().PayloadHomomorphicHash() diff --git a/cmd/neofs-cli/modules/root.go b/cmd/neofs-cli/modules/root.go index d6a8da910..509fcc560 100644 --- a/cmd/neofs-cli/modules/root.go +++ b/cmd/neofs-cli/modules/root.go @@ -15,12 +15,12 @@ import ( "github.com/nspcc-dev/neo-go/pkg/crypto/keys" "github.com/nspcc-dev/neo-go/pkg/util" "github.com/nspcc-dev/neo-go/pkg/wallet" - "github.com/nspcc-dev/neofs-api-go/pkg" - "github.com/nspcc-dev/neofs-api-go/pkg/client" - "github.com/nspcc-dev/neofs-api-go/pkg/owner" - "github.com/nspcc-dev/neofs-api-go/pkg/token" "github.com/nspcc-dev/neofs-node/misc" "github.com/nspcc-dev/neofs-node/pkg/network" + "github.com/nspcc-dev/neofs-sdk-go/client" + "github.com/nspcc-dev/neofs-sdk-go/owner" + "github.com/nspcc-dev/neofs-sdk-go/session" + "github.com/nspcc-dev/neofs-sdk-go/token" "github.com/spf13/cobra" "github.com/spf13/viper" ) @@ -373,8 +373,8 @@ func printVerbose(format string, a ...interface{}) { } } -func parseXHeaders() []*pkg.XHeader { - xs := make([]*pkg.XHeader, 0, len(xHeaders)) +func parseXHeaders() []*session.XHeader { + xs := make([]*session.XHeader, 0, len(xHeaders)) for i := range xHeaders { kv := strings.SplitN(xHeaders[i], "=", 2) @@ -382,7 +382,7 @@ func parseXHeaders() []*pkg.XHeader { panic(fmt.Errorf("invalid X-Header format: %s", xHeaders[i])) } - x := pkg.NewXHeader() + x := session.NewXHeader() x.SetKey(kv[0]) x.SetValue(kv[1]) diff --git a/cmd/neofs-cli/modules/storagegroup.go b/cmd/neofs-cli/modules/storagegroup.go index aff0ccce6..ceb887199 100644 --- a/cmd/neofs-cli/modules/storagegroup.go +++ b/cmd/neofs-cli/modules/storagegroup.go @@ -5,11 +5,11 @@ import ( "errors" "fmt" - objectSDK "github.com/nspcc-dev/neofs-api-go/pkg/object" - storagegroupAPI "github.com/nspcc-dev/neofs-api-go/pkg/storagegroup" internalclient "github.com/nspcc-dev/neofs-node/cmd/neofs-cli/internal/client" "github.com/nspcc-dev/neofs-node/pkg/core/object" "github.com/nspcc-dev/neofs-node/pkg/services/object_manager/storagegroup" + objectSDK "github.com/nspcc-dev/neofs-sdk-go/object" + storagegroupAPI "github.com/nspcc-dev/neofs-sdk-go/storagegroup" "github.com/spf13/cobra" ) diff --git a/cmd/neofs-cli/modules/util.go b/cmd/neofs-cli/modules/util.go index 9c2f95c25..e0915446c 100644 --- a/cmd/neofs-cli/modules/util.go +++ b/cmd/neofs-cli/modules/util.go @@ -10,14 +10,14 @@ import ( "strconv" "time" - "github.com/nspcc-dev/neofs-api-go/pkg" - "github.com/nspcc-dev/neofs-api-go/pkg/token" "github.com/nspcc-dev/neofs-node/pkg/util/keyer" locodedb "github.com/nspcc-dev/neofs-node/pkg/util/locode/db" airportsdb "github.com/nspcc-dev/neofs-node/pkg/util/locode/db/airports" locodebolt "github.com/nspcc-dev/neofs-node/pkg/util/locode/db/boltdb" continentsdb "github.com/nspcc-dev/neofs-node/pkg/util/locode/db/continents/geojson" csvlocode "github.com/nspcc-dev/neofs-node/pkg/util/locode/table/csv" + "github.com/nspcc-dev/neofs-sdk-go/token" + "github.com/nspcc-dev/neofs-sdk-go/version" "github.com/spf13/cobra" "github.com/spf13/viper" ) @@ -432,7 +432,7 @@ func completeBearerToken(btok *token.BearerToken) error { if v2 := btok.ToV2(); v2 != nil { // set eACL table version, because it usually omitted table := v2.GetBody().GetEACL() - table.SetVersion(pkg.SDKVersion().ToV2()) + table.SetVersion(version.Current().ToV2()) } else { return errors.New("unsupported bearer token version") } diff --git a/cmd/neofs-lens/internal/commands/inspect/inspect.go b/cmd/neofs-lens/internal/commands/inspect/inspect.go index 802165eda..2f6f78e4f 100644 --- a/cmd/neofs-lens/internal/commands/inspect/inspect.go +++ b/cmd/neofs-lens/internal/commands/inspect/inspect.go @@ -4,10 +4,10 @@ import ( "fmt" "io/ioutil" - "github.com/nspcc-dev/neofs-api-go/pkg/object" common "github.com/nspcc-dev/neofs-node/cmd/neofs-lens/internal" "github.com/nspcc-dev/neofs-node/pkg/local_object_storage/blobovnicza" "github.com/nspcc-dev/neofs-node/pkg/local_object_storage/writecache" + "github.com/nspcc-dev/neofs-sdk-go/object" "github.com/spf13/cobra" ) diff --git a/cmd/neofs-lens/internal/commands/list/list.go b/cmd/neofs-lens/internal/commands/list/list.go index 88c9cfa6e..3d290c28e 100644 --- a/cmd/neofs-lens/internal/commands/list/list.go +++ b/cmd/neofs-lens/internal/commands/list/list.go @@ -3,10 +3,10 @@ package cmdlist import ( "io" - "github.com/nspcc-dev/neofs-api-go/pkg/object" common "github.com/nspcc-dev/neofs-node/cmd/neofs-lens/internal" "github.com/nspcc-dev/neofs-node/pkg/local_object_storage/blobovnicza" "github.com/nspcc-dev/neofs-node/pkg/local_object_storage/writecache" + "github.com/nspcc-dev/neofs-sdk-go/object" "github.com/spf13/cobra" ) diff --git a/cmd/neofs-node/attributes.go b/cmd/neofs-node/attributes.go index 1dedcf7ad..9cef09df4 100644 --- a/cmd/neofs-node/attributes.go +++ b/cmd/neofs-node/attributes.go @@ -4,10 +4,10 @@ import ( "fmt" "strconv" - "github.com/nspcc-dev/neofs-api-go/pkg/netmap" "github.com/nspcc-dev/neofs-node/cmd/neofs-node/config" nodeconfig "github.com/nspcc-dev/neofs-node/cmd/neofs-node/config/node" "github.com/nspcc-dev/neofs-node/pkg/util/attributes" + "github.com/nspcc-dev/neofs-sdk-go/netmap" ) const ( diff --git a/cmd/neofs-node/cache.go b/cmd/neofs-node/cache.go index 228392e02..9738e6990 100644 --- a/cmd/neofs-node/cache.go +++ b/cmd/neofs-node/cache.go @@ -5,15 +5,15 @@ import ( "time" lru "github.com/hashicorp/golang-lru" - eaclSDK "github.com/nspcc-dev/neofs-api-go/pkg/acl/eacl" - containerSDK "github.com/nspcc-dev/neofs-api-go/pkg/container" - cid "github.com/nspcc-dev/neofs-api-go/pkg/container/id" - netmapSDK "github.com/nspcc-dev/neofs-api-go/pkg/netmap" - "github.com/nspcc-dev/neofs-api-go/pkg/owner" "github.com/nspcc-dev/neofs-node/pkg/core/container" "github.com/nspcc-dev/neofs-node/pkg/core/netmap" "github.com/nspcc-dev/neofs-node/pkg/morph/client/container/wrapper" "github.com/nspcc-dev/neofs-node/pkg/services/object/acl/eacl" + containerSDK "github.com/nspcc-dev/neofs-sdk-go/container" + cid "github.com/nspcc-dev/neofs-sdk-go/container/id" + eaclSDK "github.com/nspcc-dev/neofs-sdk-go/eacl" + netmapSDK "github.com/nspcc-dev/neofs-sdk-go/netmap" + "github.com/nspcc-dev/neofs-sdk-go/owner" ) type netValueReader func(interface{}) (interface{}, error) diff --git a/cmd/neofs-node/config.go b/cmd/neofs-node/config.go index e33b8b385..50a9d8bbb 100644 --- a/cmd/neofs-node/config.go +++ b/cmd/neofs-node/config.go @@ -10,10 +10,6 @@ import ( "github.com/nspcc-dev/neo-go/pkg/crypto/keys" "github.com/nspcc-dev/neo-go/pkg/encoding/fixedn" neogoutil "github.com/nspcc-dev/neo-go/pkg/util" - "github.com/nspcc-dev/neofs-api-go/pkg" - apiclient "github.com/nspcc-dev/neofs-api-go/pkg/client" - "github.com/nspcc-dev/neofs-api-go/pkg/netmap" - "github.com/nspcc-dev/neofs-api-go/pkg/owner" netmapV2 "github.com/nspcc-dev/neofs-api-go/v2/netmap" "github.com/nspcc-dev/neofs-node/cmd/neofs-node/config" apiclientconfig "github.com/nspcc-dev/neofs-node/cmd/neofs-node/config/apiclient" @@ -48,6 +44,10 @@ import ( "github.com/nspcc-dev/neofs-node/pkg/util" "github.com/nspcc-dev/neofs-node/pkg/util/logger" "github.com/nspcc-dev/neofs-node/pkg/util/state" + apiclient "github.com/nspcc-dev/neofs-sdk-go/client" + "github.com/nspcc-dev/neofs-sdk-go/netmap" + "github.com/nspcc-dev/neofs-sdk-go/owner" + "github.com/nspcc-dev/neofs-sdk-go/version" "github.com/panjf2000/ants/v2" "go.etcd.io/bbolt" "go.uber.org/atomic" @@ -80,7 +80,7 @@ type cfg struct { ownerIDFromKey *owner.ID // owner ID calculated from key - apiVersion *pkg.Version + apiVersion *version.Version cfgGRPC cfgGRPC @@ -268,7 +268,7 @@ func initCfg(path string) *cfg { log: log, wg: new(sync.WaitGroup), key: key, - apiVersion: pkg.SDKVersion(), + apiVersion: version.Current(), cfgAccounting: cfgAccounting{ scriptHash: contractsconfig.Balance(appCfg), }, diff --git a/cmd/neofs-node/container.go b/cmd/neofs-node/container.go index 027771bdf..f1be678bb 100644 --- a/cmd/neofs-node/container.go +++ b/cmd/neofs-node/container.go @@ -8,12 +8,6 @@ import ( "fmt" "strconv" - eaclSDK "github.com/nspcc-dev/neofs-api-go/pkg/acl/eacl" - apiClient "github.com/nspcc-dev/neofs-api-go/pkg/client" - containerSDK "github.com/nspcc-dev/neofs-api-go/pkg/container" - cid "github.com/nspcc-dev/neofs-api-go/pkg/container/id" - "github.com/nspcc-dev/neofs-api-go/pkg/netmap" - "github.com/nspcc-dev/neofs-api-go/pkg/owner" containerV2 "github.com/nspcc-dev/neofs-api-go/v2/container" containerGRPC "github.com/nspcc-dev/neofs-api-go/v2/container/grpc" "github.com/nspcc-dev/neofs-node/pkg/core/client" @@ -32,6 +26,12 @@ import ( containerMorph "github.com/nspcc-dev/neofs-node/pkg/services/container/morph" "github.com/nspcc-dev/neofs-node/pkg/services/object/acl/eacl" "github.com/nspcc-dev/neofs-node/pkg/util/logger" + apiClient "github.com/nspcc-dev/neofs-sdk-go/client" + containerSDK "github.com/nspcc-dev/neofs-sdk-go/container" + cid "github.com/nspcc-dev/neofs-sdk-go/container/id" + eaclSDK "github.com/nspcc-dev/neofs-sdk-go/eacl" + "github.com/nspcc-dev/neofs-sdk-go/netmap" + "github.com/nspcc-dev/neofs-sdk-go/owner" "go.uber.org/zap" ) diff --git a/cmd/neofs-node/control.go b/cmd/neofs-node/control.go index 4db45fad1..33f9d9e53 100644 --- a/cmd/neofs-node/control.go +++ b/cmd/neofs-node/control.go @@ -4,11 +4,11 @@ import ( "context" "net" - "github.com/nspcc-dev/neofs-api-go/pkg/object" controlconfig "github.com/nspcc-dev/neofs-node/cmd/neofs-node/config/control" "github.com/nspcc-dev/neofs-node/pkg/local_object_storage/engine" "github.com/nspcc-dev/neofs-node/pkg/services/control" controlSvc "github.com/nspcc-dev/neofs-node/pkg/services/control/server" + "github.com/nspcc-dev/neofs-sdk-go/object" "google.golang.org/grpc" ) diff --git a/cmd/neofs-node/netmap.go b/cmd/neofs-node/netmap.go index eed30d9a4..db620b216 100644 --- a/cmd/neofs-node/netmap.go +++ b/cmd/neofs-node/netmap.go @@ -5,7 +5,6 @@ import ( "errors" "fmt" - netmapSDK "github.com/nspcc-dev/neofs-api-go/pkg/netmap" netmapV2 "github.com/nspcc-dev/neofs-api-go/v2/netmap" netmapGRPC "github.com/nspcc-dev/neofs-api-go/v2/netmap/grpc" "github.com/nspcc-dev/neofs-api-go/v2/refs" @@ -16,6 +15,7 @@ import ( netmapTransportGRPC "github.com/nspcc-dev/neofs-node/pkg/network/transport/netmap/grpc" "github.com/nspcc-dev/neofs-node/pkg/services/control" netmapService "github.com/nspcc-dev/neofs-node/pkg/services/netmap" + netmapSDK "github.com/nspcc-dev/neofs-sdk-go/netmap" "go.uber.org/atomic" "go.uber.org/zap" ) diff --git a/cmd/neofs-node/object.go b/cmd/neofs-node/object.go index 91f4821f3..8c698b0a5 100644 --- a/cmd/neofs-node/object.go +++ b/cmd/neofs-node/object.go @@ -7,12 +7,6 @@ import ( "crypto/sha256" "fmt" - eaclSDK "github.com/nspcc-dev/neofs-api-go/pkg/acl/eacl" - "github.com/nspcc-dev/neofs-api-go/pkg/client" - cid "github.com/nspcc-dev/neofs-api-go/pkg/container/id" - objectSDK "github.com/nspcc-dev/neofs-api-go/pkg/object" - "github.com/nspcc-dev/neofs-api-go/pkg/owner" - "github.com/nspcc-dev/neofs-api-go/util/signature" "github.com/nspcc-dev/neofs-api-go/v2/object" objectGRPC "github.com/nspcc-dev/neofs-api-go/v2/object/grpc" policerconfig "github.com/nspcc-dev/neofs-node/cmd/neofs-node/config/policer" @@ -45,6 +39,12 @@ import ( "github.com/nspcc-dev/neofs-node/pkg/services/reputation" truststorage "github.com/nspcc-dev/neofs-node/pkg/services/reputation/local/storage" "github.com/nspcc-dev/neofs-node/pkg/util/logger" + "github.com/nspcc-dev/neofs-sdk-go/client" + cid "github.com/nspcc-dev/neofs-sdk-go/container/id" + eaclSDK "github.com/nspcc-dev/neofs-sdk-go/eacl" + objectSDK "github.com/nspcc-dev/neofs-sdk-go/object" + "github.com/nspcc-dev/neofs-sdk-go/owner" + "github.com/nspcc-dev/neofs-sdk-go/util/signature" "go.uber.org/zap" ) @@ -414,8 +414,8 @@ type morphEACLFetcher struct { type signedEACLTable eaclSDK.Table -func (s *signedEACLTable) ReadSignedData(buf []byte) ([]byte, error) { - return (*eaclSDK.Table)(s).Marshal(buf) +func (s *signedEACLTable) ReadSignedData(_ []byte) ([]byte, error) { + return (*eaclSDK.Table)(s).Marshal() } func (s *signedEACLTable) SignedDataSize() int { diff --git a/cmd/neofs-node/reputation/common/remote.go b/cmd/neofs-node/reputation/common/remote.go index 1fa8e09db..f64b8f579 100644 --- a/cmd/neofs-node/reputation/common/remote.go +++ b/cmd/neofs-node/reputation/common/remote.go @@ -3,12 +3,12 @@ package common import ( "fmt" - apiClient "github.com/nspcc-dev/neofs-api-go/pkg/client" "github.com/nspcc-dev/neofs-node/pkg/core/client" "github.com/nspcc-dev/neofs-node/pkg/core/netmap" reputationcommon "github.com/nspcc-dev/neofs-node/pkg/services/reputation/common" reputationrouter "github.com/nspcc-dev/neofs-node/pkg/services/reputation/common/router" trustcontroller "github.com/nspcc-dev/neofs-node/pkg/services/reputation/local/controller" + apiClient "github.com/nspcc-dev/neofs-sdk-go/client" ) type clientCache interface { diff --git a/cmd/neofs-node/reputation/intermediate/contract.go b/cmd/neofs-node/reputation/intermediate/contract.go index d11c5124c..1c48fdc19 100644 --- a/cmd/neofs-node/reputation/intermediate/contract.go +++ b/cmd/neofs-node/reputation/intermediate/contract.go @@ -4,11 +4,11 @@ import ( "crypto/ecdsa" "fmt" - apireputation "github.com/nspcc-dev/neofs-api-go/pkg/reputation" "github.com/nspcc-dev/neofs-node/pkg/morph/client/reputation/wrapper" "github.com/nspcc-dev/neofs-node/pkg/services/reputation/eigentrust" eigentrustcalc "github.com/nspcc-dev/neofs-node/pkg/services/reputation/eigentrust/calculator" "github.com/nspcc-dev/neofs-node/pkg/util/logger" + apireputation "github.com/nspcc-dev/neofs-sdk-go/reputation" "go.uber.org/zap" ) diff --git a/cmd/neofs-node/reputation/intermediate/remote.go b/cmd/neofs-node/reputation/intermediate/remote.go index 7bb8108dc..8d1d20fdc 100644 --- a/cmd/neofs-node/reputation/intermediate/remote.go +++ b/cmd/neofs-node/reputation/intermediate/remote.go @@ -3,13 +3,13 @@ package intermediate import ( "crypto/ecdsa" - apiClient "github.com/nspcc-dev/neofs-api-go/pkg/client" - reputationapi "github.com/nspcc-dev/neofs-api-go/pkg/reputation" "github.com/nspcc-dev/neofs-node/cmd/neofs-node/reputation/common" internalclient "github.com/nspcc-dev/neofs-node/cmd/neofs-node/reputation/internal/client" "github.com/nspcc-dev/neofs-node/pkg/services/reputation" reputationcommon "github.com/nspcc-dev/neofs-node/pkg/services/reputation/common" eigentrustcalc "github.com/nspcc-dev/neofs-node/pkg/services/reputation/eigentrust/calculator" + apiClient "github.com/nspcc-dev/neofs-sdk-go/client" + reputationapi "github.com/nspcc-dev/neofs-sdk-go/reputation" ) // RemoteProviderPrm groups the required parameters of the RemoteProvider's constructor. diff --git a/cmd/neofs-node/reputation/internal/client/client.go b/cmd/neofs-node/reputation/internal/client/client.go index eecdcaaf3..430c1ac76 100644 --- a/cmd/neofs-node/reputation/internal/client/client.go +++ b/cmd/neofs-node/reputation/internal/client/client.go @@ -4,8 +4,8 @@ import ( "context" "crypto/ecdsa" - "github.com/nspcc-dev/neofs-api-go/pkg/client" - "github.com/nspcc-dev/neofs-api-go/pkg/reputation" + "github.com/nspcc-dev/neofs-sdk-go/client" + "github.com/nspcc-dev/neofs-sdk-go/reputation" ) type commonPrm struct { diff --git a/cmd/neofs-node/reputation/local/remote.go b/cmd/neofs-node/reputation/local/remote.go index e7397e0fe..7b1d7be9b 100644 --- a/cmd/neofs-node/reputation/local/remote.go +++ b/cmd/neofs-node/reputation/local/remote.go @@ -3,12 +3,12 @@ package local import ( "crypto/ecdsa" - apiClient "github.com/nspcc-dev/neofs-api-go/pkg/client" - reputationapi "github.com/nspcc-dev/neofs-api-go/pkg/reputation" "github.com/nspcc-dev/neofs-node/cmd/neofs-node/reputation/common" internalclient "github.com/nspcc-dev/neofs-node/cmd/neofs-node/reputation/internal/client" "github.com/nspcc-dev/neofs-node/pkg/services/reputation" reputationcommon "github.com/nspcc-dev/neofs-node/pkg/services/reputation/common" + apiClient "github.com/nspcc-dev/neofs-sdk-go/client" + reputationapi "github.com/nspcc-dev/neofs-sdk-go/reputation" ) // RemoteProviderPrm groups the required parameters of the RemoteProvider's constructor. diff --git a/go.mod b/go.mod index ca87ae54d..64191e868 100644 --- a/go.mod +++ b/go.mod @@ -13,7 +13,7 @@ require ( github.com/nspcc-dev/hrw v1.0.9 github.com/nspcc-dev/neo-go v0.97.3 github.com/nspcc-dev/neofs-api-go v1.30.0 - github.com/nspcc-dev/neofs-sdk-go v0.0.0-20210520210714-9dee13f0d556 + github.com/nspcc-dev/neofs-sdk-go v0.0.0-20211110152919-10b78e74afbd github.com/nspcc-dev/tzhash v1.4.0 github.com/panjf2000/ants/v2 v2.4.0 github.com/paulmach/orb v0.2.2 diff --git a/go.sum b/go.sum index e7f1556a5f03cec6164f72b9b48caab7cdc648b5..80b124b0e64a83190875bc2a758f82675d2ab6a1 100644 GIT binary patch delta 609 zcmbu4y>6Re6oy3ytL<3zZ|GokwG7_}h7T-tup2O7@GlsXPB{D+VZgO9#9q=RH&6z* zQKIafB2lR~(C$sutLQCMs_LYRJ9Mg!&Kcg}d7ty`wDjY&bVWQYUOoC=I*F3mg0OCG zjaaOr#19>!75_=fDZqDAB>@Qmy<0?aG*@+jU9%y{O^^%AQ&`^!1D|9}!$ut`UNpxJ zs|QXxm;qZ#1ELX)MZ;?NhpmbkytwcA$#gZrkK*vQB-ke!$yx61m>xuI&}F+ftM z9rH6;V_TjD72Vc`KJYX|uQQop^Xu*NqVw)CR(yGXeusw;0!Wh_3U6TCj#42rL_No1voT*4rmV{o>~b3~t|u7{9%$VfQ{! IB6eB-4Vv1fh7_`-#0(+tM}(^^~Y`X5wE?B^!UxfTtvQIPXWeauI}^rxClSvk-6B55Vs!FnCrQGBSfza{}72LVCtpMzY}B3Z*E zbO;O`9wlrPnY|2P)P+Hs3xK7?PFI$05OX8(v)tdx1T|M8X(4aLeL|yb*S=NDljq;D z0tjd2i_t5-0t)YLUbuH(%Jjq2N{hjceHkSPwsrCf_sC^~L&z}5&T0*LNAPz{WmRQ2!z)puto25tIB)$r^ iLC$I9j1YBR%C2K2@IoQ`+je(ap6z~p{wko#?&3FUMzGod diff --git a/pkg/core/client/client.go b/pkg/core/client/client.go index 2e0c3a760..cc3f77942 100644 --- a/pkg/core/client/client.go +++ b/pkg/core/client/client.go @@ -1,9 +1,9 @@ package client import ( - "github.com/nspcc-dev/neofs-api-go/pkg/client" rawclient "github.com/nspcc-dev/neofs-api-go/rpc/client" "github.com/nspcc-dev/neofs-node/pkg/network" + "github.com/nspcc-dev/neofs-sdk-go/client" ) // Client is an interface of NeoFS storage diff --git a/pkg/core/client/util.go b/pkg/core/client/util.go index 3fb4484da..0d464c84b 100644 --- a/pkg/core/client/util.go +++ b/pkg/core/client/util.go @@ -4,8 +4,8 @@ import ( "bytes" "fmt" - "github.com/nspcc-dev/neofs-api-go/pkg/client" "github.com/nspcc-dev/neofs-node/pkg/network" + "github.com/nspcc-dev/neofs-sdk-go/client" ) func nodeInfoFromKeyAddr(dst *NodeInfo, k []byte, a network.AddressGroup) { diff --git a/pkg/core/container/delete.go b/pkg/core/container/delete.go index 6c5525f66..341645b75 100644 --- a/pkg/core/container/delete.go +++ b/pkg/core/container/delete.go @@ -1,8 +1,8 @@ package container import ( - cid "github.com/nspcc-dev/neofs-api-go/pkg/container/id" - "github.com/nspcc-dev/neofs-api-go/pkg/session" + cid "github.com/nspcc-dev/neofs-sdk-go/container/id" + "github.com/nspcc-dev/neofs-sdk-go/session" ) // RemovalWitness groups the information required diff --git a/pkg/core/container/fmt.go b/pkg/core/container/fmt.go index 024d085dd..b50ea12fe 100644 --- a/pkg/core/container/fmt.go +++ b/pkg/core/container/fmt.go @@ -4,9 +4,9 @@ import ( "errors" "fmt" - "github.com/nspcc-dev/neofs-api-go/pkg/container" - "github.com/nspcc-dev/neofs-api-go/pkg/owner" "github.com/nspcc-dev/neofs-node/pkg/core/version" + "github.com/nspcc-dev/neofs-sdk-go/container" + "github.com/nspcc-dev/neofs-sdk-go/owner" ) var ( diff --git a/pkg/core/container/fmt_test.go b/pkg/core/container/fmt_test.go index 024d597c3..b4a5abf51 100644 --- a/pkg/core/container/fmt_test.go +++ b/pkg/core/container/fmt_test.go @@ -4,11 +4,11 @@ import ( "testing" "github.com/google/uuid" - "github.com/nspcc-dev/neofs-api-go/pkg" - "github.com/nspcc-dev/neofs-api-go/pkg/container" - "github.com/nspcc-dev/neofs-api-go/pkg/netmap" - "github.com/nspcc-dev/neofs-api-go/pkg/owner" "github.com/nspcc-dev/neofs-node/pkg/util/test" + "github.com/nspcc-dev/neofs-sdk-go/container" + "github.com/nspcc-dev/neofs-sdk-go/netmap" + "github.com/nspcc-dev/neofs-sdk-go/owner" + "github.com/nspcc-dev/neofs-sdk-go/version" "github.com/stretchr/testify/require" ) @@ -22,7 +22,7 @@ func TestCheckFormat(t *testing.T) { require.Error(t, CheckFormat(c)) - c.SetVersion(pkg.SDKVersion()) + c.SetVersion(version.Current()) require.Error(t, CheckFormat(c)) diff --git a/pkg/core/container/storage.go b/pkg/core/container/storage.go index 727d0dc32..fc899f360 100644 --- a/pkg/core/container/storage.go +++ b/pkg/core/container/storage.go @@ -3,8 +3,8 @@ package container import ( "errors" - "github.com/nspcc-dev/neofs-api-go/pkg/container" - cid "github.com/nspcc-dev/neofs-api-go/pkg/container/id" + "github.com/nspcc-dev/neofs-sdk-go/container" + cid "github.com/nspcc-dev/neofs-sdk-go/container/id" ) // Source is an interface that wraps diff --git a/pkg/core/netmap/storage.go b/pkg/core/netmap/storage.go index df980db88..dec110eb5 100644 --- a/pkg/core/netmap/storage.go +++ b/pkg/core/netmap/storage.go @@ -1,7 +1,7 @@ package netmap import ( - "github.com/nspcc-dev/neofs-api-go/pkg/netmap" + "github.com/nspcc-dev/neofs-sdk-go/netmap" ) // Source is an interface that wraps diff --git a/pkg/core/object/fmt.go b/pkg/core/object/fmt.go index a734aebde..e179bd573 100644 --- a/pkg/core/object/fmt.go +++ b/pkg/core/object/fmt.go @@ -9,11 +9,11 @@ import ( "strconv" "github.com/nspcc-dev/neo-go/pkg/crypto/keys" - "github.com/nspcc-dev/neofs-api-go/pkg/object" - "github.com/nspcc-dev/neofs-api-go/pkg/owner" - "github.com/nspcc-dev/neofs-api-go/pkg/storagegroup" objectV2 "github.com/nspcc-dev/neofs-api-go/v2/object" "github.com/nspcc-dev/neofs-node/pkg/core/netmap" + "github.com/nspcc-dev/neofs-sdk-go/object" + "github.com/nspcc-dev/neofs-sdk-go/owner" + "github.com/nspcc-dev/neofs-sdk-go/storagegroup" ) // FormatValidator represents object format validator. diff --git a/pkg/core/object/fmt_test.go b/pkg/core/object/fmt_test.go index f186182b3..c6e853c73 100644 --- a/pkg/core/object/fmt_test.go +++ b/pkg/core/object/fmt_test.go @@ -9,12 +9,12 @@ import ( "testing" "github.com/nspcc-dev/neo-go/pkg/crypto/keys" - cidtest "github.com/nspcc-dev/neofs-api-go/pkg/container/id/test" - "github.com/nspcc-dev/neofs-api-go/pkg/object" - "github.com/nspcc-dev/neofs-api-go/pkg/owner" - sessiontest "github.com/nspcc-dev/neofs-api-go/pkg/session/test" - "github.com/nspcc-dev/neofs-api-go/pkg/storagegroup" objectV2 "github.com/nspcc-dev/neofs-api-go/v2/object" + cidtest "github.com/nspcc-dev/neofs-sdk-go/container/id/test" + "github.com/nspcc-dev/neofs-sdk-go/object" + "github.com/nspcc-dev/neofs-sdk-go/owner" + sessiontest "github.com/nspcc-dev/neofs-sdk-go/session/test" + "github.com/nspcc-dev/neofs-sdk-go/storagegroup" "github.com/stretchr/testify/require" ) @@ -42,7 +42,7 @@ func blankValidObject(t *testing.T, key *ecdsa.PrivateKey) *RawObject { ownerID.SetNeo3Wallet(wallet) obj := NewRaw() - obj.SetContainerID(cidtest.Generate()) + obj.SetContainerID(cidtest.GenerateID()) obj.SetOwnerID(ownerID) return obj @@ -87,7 +87,7 @@ func TestFormatValidator_Validate(t *testing.T) { t.Run("unsigned object", func(t *testing.T) { obj := NewRaw() - obj.SetContainerID(cidtest.Generate()) + obj.SetContainerID(cidtest.GenerateID()) obj.SetID(testObjectID(t)) require.Error(t, v.Validate(obj.Object())) @@ -101,7 +101,7 @@ func TestFormatValidator_Validate(t *testing.T) { tok.SetOwnerID(owner.NewIDFromNeo3Wallet(w)) obj := NewRaw() - obj.SetContainerID(cidtest.Generate()) + obj.SetContainerID(cidtest.GenerateID()) obj.SetSessionToken(sessiontest.Generate()) obj.SetOwnerID(tok.OwnerID()) diff --git a/pkg/core/object/object.go b/pkg/core/object/object.go index acc1dff4c..eaa2a8cfa 100644 --- a/pkg/core/object/object.go +++ b/pkg/core/object/object.go @@ -1,9 +1,9 @@ package object import ( - "github.com/nspcc-dev/neofs-api-go/pkg/object" 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" ) // Object represents the NeoFS object. diff --git a/pkg/core/object/raw.go b/pkg/core/object/raw.go index c51e07a5e..ed71b848f 100644 --- a/pkg/core/object/raw.go +++ b/pkg/core/object/raw.go @@ -1,8 +1,8 @@ package object import ( - "github.com/nspcc-dev/neofs-api-go/pkg/object" objectV2 "github.com/nspcc-dev/neofs-api-go/v2/object" + "github.com/nspcc-dev/neofs-sdk-go/object" ) // RawObject represents the raw NeoFS object. diff --git a/pkg/core/version/version.go b/pkg/core/version/version.go index 8371ab570..ed4e4a726 100644 --- a/pkg/core/version/version.go +++ b/pkg/core/version/version.go @@ -1,11 +1,11 @@ package version import ( - "github.com/nspcc-dev/neofs-api-go/pkg" + "github.com/nspcc-dev/neofs-sdk-go/version" ) // IsValid checks if Version is not earlier than the genesis version of the NeoFS. -func IsValid(v pkg.Version) bool { +func IsValid(v version.Version) bool { const ( startMajor = 2 startMinor = 7 diff --git a/pkg/core/version/version_test.go b/pkg/core/version/version_test.go index 572448ac4..d0ba68d03 100644 --- a/pkg/core/version/version_test.go +++ b/pkg/core/version/version_test.go @@ -3,15 +3,15 @@ package version_test import ( "testing" - "github.com/nspcc-dev/neofs-api-go/pkg" "github.com/nspcc-dev/neofs-node/pkg/core/version" + versionSDK "github.com/nspcc-dev/neofs-sdk-go/version" "github.com/stretchr/testify/require" ) func TestIsValid(t *testing.T) { - require.True(t, version.IsValid(*pkg.SDKVersion())) + require.True(t, version.IsValid(*versionSDK.Current())) - var v pkg.Version + var v versionSDK.Version for _, item := range []struct { mjr, mnr uint32 diff --git a/pkg/innerring/internal/client/client.go b/pkg/innerring/internal/client/client.go index f55f59534..3f2454063 100644 --- a/pkg/innerring/internal/client/client.go +++ b/pkg/innerring/internal/client/client.go @@ -5,10 +5,10 @@ import ( "crypto/ecdsa" "fmt" - "github.com/nspcc-dev/neofs-api-go/pkg/client" - cid "github.com/nspcc-dev/neofs-api-go/pkg/container/id" - "github.com/nspcc-dev/neofs-api-go/pkg/object" "github.com/nspcc-dev/neofs-node/pkg/services/object_manager/storagegroup" + "github.com/nspcc-dev/neofs-sdk-go/client" + cid "github.com/nspcc-dev/neofs-sdk-go/container/id" + "github.com/nspcc-dev/neofs-sdk-go/object" ) // Client represents NeoFS API client cut down to the needs of a purely IR application. diff --git a/pkg/innerring/internal/client/prm.go b/pkg/innerring/internal/client/prm.go index 0e1c08d19..08dfd57f2 100644 --- a/pkg/innerring/internal/client/prm.go +++ b/pkg/innerring/internal/client/prm.go @@ -3,7 +3,7 @@ package neofsapiclient import ( "context" - "github.com/nspcc-dev/neofs-api-go/pkg/object" + "github.com/nspcc-dev/neofs-sdk-go/object" ) type contextPrm struct { diff --git a/pkg/innerring/processors/audit/process.go b/pkg/innerring/processors/audit/process.go index 998cbac7d..21849e077 100644 --- a/pkg/innerring/processors/audit/process.go +++ b/pkg/innerring/processors/audit/process.go @@ -4,13 +4,13 @@ import ( "context" "encoding/hex" - cid "github.com/nspcc-dev/neofs-api-go/pkg/container/id" - "github.com/nspcc-dev/neofs-api-go/pkg/netmap" - "github.com/nspcc-dev/neofs-api-go/pkg/object" clientcore "github.com/nspcc-dev/neofs-node/pkg/core/client" "github.com/nspcc-dev/neofs-node/pkg/morph/client/container/wrapper" "github.com/nspcc-dev/neofs-node/pkg/services/audit" "github.com/nspcc-dev/neofs-node/pkg/util/rand" + cid "github.com/nspcc-dev/neofs-sdk-go/container/id" + "github.com/nspcc-dev/neofs-sdk-go/netmap" + "github.com/nspcc-dev/neofs-sdk-go/object" "go.uber.org/zap" ) diff --git a/pkg/innerring/processors/audit/processor.go b/pkg/innerring/processors/audit/processor.go index 25dff1924..31261eda2 100644 --- a/pkg/innerring/processors/audit/processor.go +++ b/pkg/innerring/processors/audit/processor.go @@ -7,13 +7,13 @@ import ( "fmt" "time" - cid "github.com/nspcc-dev/neofs-api-go/pkg/container/id" - "github.com/nspcc-dev/neofs-api-go/pkg/object" "github.com/nspcc-dev/neofs-node/pkg/core/client" wrapContainer "github.com/nspcc-dev/neofs-node/pkg/morph/client/container/wrapper" wrapNetmap "github.com/nspcc-dev/neofs-node/pkg/morph/client/netmap/wrapper" "github.com/nspcc-dev/neofs-node/pkg/morph/event" "github.com/nspcc-dev/neofs-node/pkg/services/audit" + cid "github.com/nspcc-dev/neofs-sdk-go/container/id" + "github.com/nspcc-dev/neofs-sdk-go/object" "github.com/panjf2000/ants/v2" "go.uber.org/zap" ) diff --git a/pkg/innerring/processors/audit/scheduler.go b/pkg/innerring/processors/audit/scheduler.go index 76ff0a534..f7d0b9928 100644 --- a/pkg/innerring/processors/audit/scheduler.go +++ b/pkg/innerring/processors/audit/scheduler.go @@ -6,7 +6,7 @@ import ( "sort" "strings" - cid "github.com/nspcc-dev/neofs-api-go/pkg/container/id" + cid "github.com/nspcc-dev/neofs-sdk-go/container/id" "go.uber.org/zap" ) diff --git a/pkg/innerring/processors/audit/scheduler_test.go b/pkg/innerring/processors/audit/scheduler_test.go index ef0cee84f..7dcb010d7 100644 --- a/pkg/innerring/processors/audit/scheduler_test.go +++ b/pkg/innerring/processors/audit/scheduler_test.go @@ -3,9 +3,9 @@ package audit_test import ( "testing" - cid "github.com/nspcc-dev/neofs-api-go/pkg/container/id" - cidtest "github.com/nspcc-dev/neofs-api-go/pkg/container/id/test" "github.com/nspcc-dev/neofs-node/pkg/innerring/processors/audit" + cid "github.com/nspcc-dev/neofs-sdk-go/container/id" + cidtest "github.com/nspcc-dev/neofs-sdk-go/container/id/test" "github.com/stretchr/testify/require" ) @@ -79,7 +79,7 @@ func generateContainers(n int) []*cid.ID { result := make([]*cid.ID, 0, n) for i := 0; i < n; i++ { - result = append(result, cidtest.Generate()) + result = append(result, cidtest.GenerateID()) } return result diff --git a/pkg/innerring/processors/container/common.go b/pkg/innerring/processors/container/common.go index 5a8bc40ae..228746d35 100644 --- a/pkg/innerring/processors/container/common.go +++ b/pkg/innerring/processors/container/common.go @@ -8,9 +8,9 @@ import ( "fmt" "github.com/nspcc-dev/neo-go/pkg/crypto/keys" - cid "github.com/nspcc-dev/neofs-api-go/pkg/container/id" - "github.com/nspcc-dev/neofs-api-go/pkg/owner" - "github.com/nspcc-dev/neofs-api-go/pkg/session" + cid "github.com/nspcc-dev/neofs-sdk-go/container/id" + "github.com/nspcc-dev/neofs-sdk-go/owner" + "github.com/nspcc-dev/neofs-sdk-go/session" ) var ( diff --git a/pkg/innerring/processors/container/process_container.go b/pkg/innerring/processors/container/process_container.go index ad3fe67e9..2d3fe1f38 100644 --- a/pkg/innerring/processors/container/process_container.go +++ b/pkg/innerring/processors/container/process_container.go @@ -8,13 +8,13 @@ import ( "github.com/nspcc-dev/neo-go/pkg/crypto/keys" "github.com/nspcc-dev/neo-go/pkg/network/payload" - containerSDK "github.com/nspcc-dev/neofs-api-go/pkg/container" - cid "github.com/nspcc-dev/neofs-api-go/pkg/container/id" - "github.com/nspcc-dev/neofs-api-go/pkg/session" "github.com/nspcc-dev/neofs-api-go/v2/refs" "github.com/nspcc-dev/neofs-node/pkg/core/container" "github.com/nspcc-dev/neofs-node/pkg/morph/event" containerEvent "github.com/nspcc-dev/neofs-node/pkg/morph/event/container" + containerSDK "github.com/nspcc-dev/neofs-sdk-go/container" + cid "github.com/nspcc-dev/neofs-sdk-go/container/id" + "github.com/nspcc-dev/neofs-sdk-go/session" "go.uber.org/zap" ) diff --git a/pkg/innerring/processors/container/process_eacl.go b/pkg/innerring/processors/container/process_eacl.go index 159018890..c75ae1116 100644 --- a/pkg/innerring/processors/container/process_eacl.go +++ b/pkg/innerring/processors/container/process_eacl.go @@ -7,10 +7,10 @@ import ( "fmt" "github.com/nspcc-dev/neo-go/pkg/crypto/keys" - "github.com/nspcc-dev/neofs-api-go/pkg/acl/eacl" - "github.com/nspcc-dev/neofs-api-go/pkg/session" "github.com/nspcc-dev/neofs-node/pkg/morph/client/container/wrapper" "github.com/nspcc-dev/neofs-node/pkg/morph/event/container" + "github.com/nspcc-dev/neofs-sdk-go/eacl" + "github.com/nspcc-dev/neofs-sdk-go/session" "go.uber.org/zap" ) diff --git a/pkg/innerring/processors/netmap/cleanup_table.go b/pkg/innerring/processors/netmap/cleanup_table.go index a7b88e793..3049f1f67 100644 --- a/pkg/innerring/processors/netmap/cleanup_table.go +++ b/pkg/innerring/processors/netmap/cleanup_table.go @@ -6,7 +6,7 @@ import ( "fmt" "sync" - "github.com/nspcc-dev/neofs-api-go/pkg/netmap" + "github.com/nspcc-dev/neofs-sdk-go/netmap" ) type ( diff --git a/pkg/innerring/processors/netmap/cleanup_table_test.go b/pkg/innerring/processors/netmap/cleanup_table_test.go index 0ba468e9c..773d0f2ac 100644 --- a/pkg/innerring/processors/netmap/cleanup_table_test.go +++ b/pkg/innerring/processors/netmap/cleanup_table_test.go @@ -5,7 +5,7 @@ import ( "testing" "github.com/nspcc-dev/neo-go/pkg/crypto/keys" - "github.com/nspcc-dev/neofs-api-go/pkg/netmap" + "github.com/nspcc-dev/neofs-sdk-go/netmap" "github.com/stretchr/testify/require" ) diff --git a/pkg/innerring/processors/netmap/nodevalidation/locode/calls.go b/pkg/innerring/processors/netmap/nodevalidation/locode/calls.go index d01511709..50df0a6c8 100644 --- a/pkg/innerring/processors/netmap/nodevalidation/locode/calls.go +++ b/pkg/innerring/processors/netmap/nodevalidation/locode/calls.go @@ -4,8 +4,8 @@ import ( "errors" "fmt" - "github.com/nspcc-dev/neofs-api-go/pkg/netmap" "github.com/nspcc-dev/neofs-node/pkg/util/locode" + "github.com/nspcc-dev/neofs-sdk-go/netmap" ) var errMissingRequiredAttr = errors.New("missing required attribute in DB record") diff --git a/pkg/innerring/processors/netmap/nodevalidation/locode/calls_test.go b/pkg/innerring/processors/netmap/nodevalidation/locode/calls_test.go index 3d0df4a91..4ff85ea4a 100644 --- a/pkg/innerring/processors/netmap/nodevalidation/locode/calls_test.go +++ b/pkg/innerring/processors/netmap/nodevalidation/locode/calls_test.go @@ -5,10 +5,10 @@ import ( "fmt" "testing" - "github.com/nspcc-dev/neofs-api-go/pkg/netmap" "github.com/nspcc-dev/neofs-node/pkg/innerring/processors/netmap/nodevalidation/locode" locodestd "github.com/nspcc-dev/neofs-node/pkg/util/locode" locodedb "github.com/nspcc-dev/neofs-node/pkg/util/locode/db" + "github.com/nspcc-dev/neofs-sdk-go/netmap" "github.com/stretchr/testify/require" ) diff --git a/pkg/innerring/processors/netmap/nodevalidation/locode/validator.go b/pkg/innerring/processors/netmap/nodevalidation/locode/validator.go index 6d930a176..206168650 100644 --- a/pkg/innerring/processors/netmap/nodevalidation/locode/validator.go +++ b/pkg/innerring/processors/netmap/nodevalidation/locode/validator.go @@ -1,7 +1,7 @@ package locode import ( - "github.com/nspcc-dev/neofs-api-go/pkg/netmap" + "github.com/nspcc-dev/neofs-sdk-go/netmap" ) // Prm groups the required parameters of the Validator's constructor. diff --git a/pkg/innerring/processors/netmap/nodevalidation/maddress/calls.go b/pkg/innerring/processors/netmap/nodevalidation/maddress/calls.go index 2b99f3b64..4067c83dc 100644 --- a/pkg/innerring/processors/netmap/nodevalidation/maddress/calls.go +++ b/pkg/innerring/processors/netmap/nodevalidation/maddress/calls.go @@ -3,8 +3,8 @@ package maddress import ( "fmt" - "github.com/nspcc-dev/neofs-api-go/pkg/netmap" "github.com/nspcc-dev/neofs-node/pkg/network" + "github.com/nspcc-dev/neofs-sdk-go/netmap" ) // VerifyAndUpdate calls network.VerifyAddress. diff --git a/pkg/innerring/processors/netmap/nodevalidation/validator.go b/pkg/innerring/processors/netmap/nodevalidation/validator.go index 23fa64515..fdb88b927 100644 --- a/pkg/innerring/processors/netmap/nodevalidation/validator.go +++ b/pkg/innerring/processors/netmap/nodevalidation/validator.go @@ -1,8 +1,8 @@ package nodevalidation import ( - apinetmap "github.com/nspcc-dev/neofs-api-go/pkg/netmap" "github.com/nspcc-dev/neofs-node/pkg/innerring/processors/netmap" + apinetmap "github.com/nspcc-dev/neofs-sdk-go/netmap" ) // CompositeValidator wraps `netmap.NodeValidator`s. diff --git a/pkg/innerring/processors/netmap/process_cleanup.go b/pkg/innerring/processors/netmap/process_cleanup.go index 5534fb8b2..7363f21c2 100644 --- a/pkg/innerring/processors/netmap/process_cleanup.go +++ b/pkg/innerring/processors/netmap/process_cleanup.go @@ -2,8 +2,8 @@ package netmap import ( "github.com/nspcc-dev/neo-go/pkg/crypto/keys" - "github.com/nspcc-dev/neofs-api-go/pkg/netmap" netmapEvent "github.com/nspcc-dev/neofs-node/pkg/morph/event/netmap" + "github.com/nspcc-dev/neofs-sdk-go/netmap" "go.uber.org/zap" ) diff --git a/pkg/innerring/processors/netmap/process_peers.go b/pkg/innerring/processors/netmap/process_peers.go index 5b7a48ae5..ad2ddd34d 100644 --- a/pkg/innerring/processors/netmap/process_peers.go +++ b/pkg/innerring/processors/netmap/process_peers.go @@ -5,8 +5,8 @@ import ( "sort" "strings" - "github.com/nspcc-dev/neofs-api-go/pkg/netmap" netmapEvent "github.com/nspcc-dev/neofs-node/pkg/morph/event/netmap" + "github.com/nspcc-dev/neofs-sdk-go/netmap" "go.uber.org/zap" ) diff --git a/pkg/innerring/processors/netmap/processor.go b/pkg/innerring/processors/netmap/processor.go index aa582c327..9d06f6371 100644 --- a/pkg/innerring/processors/netmap/processor.go +++ b/pkg/innerring/processors/netmap/processor.go @@ -5,11 +5,11 @@ import ( "fmt" "github.com/nspcc-dev/neo-go/pkg/core/mempoolevent" - "github.com/nspcc-dev/neofs-api-go/pkg/netmap" container "github.com/nspcc-dev/neofs-node/pkg/morph/client/container/wrapper" nmWrapper "github.com/nspcc-dev/neofs-node/pkg/morph/client/netmap/wrapper" "github.com/nspcc-dev/neofs-node/pkg/morph/event" netmapEvent "github.com/nspcc-dev/neofs-node/pkg/morph/event/netmap" + "github.com/nspcc-dev/neofs-sdk-go/netmap" "github.com/panjf2000/ants/v2" "go.uber.org/zap" ) diff --git a/pkg/innerring/processors/reputation/process_put.go b/pkg/innerring/processors/reputation/process_put.go index 576cbdab1..c558bd043 100644 --- a/pkg/innerring/processors/reputation/process_put.go +++ b/pkg/innerring/processors/reputation/process_put.go @@ -6,10 +6,10 @@ import ( "errors" "fmt" - apireputation "github.com/nspcc-dev/neofs-api-go/pkg/reputation" "github.com/nspcc-dev/neofs-node/pkg/morph/client/reputation/wrapper" reputationEvent "github.com/nspcc-dev/neofs-node/pkg/morph/event/reputation" "github.com/nspcc-dev/neofs-node/pkg/services/reputation" + apireputation "github.com/nspcc-dev/neofs-sdk-go/reputation" "go.uber.org/zap" ) diff --git a/pkg/innerring/processors/settlement/audit/calculate.go b/pkg/innerring/processors/settlement/audit/calculate.go index 84a4cea83..b23396204 100644 --- a/pkg/innerring/processors/settlement/audit/calculate.go +++ b/pkg/innerring/processors/settlement/audit/calculate.go @@ -8,12 +8,12 @@ import ( "math/big" "github.com/nspcc-dev/neo-go/pkg/crypto/keys" - "github.com/nspcc-dev/neofs-api-go/pkg/audit" - cid "github.com/nspcc-dev/neofs-api-go/pkg/container/id" - "github.com/nspcc-dev/neofs-api-go/pkg/object" - "github.com/nspcc-dev/neofs-api-go/pkg/owner" "github.com/nspcc-dev/neofs-node/pkg/innerring/processors/settlement/common" "github.com/nspcc-dev/neofs-node/pkg/util/logger" + "github.com/nspcc-dev/neofs-sdk-go/audit" + cid "github.com/nspcc-dev/neofs-sdk-go/container/id" + "github.com/nspcc-dev/neofs-sdk-go/object" + "github.com/nspcc-dev/neofs-sdk-go/owner" "go.uber.org/zap" ) diff --git a/pkg/innerring/processors/settlement/audit/prm.go b/pkg/innerring/processors/settlement/audit/prm.go index 661473409..4c58d9da3 100644 --- a/pkg/innerring/processors/settlement/audit/prm.go +++ b/pkg/innerring/processors/settlement/audit/prm.go @@ -1,9 +1,9 @@ package audit import ( - "github.com/nspcc-dev/neofs-api-go/pkg/audit" - "github.com/nspcc-dev/neofs-api-go/pkg/object" "github.com/nspcc-dev/neofs-node/pkg/innerring/processors/settlement/common" + "github.com/nspcc-dev/neofs-sdk-go/audit" + "github.com/nspcc-dev/neofs-sdk-go/object" ) // CalculatorPrm groups the parameters of Calculator's constructor. diff --git a/pkg/innerring/processors/settlement/basic/context.go b/pkg/innerring/processors/settlement/basic/context.go index 23e5fa3d3..0a5dbe5d9 100644 --- a/pkg/innerring/processors/settlement/basic/context.go +++ b/pkg/innerring/processors/settlement/basic/context.go @@ -7,9 +7,9 @@ import ( "github.com/mr-tron/base58" "github.com/nspcc-dev/neo-go/pkg/encoding/address" "github.com/nspcc-dev/neo-go/pkg/util" - "github.com/nspcc-dev/neofs-api-go/pkg/owner" "github.com/nspcc-dev/neofs-node/pkg/innerring/processors/settlement/common" "github.com/nspcc-dev/neofs-node/pkg/morph/client/container/wrapper" + "github.com/nspcc-dev/neofs-sdk-go/owner" "go.uber.org/zap" ) diff --git a/pkg/innerring/processors/settlement/common/types.go b/pkg/innerring/processors/settlement/common/types.go index 435dc6bf4..d4dbc0463 100644 --- a/pkg/innerring/processors/settlement/common/types.go +++ b/pkg/innerring/processors/settlement/common/types.go @@ -3,8 +3,8 @@ package common import ( "math/big" - cid "github.com/nspcc-dev/neofs-api-go/pkg/container/id" - "github.com/nspcc-dev/neofs-api-go/pkg/owner" + cid "github.com/nspcc-dev/neofs-sdk-go/container/id" + "github.com/nspcc-dev/neofs-sdk-go/owner" ) // NodeInfo groups the data about the storage node diff --git a/pkg/innerring/processors/settlement/common/util.go b/pkg/innerring/processors/settlement/common/util.go index 2c6efa696..75693df42 100644 --- a/pkg/innerring/processors/settlement/common/util.go +++ b/pkg/innerring/processors/settlement/common/util.go @@ -3,7 +3,7 @@ package common import ( "math/big" - "github.com/nspcc-dev/neofs-api-go/pkg/owner" + "github.com/nspcc-dev/neofs-sdk-go/owner" ) type TransferTable struct { diff --git a/pkg/innerring/rpc.go b/pkg/innerring/rpc.go index 3bebee09d..7f5c6ddc1 100644 --- a/pkg/innerring/rpc.go +++ b/pkg/innerring/rpc.go @@ -6,10 +6,6 @@ import ( "fmt" "time" - "github.com/nspcc-dev/neofs-api-go/pkg/client" - "github.com/nspcc-dev/neofs-api-go/pkg/netmap" - "github.com/nspcc-dev/neofs-api-go/pkg/object" - "github.com/nspcc-dev/neofs-api-go/pkg/storagegroup" clientcore "github.com/nspcc-dev/neofs-node/pkg/core/client" coreObject "github.com/nspcc-dev/neofs-node/pkg/core/object" neofsapiclient "github.com/nspcc-dev/neofs-node/pkg/innerring/internal/client" @@ -17,6 +13,10 @@ import ( "github.com/nspcc-dev/neofs-node/pkg/network/cache" "github.com/nspcc-dev/neofs-node/pkg/services/audit" "github.com/nspcc-dev/neofs-node/pkg/services/object_manager/placement" + "github.com/nspcc-dev/neofs-sdk-go/client" + "github.com/nspcc-dev/neofs-sdk-go/netmap" + "github.com/nspcc-dev/neofs-sdk-go/object" + "github.com/nspcc-dev/neofs-sdk-go/storagegroup" "go.uber.org/zap" ) diff --git a/pkg/innerring/settlement.go b/pkg/innerring/settlement.go index 23dd7e2d6..4038fe970 100644 --- a/pkg/innerring/settlement.go +++ b/pkg/innerring/settlement.go @@ -9,13 +9,6 @@ import ( "math/big" "github.com/nspcc-dev/neo-go/pkg/crypto/keys" - auditAPI "github.com/nspcc-dev/neofs-api-go/pkg/audit" - containerAPI "github.com/nspcc-dev/neofs-api-go/pkg/container" - cid "github.com/nspcc-dev/neofs-api-go/pkg/container/id" - netmapAPI "github.com/nspcc-dev/neofs-api-go/pkg/netmap" - "github.com/nspcc-dev/neofs-api-go/pkg/object" - "github.com/nspcc-dev/neofs-api-go/pkg/owner" - "github.com/nspcc-dev/neofs-api-go/pkg/storagegroup" "github.com/nspcc-dev/neofs-node/pkg/core/container" "github.com/nspcc-dev/neofs-node/pkg/core/netmap" "github.com/nspcc-dev/neofs-node/pkg/innerring/processors/settlement/audit" @@ -25,6 +18,13 @@ import ( balanceClient "github.com/nspcc-dev/neofs-node/pkg/morph/client/balance/wrapper" containerClient "github.com/nspcc-dev/neofs-node/pkg/morph/client/container/wrapper" "github.com/nspcc-dev/neofs-node/pkg/util/logger" + auditAPI "github.com/nspcc-dev/neofs-sdk-go/audit" + containerAPI "github.com/nspcc-dev/neofs-sdk-go/container" + cid "github.com/nspcc-dev/neofs-sdk-go/container/id" + netmapAPI "github.com/nspcc-dev/neofs-sdk-go/netmap" + "github.com/nspcc-dev/neofs-sdk-go/object" + "github.com/nspcc-dev/neofs-sdk-go/owner" + "github.com/nspcc-dev/neofs-sdk-go/storagegroup" "go.uber.org/zap" ) diff --git a/pkg/local_object_storage/blobovnicza/blobovnicza_test.go b/pkg/local_object_storage/blobovnicza/blobovnicza_test.go index 312a01a44..3eaca6af9 100644 --- a/pkg/local_object_storage/blobovnicza/blobovnicza_test.go +++ b/pkg/local_object_storage/blobovnicza/blobovnicza_test.go @@ -8,11 +8,11 @@ import ( "os" "testing" - cidtest "github.com/nspcc-dev/neofs-api-go/pkg/container/id/test" - objectSDK "github.com/nspcc-dev/neofs-api-go/pkg/object" - objecttest "github.com/nspcc-dev/neofs-api-go/pkg/object/test" "github.com/nspcc-dev/neofs-node/pkg/core/object" "github.com/nspcc-dev/neofs-node/pkg/util/logger/test" + cidtest "github.com/nspcc-dev/neofs-sdk-go/container/id/test" + objectSDK "github.com/nspcc-dev/neofs-sdk-go/object" + objecttest "github.com/nspcc-dev/neofs-sdk-go/object/test" "github.com/stretchr/testify/require" ) @@ -28,7 +28,7 @@ func testAddress() *objectSDK.Address { addr := objectSDK.NewAddress() addr.SetObjectID(oid) - addr.SetContainerID(cidtest.Generate()) + addr.SetContainerID(cidtest.GenerateID()) return addr } diff --git a/pkg/local_object_storage/blobovnicza/delete.go b/pkg/local_object_storage/blobovnicza/delete.go index 0100e6517..d98c510c2 100644 --- a/pkg/local_object_storage/blobovnicza/delete.go +++ b/pkg/local_object_storage/blobovnicza/delete.go @@ -1,8 +1,8 @@ package blobovnicza import ( - objectSDK "github.com/nspcc-dev/neofs-api-go/pkg/object" "github.com/nspcc-dev/neofs-node/pkg/core/object" + objectSDK "github.com/nspcc-dev/neofs-sdk-go/object" "go.etcd.io/bbolt" "go.uber.org/zap" ) diff --git a/pkg/local_object_storage/blobovnicza/get.go b/pkg/local_object_storage/blobovnicza/get.go index 66f558068..200621319 100644 --- a/pkg/local_object_storage/blobovnicza/get.go +++ b/pkg/local_object_storage/blobovnicza/get.go @@ -1,8 +1,8 @@ package blobovnicza import ( - objectSDK "github.com/nspcc-dev/neofs-api-go/pkg/object" "github.com/nspcc-dev/neofs-node/pkg/core/object" + objectSDK "github.com/nspcc-dev/neofs-sdk-go/object" "go.etcd.io/bbolt" "go.uber.org/zap" ) diff --git a/pkg/local_object_storage/blobovnicza/get_range.go b/pkg/local_object_storage/blobovnicza/get_range.go index 29c0a873b..e90c7d422 100644 --- a/pkg/local_object_storage/blobovnicza/get_range.go +++ b/pkg/local_object_storage/blobovnicza/get_range.go @@ -3,8 +3,8 @@ package blobovnicza import ( "fmt" - objectSDK "github.com/nspcc-dev/neofs-api-go/pkg/object" "github.com/nspcc-dev/neofs-node/pkg/core/object" + objectSDK "github.com/nspcc-dev/neofs-sdk-go/object" ) // GetRangePrm groups the parameters of GetRange operation. diff --git a/pkg/local_object_storage/blobovnicza/iterate.go b/pkg/local_object_storage/blobovnicza/iterate.go index 9be263102..6ac3c6af5 100644 --- a/pkg/local_object_storage/blobovnicza/iterate.go +++ b/pkg/local_object_storage/blobovnicza/iterate.go @@ -3,7 +3,7 @@ package blobovnicza import ( "fmt" - "github.com/nspcc-dev/neofs-api-go/pkg/object" + "github.com/nspcc-dev/neofs-sdk-go/object" "go.etcd.io/bbolt" ) diff --git a/pkg/local_object_storage/blobovnicza/put.go b/pkg/local_object_storage/blobovnicza/put.go index 5075697f3..1203e1636 100644 --- a/pkg/local_object_storage/blobovnicza/put.go +++ b/pkg/local_object_storage/blobovnicza/put.go @@ -4,7 +4,7 @@ import ( "errors" "fmt" - objectSDK "github.com/nspcc-dev/neofs-api-go/pkg/object" + objectSDK "github.com/nspcc-dev/neofs-sdk-go/object" "go.etcd.io/bbolt" ) diff --git a/pkg/local_object_storage/blobstor/blobovnicza.go b/pkg/local_object_storage/blobstor/blobovnicza.go index c71ddd15d..2e8aad74b 100644 --- a/pkg/local_object_storage/blobstor/blobovnicza.go +++ b/pkg/local_object_storage/blobstor/blobovnicza.go @@ -10,10 +10,10 @@ import ( "github.com/hashicorp/golang-lru/simplelru" "github.com/nspcc-dev/hrw" - objectSDK "github.com/nspcc-dev/neofs-api-go/pkg/object" "github.com/nspcc-dev/neofs-node/pkg/core/object" "github.com/nspcc-dev/neofs-node/pkg/local_object_storage/blobovnicza" storagelog "github.com/nspcc-dev/neofs-node/pkg/local_object_storage/internal/log" + objectSDK "github.com/nspcc-dev/neofs-sdk-go/object" "go.uber.org/zap" ) diff --git a/pkg/local_object_storage/blobstor/blobovnicza_test.go b/pkg/local_object_storage/blobstor/blobovnicza_test.go index 23922aa0b..f341c8084 100644 --- a/pkg/local_object_storage/blobstor/blobovnicza_test.go +++ b/pkg/local_object_storage/blobstor/blobovnicza_test.go @@ -7,10 +7,10 @@ import ( "os" "testing" - cidtest "github.com/nspcc-dev/neofs-api-go/pkg/container/id/test" - objectSDK "github.com/nspcc-dev/neofs-api-go/pkg/object" "github.com/nspcc-dev/neofs-node/pkg/core/object" "github.com/nspcc-dev/neofs-node/pkg/util/logger/test" + cidtest "github.com/nspcc-dev/neofs-sdk-go/container/id/test" + objectSDK "github.com/nspcc-dev/neofs-sdk-go/object" "github.com/stretchr/testify/require" ) @@ -26,7 +26,7 @@ func testAddress() *objectSDK.Address { addr := objectSDK.NewAddress() addr.SetObjectID(oid) - addr.SetContainerID(cidtest.Generate()) + addr.SetContainerID(cidtest.GenerateID()) return addr } diff --git a/pkg/local_object_storage/blobstor/exists.go b/pkg/local_object_storage/blobstor/exists.go index 43b89de7b..c560caf1a 100644 --- a/pkg/local_object_storage/blobstor/exists.go +++ b/pkg/local_object_storage/blobstor/exists.go @@ -3,8 +3,8 @@ package blobstor import ( "errors" - "github.com/nspcc-dev/neofs-api-go/pkg/object" "github.com/nspcc-dev/neofs-node/pkg/local_object_storage/blobstor/fstree" + "github.com/nspcc-dev/neofs-sdk-go/object" ) // ExistsPrm groups the parameters of Exists operation. diff --git a/pkg/local_object_storage/blobstor/fstree/fstree.go b/pkg/local_object_storage/blobstor/fstree/fstree.go index f3bdcfd0c..aff4ebf69 100644 --- a/pkg/local_object_storage/blobstor/fstree/fstree.go +++ b/pkg/local_object_storage/blobstor/fstree/fstree.go @@ -10,9 +10,9 @@ import ( "path/filepath" "strings" - cid "github.com/nspcc-dev/neofs-api-go/pkg/container/id" - objectSDK "github.com/nspcc-dev/neofs-api-go/pkg/object" "github.com/nspcc-dev/neofs-node/pkg/util" + cid "github.com/nspcc-dev/neofs-sdk-go/container/id" + objectSDK "github.com/nspcc-dev/neofs-sdk-go/object" ) // FSTree represents object storage as filesystem tree. diff --git a/pkg/local_object_storage/blobstor/fstree/fstree_test.go b/pkg/local_object_storage/blobstor/fstree/fstree_test.go index a4d73f441..6f08c2866 100644 --- a/pkg/local_object_storage/blobstor/fstree/fstree_test.go +++ b/pkg/local_object_storage/blobstor/fstree/fstree_test.go @@ -8,8 +8,8 @@ import ( "path" "testing" - cidtest "github.com/nspcc-dev/neofs-api-go/pkg/container/id/test" - objectSDK "github.com/nspcc-dev/neofs-api-go/pkg/object" + cidtest "github.com/nspcc-dev/neofs-sdk-go/container/id/test" + objectSDK "github.com/nspcc-dev/neofs-sdk-go/object" "github.com/stretchr/testify/require" ) @@ -26,7 +26,7 @@ func testOID() *objectSDK.ID { func testAddress() *objectSDK.Address { a := objectSDK.NewAddress() a.SetObjectID(testOID()) - a.SetContainerID(cidtest.Generate()) + a.SetContainerID(cidtest.GenerateID()) return a } diff --git a/pkg/local_object_storage/blobstor/iterate.go b/pkg/local_object_storage/blobstor/iterate.go index b35c9cf10..2bbd400ee 100644 --- a/pkg/local_object_storage/blobstor/iterate.go +++ b/pkg/local_object_storage/blobstor/iterate.go @@ -3,9 +3,9 @@ package blobstor import ( "fmt" - objectSDK "github.com/nspcc-dev/neofs-api-go/pkg/object" "github.com/nspcc-dev/neofs-node/pkg/core/object" "github.com/nspcc-dev/neofs-node/pkg/local_object_storage/blobovnicza" + objectSDK "github.com/nspcc-dev/neofs-sdk-go/object" ) // IterationElement represents a unit of elements through which Iterate operation passes. diff --git a/pkg/local_object_storage/blobstor/iterate_test.go b/pkg/local_object_storage/blobstor/iterate_test.go index 2da38aa2a..e300f1b78 100644 --- a/pkg/local_object_storage/blobstor/iterate_test.go +++ b/pkg/local_object_storage/blobstor/iterate_test.go @@ -5,9 +5,9 @@ import ( "os" "testing" - "github.com/nspcc-dev/neofs-api-go/pkg/object" - objecttest "github.com/nspcc-dev/neofs-api-go/pkg/object/test" "github.com/nspcc-dev/neofs-node/pkg/local_object_storage/blobovnicza" + "github.com/nspcc-dev/neofs-sdk-go/object" + objecttest "github.com/nspcc-dev/neofs-sdk-go/object/test" "github.com/stretchr/testify/require" ) diff --git a/pkg/local_object_storage/blobstor/put.go b/pkg/local_object_storage/blobstor/put.go index 40d7b149e..50757344f 100644 --- a/pkg/local_object_storage/blobstor/put.go +++ b/pkg/local_object_storage/blobstor/put.go @@ -3,8 +3,8 @@ package blobstor import ( "fmt" - objectSDK "github.com/nspcc-dev/neofs-api-go/pkg/object" storagelog "github.com/nspcc-dev/neofs-node/pkg/local_object_storage/internal/log" + objectSDK "github.com/nspcc-dev/neofs-sdk-go/object" ) // PutPrm groups the parameters of Put operation. diff --git a/pkg/local_object_storage/blobstor/util.go b/pkg/local_object_storage/blobstor/util.go index 3822afc17..f61a11eb4 100644 --- a/pkg/local_object_storage/blobstor/util.go +++ b/pkg/local_object_storage/blobstor/util.go @@ -1,9 +1,9 @@ package blobstor import ( - objectSDK "github.com/nspcc-dev/neofs-api-go/pkg/object" "github.com/nspcc-dev/neofs-node/pkg/core/object" "github.com/nspcc-dev/neofs-node/pkg/local_object_storage/blobovnicza" + objectSDK "github.com/nspcc-dev/neofs-sdk-go/object" ) type address struct { diff --git a/pkg/local_object_storage/engine/container.go b/pkg/local_object_storage/engine/container.go index 78083ab3a..948084098 100644 --- a/pkg/local_object_storage/engine/container.go +++ b/pkg/local_object_storage/engine/container.go @@ -1,8 +1,8 @@ package engine import ( - cid "github.com/nspcc-dev/neofs-api-go/pkg/container/id" "github.com/nspcc-dev/neofs-node/pkg/local_object_storage/shard" + cid "github.com/nspcc-dev/neofs-sdk-go/container/id" "go.uber.org/zap" ) diff --git a/pkg/local_object_storage/engine/delete.go b/pkg/local_object_storage/engine/delete.go index aa3423b1b..489d480c3 100644 --- a/pkg/local_object_storage/engine/delete.go +++ b/pkg/local_object_storage/engine/delete.go @@ -1,8 +1,8 @@ package engine import ( - objectSDK "github.com/nspcc-dev/neofs-api-go/pkg/object" "github.com/nspcc-dev/neofs-node/pkg/local_object_storage/shard" + objectSDK "github.com/nspcc-dev/neofs-sdk-go/object" "go.uber.org/zap" ) diff --git a/pkg/local_object_storage/engine/engine_test.go b/pkg/local_object_storage/engine/engine_test.go index 9f7c21132..9169df519 100644 --- a/pkg/local_object_storage/engine/engine_test.go +++ b/pkg/local_object_storage/engine/engine_test.go @@ -7,17 +7,18 @@ import ( "sync" "testing" - "github.com/nspcc-dev/neofs-api-go/pkg" - cid "github.com/nspcc-dev/neofs-api-go/pkg/container/id" - objectSDK "github.com/nspcc-dev/neofs-api-go/pkg/object" - "github.com/nspcc-dev/neofs-api-go/pkg/owner" - ownertest "github.com/nspcc-dev/neofs-api-go/pkg/owner/test" "github.com/nspcc-dev/neofs-node/pkg/core/object" "github.com/nspcc-dev/neofs-node/pkg/local_object_storage/blobstor" meta "github.com/nspcc-dev/neofs-node/pkg/local_object_storage/metabase" "github.com/nspcc-dev/neofs-node/pkg/local_object_storage/shard" "github.com/nspcc-dev/neofs-node/pkg/util" "github.com/nspcc-dev/neofs-node/pkg/util/test" + "github.com/nspcc-dev/neofs-sdk-go/checksum" + 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/owner" + ownertest "github.com/nspcc-dev/neofs-sdk-go/owner/test" + "github.com/nspcc-dev/neofs-sdk-go/version" "github.com/nspcc-dev/tzhash/tz" "github.com/panjf2000/ants/v2" "github.com/stretchr/testify/require" @@ -82,22 +83,22 @@ func testOID() *objectSDK.ID { } func generateRawObjectWithCID(t *testing.T, cid *cid.ID) *object.RawObject { - version := pkg.NewVersion() + version := version.New() version.SetMajor(2) version.SetMinor(1) w, err := owner.NEO3WalletFromPublicKey(&test.DecodeKey(-1).PublicKey) require.NoError(t, err) - csum := new(pkg.Checksum) + csum := new(checksum.Checksum) csum.SetSHA256(sha256.Sum256(w.Bytes())) - csumTZ := new(pkg.Checksum) + csumTZ := new(checksum.Checksum) csumTZ.SetTillichZemor(tz.Sum(csum.Sum())) obj := object.NewRaw() obj.SetID(testOID()) - obj.SetOwnerID(ownertest.Generate()) + obj.SetOwnerID(ownertest.GenerateID()) obj.SetContainerID(cid) obj.SetVersion(version) obj.SetPayloadChecksum(csum) diff --git a/pkg/local_object_storage/engine/exists.go b/pkg/local_object_storage/engine/exists.go index 3ff35937a..2f18123fb 100644 --- a/pkg/local_object_storage/engine/exists.go +++ b/pkg/local_object_storage/engine/exists.go @@ -3,9 +3,9 @@ package engine import ( "errors" - objectSDK "github.com/nspcc-dev/neofs-api-go/pkg/object" "github.com/nspcc-dev/neofs-node/pkg/core/object" "github.com/nspcc-dev/neofs-node/pkg/local_object_storage/shard" + objectSDK "github.com/nspcc-dev/neofs-sdk-go/object" "go.uber.org/zap" ) diff --git a/pkg/local_object_storage/engine/get.go b/pkg/local_object_storage/engine/get.go index e37eb2e9f..f83bdfb3e 100644 --- a/pkg/local_object_storage/engine/get.go +++ b/pkg/local_object_storage/engine/get.go @@ -3,10 +3,10 @@ package engine import ( "errors" - objectSDK "github.com/nspcc-dev/neofs-api-go/pkg/object" "github.com/nspcc-dev/neofs-node/pkg/core/object" "github.com/nspcc-dev/neofs-node/pkg/local_object_storage/shard" "github.com/nspcc-dev/neofs-node/pkg/local_object_storage/util" + objectSDK "github.com/nspcc-dev/neofs-sdk-go/object" "go.uber.org/zap" ) diff --git a/pkg/local_object_storage/engine/head.go b/pkg/local_object_storage/engine/head.go index 0e3bf38e8..96f993950 100644 --- a/pkg/local_object_storage/engine/head.go +++ b/pkg/local_object_storage/engine/head.go @@ -3,10 +3,10 @@ package engine import ( "errors" - objectSDK "github.com/nspcc-dev/neofs-api-go/pkg/object" "github.com/nspcc-dev/neofs-node/pkg/core/object" "github.com/nspcc-dev/neofs-node/pkg/local_object_storage/shard" "github.com/nspcc-dev/neofs-node/pkg/local_object_storage/util" + objectSDK "github.com/nspcc-dev/neofs-sdk-go/object" "go.uber.org/zap" ) diff --git a/pkg/local_object_storage/engine/head_test.go b/pkg/local_object_storage/engine/head_test.go index b08fa9cbe..3dec07266 100644 --- a/pkg/local_object_storage/engine/head_test.go +++ b/pkg/local_object_storage/engine/head_test.go @@ -4,16 +4,16 @@ import ( "os" "testing" - cidtest "github.com/nspcc-dev/neofs-api-go/pkg/container/id/test" - objectSDK "github.com/nspcc-dev/neofs-api-go/pkg/object" "github.com/nspcc-dev/neofs-node/pkg/local_object_storage/shard" + cidtest "github.com/nspcc-dev/neofs-sdk-go/container/id/test" + objectSDK "github.com/nspcc-dev/neofs-sdk-go/object" "github.com/stretchr/testify/require" ) func TestHeadRaw(t *testing.T) { defer os.RemoveAll(t.Name()) - cid := cidtest.Generate() + cid := cidtest.GenerateID() splitID := objectSDK.NewSplitID() parent := generateRawObjectWithCID(t, cid) diff --git a/pkg/local_object_storage/engine/inhume.go b/pkg/local_object_storage/engine/inhume.go index a16d84c02..68cfe24a9 100644 --- a/pkg/local_object_storage/engine/inhume.go +++ b/pkg/local_object_storage/engine/inhume.go @@ -4,9 +4,9 @@ import ( "context" "errors" - objectSDK "github.com/nspcc-dev/neofs-api-go/pkg/object" "github.com/nspcc-dev/neofs-node/pkg/core/object" "github.com/nspcc-dev/neofs-node/pkg/local_object_storage/shard" + objectSDK "github.com/nspcc-dev/neofs-sdk-go/object" "go.uber.org/zap" ) diff --git a/pkg/local_object_storage/engine/inhume_test.go b/pkg/local_object_storage/engine/inhume_test.go index 47fa3e980..dcb445248 100644 --- a/pkg/local_object_storage/engine/inhume_test.go +++ b/pkg/local_object_storage/engine/inhume_test.go @@ -4,16 +4,16 @@ import ( "os" "testing" - cidtest "github.com/nspcc-dev/neofs-api-go/pkg/container/id/test" - objectSDK "github.com/nspcc-dev/neofs-api-go/pkg/object" "github.com/nspcc-dev/neofs-node/pkg/local_object_storage/shard" + cidtest "github.com/nspcc-dev/neofs-sdk-go/container/id/test" + objectSDK "github.com/nspcc-dev/neofs-sdk-go/object" "github.com/stretchr/testify/require" ) func TestStorageEngine_Inhume(t *testing.T) { defer os.RemoveAll(t.Name()) - cid := cidtest.Generate() + cid := cidtest.GenerateID() splitID := objectSDK.NewSplitID() fs := objectSDK.SearchFilters{} diff --git a/pkg/local_object_storage/engine/range.go b/pkg/local_object_storage/engine/range.go index 8be165627..585b9978d 100644 --- a/pkg/local_object_storage/engine/range.go +++ b/pkg/local_object_storage/engine/range.go @@ -3,10 +3,10 @@ package engine import ( "errors" - objectSDK "github.com/nspcc-dev/neofs-api-go/pkg/object" "github.com/nspcc-dev/neofs-node/pkg/core/object" "github.com/nspcc-dev/neofs-node/pkg/local_object_storage/shard" "github.com/nspcc-dev/neofs-node/pkg/local_object_storage/util" + objectSDK "github.com/nspcc-dev/neofs-sdk-go/object" "go.uber.org/zap" ) diff --git a/pkg/local_object_storage/engine/select.go b/pkg/local_object_storage/engine/select.go index c221cfe7d..468eb18cf 100644 --- a/pkg/local_object_storage/engine/select.go +++ b/pkg/local_object_storage/engine/select.go @@ -3,10 +3,10 @@ package engine import ( "errors" - cid "github.com/nspcc-dev/neofs-api-go/pkg/container/id" - "github.com/nspcc-dev/neofs-api-go/pkg/object" meta "github.com/nspcc-dev/neofs-node/pkg/local_object_storage/metabase" "github.com/nspcc-dev/neofs-node/pkg/local_object_storage/shard" + cid "github.com/nspcc-dev/neofs-sdk-go/container/id" + "github.com/nspcc-dev/neofs-sdk-go/object" "go.uber.org/zap" ) diff --git a/pkg/local_object_storage/engine/shards.go b/pkg/local_object_storage/engine/shards.go index be8219c37..b43f1723f 100644 --- a/pkg/local_object_storage/engine/shards.go +++ b/pkg/local_object_storage/engine/shards.go @@ -6,8 +6,8 @@ import ( "github.com/google/uuid" "github.com/nspcc-dev/hrw" - "github.com/nspcc-dev/neofs-api-go/pkg/object" "github.com/nspcc-dev/neofs-node/pkg/local_object_storage/shard" + "github.com/nspcc-dev/neofs-sdk-go/object" "github.com/panjf2000/ants/v2" ) diff --git a/pkg/local_object_storage/metabase/containers.go b/pkg/local_object_storage/metabase/containers.go index 6593733f4..876a8a4f2 100644 --- a/pkg/local_object_storage/metabase/containers.go +++ b/pkg/local_object_storage/metabase/containers.go @@ -4,7 +4,7 @@ import ( "encoding/binary" "strings" - cid "github.com/nspcc-dev/neofs-api-go/pkg/container/id" + cid "github.com/nspcc-dev/neofs-sdk-go/container/id" "go.etcd.io/bbolt" ) diff --git a/pkg/local_object_storage/metabase/containers_test.go b/pkg/local_object_storage/metabase/containers_test.go index 1f3df3ab9..2823e4b35 100644 --- a/pkg/local_object_storage/metabase/containers_test.go +++ b/pkg/local_object_storage/metabase/containers_test.go @@ -5,11 +5,11 @@ import ( "sort" "testing" - cid "github.com/nspcc-dev/neofs-api-go/pkg/container/id" - cidtest "github.com/nspcc-dev/neofs-api-go/pkg/container/id/test" - objectSDK "github.com/nspcc-dev/neofs-api-go/pkg/object" "github.com/nspcc-dev/neofs-node/pkg/core/object" meta "github.com/nspcc-dev/neofs-node/pkg/local_object_storage/metabase" + cid "github.com/nspcc-dev/neofs-sdk-go/container/id" + cidtest "github.com/nspcc-dev/neofs-sdk-go/container/id/test" + objectSDK "github.com/nspcc-dev/neofs-sdk-go/object" "github.com/stretchr/testify/require" ) @@ -127,7 +127,7 @@ func TestDB_ContainerSize(t *testing.T) { objs := make(map[*cid.ID][]*object.RawObject, C*N) for i := 0; i < C; i++ { - cid := cidtest.Generate() + cid := cidtest.GenerateID() cids[cid] = 0 for j := 0; j < N; j++ { diff --git a/pkg/local_object_storage/metabase/control_test.go b/pkg/local_object_storage/metabase/control_test.go index a74ab7964..551c94221 100644 --- a/pkg/local_object_storage/metabase/control_test.go +++ b/pkg/local_object_storage/metabase/control_test.go @@ -3,9 +3,9 @@ package meta_test import ( "testing" - objectSDK "github.com/nspcc-dev/neofs-api-go/pkg/object" "github.com/nspcc-dev/neofs-node/pkg/core/object" meta "github.com/nspcc-dev/neofs-node/pkg/local_object_storage/metabase" + objectSDK "github.com/nspcc-dev/neofs-sdk-go/object" "github.com/stretchr/testify/require" ) diff --git a/pkg/local_object_storage/metabase/db.go b/pkg/local_object_storage/metabase/db.go index 29a3b7f75..8fbecfad6 100644 --- a/pkg/local_object_storage/metabase/db.go +++ b/pkg/local_object_storage/metabase/db.go @@ -8,9 +8,9 @@ import ( "strconv" "strings" - "github.com/nspcc-dev/neofs-api-go/pkg/object" v2object "github.com/nspcc-dev/neofs-api-go/v2/object" "github.com/nspcc-dev/neofs-node/pkg/util/logger" + "github.com/nspcc-dev/neofs-sdk-go/object" "go.etcd.io/bbolt" "go.uber.org/zap" ) diff --git a/pkg/local_object_storage/metabase/db_test.go b/pkg/local_object_storage/metabase/db_test.go index c4eb63d90..c3b7e131b 100644 --- a/pkg/local_object_storage/metabase/db_test.go +++ b/pkg/local_object_storage/metabase/db_test.go @@ -6,15 +6,16 @@ import ( "os" "testing" - "github.com/nspcc-dev/neofs-api-go/pkg" - cid "github.com/nspcc-dev/neofs-api-go/pkg/container/id" - cidtest "github.com/nspcc-dev/neofs-api-go/pkg/container/id/test" - objectSDK "github.com/nspcc-dev/neofs-api-go/pkg/object" - "github.com/nspcc-dev/neofs-api-go/pkg/owner" - ownertest "github.com/nspcc-dev/neofs-api-go/pkg/owner/test" "github.com/nspcc-dev/neofs-node/pkg/core/object" meta "github.com/nspcc-dev/neofs-node/pkg/local_object_storage/metabase" "github.com/nspcc-dev/neofs-node/pkg/util/test" + "github.com/nspcc-dev/neofs-sdk-go/checksum" + cid "github.com/nspcc-dev/neofs-sdk-go/container/id" + cidtest "github.com/nspcc-dev/neofs-sdk-go/container/id/test" + objectSDK "github.com/nspcc-dev/neofs-sdk-go/object" + "github.com/nspcc-dev/neofs-sdk-go/owner" + ownertest "github.com/nspcc-dev/neofs-sdk-go/owner/test" + "github.com/nspcc-dev/neofs-sdk-go/version" "github.com/nspcc-dev/tzhash/tz" "github.com/stretchr/testify/require" ) @@ -60,26 +61,26 @@ func newDB(t testing.TB) *meta.DB { } func generateRawObject(t *testing.T) *object.RawObject { - return generateRawObjectWithCID(t, cidtest.Generate()) + return generateRawObjectWithCID(t, cidtest.GenerateID()) } func generateRawObjectWithCID(t *testing.T, cid *cid.ID) *object.RawObject { - version := pkg.NewVersion() + version := version.New() version.SetMajor(2) version.SetMinor(1) w, err := owner.NEO3WalletFromPublicKey(&test.DecodeKey(-1).PublicKey) require.NoError(t, err) - csum := new(pkg.Checksum) + csum := new(checksum.Checksum) csum.SetSHA256(sha256.Sum256(w.Bytes())) - csumTZ := new(pkg.Checksum) + csumTZ := new(checksum.Checksum) csumTZ.SetTillichZemor(tz.Sum(csum.Sum())) obj := object.NewRaw() obj.SetID(testOID()) - obj.SetOwnerID(ownertest.Generate()) + obj.SetOwnerID(ownertest.GenerateID()) obj.SetContainerID(cid) obj.SetVersion(version) obj.SetPayloadChecksum(csum) @@ -91,7 +92,7 @@ func generateRawObjectWithCID(t *testing.T, cid *cid.ID) *object.RawObject { func generateAddress() *objectSDK.Address { addr := objectSDK.NewAddress() - addr.SetContainerID(cidtest.Generate()) + addr.SetContainerID(cidtest.GenerateID()) addr.SetObjectID(testOID()) return addr diff --git a/pkg/local_object_storage/metabase/delete.go b/pkg/local_object_storage/metabase/delete.go index c77ba04e9..cd62f043d 100644 --- a/pkg/local_object_storage/metabase/delete.go +++ b/pkg/local_object_storage/metabase/delete.go @@ -5,8 +5,8 @@ import ( "errors" "fmt" - objectSDK "github.com/nspcc-dev/neofs-api-go/pkg/object" "github.com/nspcc-dev/neofs-node/pkg/core/object" + objectSDK "github.com/nspcc-dev/neofs-sdk-go/object" "go.etcd.io/bbolt" ) diff --git a/pkg/local_object_storage/metabase/delete_test.go b/pkg/local_object_storage/metabase/delete_test.go index 4593b9da6..2b43b95c9 100644 --- a/pkg/local_object_storage/metabase/delete_test.go +++ b/pkg/local_object_storage/metabase/delete_test.go @@ -4,16 +4,16 @@ import ( "errors" "testing" - cidtest "github.com/nspcc-dev/neofs-api-go/pkg/container/id/test" - objectSDK "github.com/nspcc-dev/neofs-api-go/pkg/object" meta "github.com/nspcc-dev/neofs-node/pkg/local_object_storage/metabase" + cidtest "github.com/nspcc-dev/neofs-sdk-go/container/id/test" + objectSDK "github.com/nspcc-dev/neofs-sdk-go/object" "github.com/stretchr/testify/require" ) func TestDB_Delete(t *testing.T) { db := newDB(t) - cid := cidtest.Generate() + cid := cidtest.GenerateID() parent := generateRawObjectWithCID(t, cid) addAttribute(parent, "foo", "bar") @@ -69,7 +69,7 @@ func TestDB_Delete(t *testing.T) { func TestDeleteAllChildren(t *testing.T) { db := newDB(t) - cid := cidtest.Generate() + cid := cidtest.GenerateID() // generate parent object parent := generateRawObjectWithCID(t, cid) diff --git a/pkg/local_object_storage/metabase/exists.go b/pkg/local_object_storage/metabase/exists.go index d975b18b4..8b8b7a396 100644 --- a/pkg/local_object_storage/metabase/exists.go +++ b/pkg/local_object_storage/metabase/exists.go @@ -5,9 +5,9 @@ import ( "errors" "fmt" - cid "github.com/nspcc-dev/neofs-api-go/pkg/container/id" - objectSDK "github.com/nspcc-dev/neofs-api-go/pkg/object" "github.com/nspcc-dev/neofs-node/pkg/core/object" + cid "github.com/nspcc-dev/neofs-sdk-go/container/id" + objectSDK "github.com/nspcc-dev/neofs-sdk-go/object" "go.etcd.io/bbolt" ) diff --git a/pkg/local_object_storage/metabase/exists_test.go b/pkg/local_object_storage/metabase/exists_test.go index 0b08ca83d..589ce1199 100644 --- a/pkg/local_object_storage/metabase/exists_test.go +++ b/pkg/local_object_storage/metabase/exists_test.go @@ -4,9 +4,9 @@ import ( "errors" "testing" - cidtest "github.com/nspcc-dev/neofs-api-go/pkg/container/id/test" - objectSDK "github.com/nspcc-dev/neofs-api-go/pkg/object" meta "github.com/nspcc-dev/neofs-node/pkg/local_object_storage/metabase" + cidtest "github.com/nspcc-dev/neofs-sdk-go/container/id/test" + objectSDK "github.com/nspcc-dev/neofs-sdk-go/object" "github.com/stretchr/testify/require" ) @@ -55,7 +55,7 @@ func TestDB_Exists(t *testing.T) { }) t.Run("virtual object", func(t *testing.T) { - cid := cidtest.Generate() + cid := cidtest.GenerateID() parent := generateRawObjectWithCID(t, cid) child := generateRawObjectWithCID(t, cid) @@ -72,7 +72,7 @@ func TestDB_Exists(t *testing.T) { }) t.Run("merge split info", func(t *testing.T) { - cid := cidtest.Generate() + cid := cidtest.GenerateID() splitID := objectSDK.NewSplitID() parent := generateRawObjectWithCID(t, cid) diff --git a/pkg/local_object_storage/metabase/get.go b/pkg/local_object_storage/metabase/get.go index cd98712fe..57ba264c8 100644 --- a/pkg/local_object_storage/metabase/get.go +++ b/pkg/local_object_storage/metabase/get.go @@ -3,9 +3,9 @@ package meta import ( "fmt" - cid "github.com/nspcc-dev/neofs-api-go/pkg/container/id" - objectSDK "github.com/nspcc-dev/neofs-api-go/pkg/object" "github.com/nspcc-dev/neofs-node/pkg/core/object" + cid "github.com/nspcc-dev/neofs-sdk-go/container/id" + objectSDK "github.com/nspcc-dev/neofs-sdk-go/object" "go.etcd.io/bbolt" ) diff --git a/pkg/local_object_storage/metabase/get_test.go b/pkg/local_object_storage/metabase/get_test.go index 3155dc2ad..c1c7c4d4b 100644 --- a/pkg/local_object_storage/metabase/get_test.go +++ b/pkg/local_object_storage/metabase/get_test.go @@ -4,10 +4,10 @@ import ( "bytes" "testing" - cidtest "github.com/nspcc-dev/neofs-api-go/pkg/container/id/test" - objectSDK "github.com/nspcc-dev/neofs-api-go/pkg/object" "github.com/nspcc-dev/neofs-node/pkg/core/object" meta "github.com/nspcc-dev/neofs-node/pkg/local_object_storage/metabase" + cidtest "github.com/nspcc-dev/neofs-sdk-go/container/id/test" + objectSDK "github.com/nspcc-dev/neofs-sdk-go/object" "github.com/stretchr/testify/require" ) @@ -59,7 +59,7 @@ func TestDB_Get(t *testing.T) { }) t.Run("put virtual object", func(t *testing.T) { - cid := cidtest.Generate() + cid := cidtest.GenerateID() splitID := objectSDK.NewSplitID() parent := generateRawObjectWithCID(t, cid) diff --git a/pkg/local_object_storage/metabase/graveyard.go b/pkg/local_object_storage/metabase/graveyard.go index 0fbe92c99..0262b77da 100644 --- a/pkg/local_object_storage/metabase/graveyard.go +++ b/pkg/local_object_storage/metabase/graveyard.go @@ -5,7 +5,7 @@ import ( "errors" "fmt" - "github.com/nspcc-dev/neofs-api-go/pkg/object" + "github.com/nspcc-dev/neofs-sdk-go/object" "go.etcd.io/bbolt" ) diff --git a/pkg/local_object_storage/metabase/graveyard_test.go b/pkg/local_object_storage/metabase/graveyard_test.go index f854a0177..5542c1da6 100644 --- a/pkg/local_object_storage/metabase/graveyard_test.go +++ b/pkg/local_object_storage/metabase/graveyard_test.go @@ -3,8 +3,8 @@ package meta_test import ( "testing" - "github.com/nspcc-dev/neofs-api-go/pkg/object" meta "github.com/nspcc-dev/neofs-node/pkg/local_object_storage/metabase" + "github.com/nspcc-dev/neofs-sdk-go/object" "github.com/stretchr/testify/require" ) diff --git a/pkg/local_object_storage/metabase/inhume.go b/pkg/local_object_storage/metabase/inhume.go index 90810a333..b97a3f55d 100644 --- a/pkg/local_object_storage/metabase/inhume.go +++ b/pkg/local_object_storage/metabase/inhume.go @@ -5,7 +5,7 @@ import ( "errors" "fmt" - objectSDK "github.com/nspcc-dev/neofs-api-go/pkg/object" + objectSDK "github.com/nspcc-dev/neofs-sdk-go/object" "go.etcd.io/bbolt" ) diff --git a/pkg/local_object_storage/metabase/iterators.go b/pkg/local_object_storage/metabase/iterators.go index 542e8f7d1..23a301d89 100644 --- a/pkg/local_object_storage/metabase/iterators.go +++ b/pkg/local_object_storage/metabase/iterators.go @@ -5,9 +5,9 @@ import ( "fmt" "strconv" - cid "github.com/nspcc-dev/neofs-api-go/pkg/container/id" - "github.com/nspcc-dev/neofs-api-go/pkg/object" objectV2 "github.com/nspcc-dev/neofs-api-go/v2/object" + cid "github.com/nspcc-dev/neofs-sdk-go/container/id" + "github.com/nspcc-dev/neofs-sdk-go/object" "go.etcd.io/bbolt" ) diff --git a/pkg/local_object_storage/metabase/iterators_test.go b/pkg/local_object_storage/metabase/iterators_test.go index 696eafeaf..7a91870a9 100644 --- a/pkg/local_object_storage/metabase/iterators_test.go +++ b/pkg/local_object_storage/metabase/iterators_test.go @@ -4,9 +4,9 @@ import ( "strconv" "testing" - "github.com/nspcc-dev/neofs-api-go/pkg/object" objectV2 "github.com/nspcc-dev/neofs-api-go/v2/object" meta "github.com/nspcc-dev/neofs-node/pkg/local_object_storage/metabase" + "github.com/nspcc-dev/neofs-sdk-go/object" "github.com/stretchr/testify/require" ) diff --git a/pkg/local_object_storage/metabase/movable.go b/pkg/local_object_storage/metabase/movable.go index 3e7867b74..3c9dbab58 100644 --- a/pkg/local_object_storage/metabase/movable.go +++ b/pkg/local_object_storage/metabase/movable.go @@ -3,7 +3,7 @@ package meta import ( "fmt" - objectSDK "github.com/nspcc-dev/neofs-api-go/pkg/object" + objectSDK "github.com/nspcc-dev/neofs-sdk-go/object" "go.etcd.io/bbolt" ) diff --git a/pkg/local_object_storage/metabase/put.go b/pkg/local_object_storage/metabase/put.go index caa43ac59..fb9df1892 100644 --- a/pkg/local_object_storage/metabase/put.go +++ b/pkg/local_object_storage/metabase/put.go @@ -5,10 +5,10 @@ import ( "fmt" "github.com/nspcc-dev/neo-go/pkg/io" - objectSDK "github.com/nspcc-dev/neofs-api-go/pkg/object" "github.com/nspcc-dev/neofs-node/pkg/core/object" "github.com/nspcc-dev/neofs-node/pkg/local_object_storage/blobovnicza" "github.com/nspcc-dev/neofs-node/pkg/local_object_storage/util" + objectSDK "github.com/nspcc-dev/neofs-sdk-go/object" "go.etcd.io/bbolt" ) diff --git a/pkg/local_object_storage/metabase/select.go b/pkg/local_object_storage/metabase/select.go index b11e0d8e3..1d31307d7 100644 --- a/pkg/local_object_storage/metabase/select.go +++ b/pkg/local_object_storage/metabase/select.go @@ -6,9 +6,9 @@ import ( "fmt" "strings" - cid "github.com/nspcc-dev/neofs-api-go/pkg/container/id" - "github.com/nspcc-dev/neofs-api-go/pkg/object" v2object "github.com/nspcc-dev/neofs-api-go/v2/object" + cid "github.com/nspcc-dev/neofs-sdk-go/container/id" + "github.com/nspcc-dev/neofs-sdk-go/object" "go.etcd.io/bbolt" "go.uber.org/zap" ) diff --git a/pkg/local_object_storage/metabase/select_test.go b/pkg/local_object_storage/metabase/select_test.go index 7d5e8817f..7b4200776 100644 --- a/pkg/local_object_storage/metabase/select_test.go +++ b/pkg/local_object_storage/metabase/select_test.go @@ -4,18 +4,18 @@ import ( "encoding/hex" "testing" - "github.com/nspcc-dev/neofs-api-go/pkg" - cidtest "github.com/nspcc-dev/neofs-api-go/pkg/container/id/test" - objectSDK "github.com/nspcc-dev/neofs-api-go/pkg/object" v2object "github.com/nspcc-dev/neofs-api-go/v2/object" meta "github.com/nspcc-dev/neofs-node/pkg/local_object_storage/metabase" + cidtest "github.com/nspcc-dev/neofs-sdk-go/container/id/test" + objectSDK "github.com/nspcc-dev/neofs-sdk-go/object" + "github.com/nspcc-dev/neofs-sdk-go/version" "github.com/stretchr/testify/require" ) func TestDB_SelectUserAttributes(t *testing.T) { db := newDB(t) - cid := cidtest.Generate() + cid := cidtest.GenerateID() raw1 := generateRawObjectWithCID(t, cid) addAttribute(raw1, "foo", "bar") @@ -137,7 +137,7 @@ func TestDB_SelectUserAttributes(t *testing.T) { func TestDB_SelectRootPhyParent(t *testing.T) { db := newDB(t) - cid := cidtest.Generate() + cid := cidtest.GenerateID() // prepare @@ -304,7 +304,7 @@ func TestDB_SelectRootPhyParent(t *testing.T) { func TestDB_SelectInhume(t *testing.T) { db := newDB(t) - cid := cidtest.Generate() + cid := cidtest.GenerateID() raw1 := generateRawObjectWithCID(t, cid) err := putBig(db, raw1.Object()) @@ -336,7 +336,7 @@ func TestDB_SelectInhume(t *testing.T) { func TestDB_SelectPayloadHash(t *testing.T) { db := newDB(t) - cid := cidtest.Generate() + cid := cidtest.GenerateID() raw1 := generateRawObjectWithCID(t, cid) err := putBig(db, raw1.Object()) @@ -371,12 +371,12 @@ func TestDB_SelectPayloadHash(t *testing.T) { func TestDB_SelectWithSlowFilters(t *testing.T) { db := newDB(t) - cid := cidtest.Generate() + cid := cidtest.GenerateID() - v20 := new(pkg.Version) + v20 := new(version.Version) v20.SetMajor(2) - v21 := new(pkg.Version) + v21 := new(version.Version) v21.SetMajor(2) v21.SetMinor(1) @@ -469,7 +469,7 @@ func TestDB_SelectWithSlowFilters(t *testing.T) { func TestDB_SelectObjectID(t *testing.T) { db := newDB(t) - cid := cidtest.Generate() + cid := cidtest.GenerateID() // prepare @@ -577,7 +577,7 @@ func TestDB_SelectObjectID(t *testing.T) { func TestDB_SelectSplitID(t *testing.T) { db := newDB(t) - cid := cidtest.Generate() + cid := cidtest.GenerateID() child1 := generateRawObjectWithCID(t, cid) child2 := generateRawObjectWithCID(t, cid) @@ -631,7 +631,7 @@ func TestDB_SelectSplitID(t *testing.T) { func TestDB_SelectContainerID(t *testing.T) { db := newDB(t) - cid := cidtest.Generate() + cid := cidtest.GenerateID() obj1 := generateRawObjectWithCID(t, cid) err := putBig(db, obj1.Object()) @@ -665,7 +665,7 @@ func TestDB_SelectContainerID(t *testing.T) { }) t.Run("not same cid", func(t *testing.T) { - newCID := cidtest.Generate() + newCID := cidtest.GenerateID() fs := objectSDK.SearchFilters{} fs.AddObjectContainerIDFilter(objectSDK.MatchStringEqual, newCID) diff --git a/pkg/local_object_storage/metabase/small.go b/pkg/local_object_storage/metabase/small.go index c9f7c8eef..48b73462a 100644 --- a/pkg/local_object_storage/metabase/small.go +++ b/pkg/local_object_storage/metabase/small.go @@ -1,8 +1,8 @@ package meta import ( - objectSDK "github.com/nspcc-dev/neofs-api-go/pkg/object" "github.com/nspcc-dev/neofs-node/pkg/local_object_storage/blobovnicza" + objectSDK "github.com/nspcc-dev/neofs-sdk-go/object" "go.etcd.io/bbolt" ) diff --git a/pkg/local_object_storage/metabase/util.go b/pkg/local_object_storage/metabase/util.go index 33ce879a5..525d9e004 100644 --- a/pkg/local_object_storage/metabase/util.go +++ b/pkg/local_object_storage/metabase/util.go @@ -4,8 +4,8 @@ import ( "bytes" "strings" - cid "github.com/nspcc-dev/neofs-api-go/pkg/container/id" - "github.com/nspcc-dev/neofs-api-go/pkg/object" + cid "github.com/nspcc-dev/neofs-sdk-go/container/id" + "github.com/nspcc-dev/neofs-sdk-go/object" "go.etcd.io/bbolt" ) diff --git a/pkg/local_object_storage/shard/container.go b/pkg/local_object_storage/shard/container.go index 11e89d725..bcdba9c80 100644 --- a/pkg/local_object_storage/shard/container.go +++ b/pkg/local_object_storage/shard/container.go @@ -3,7 +3,7 @@ package shard import ( "fmt" - cid "github.com/nspcc-dev/neofs-api-go/pkg/container/id" + cid "github.com/nspcc-dev/neofs-sdk-go/container/id" ) type ContainerSizePrm struct { diff --git a/pkg/local_object_storage/shard/control.go b/pkg/local_object_storage/shard/control.go index 678f5773d..86ecc4069 100644 --- a/pkg/local_object_storage/shard/control.go +++ b/pkg/local_object_storage/shard/control.go @@ -4,11 +4,11 @@ import ( "errors" "fmt" - objectSDK "github.com/nspcc-dev/neofs-api-go/pkg/object" "github.com/nspcc-dev/neofs-node/pkg/core/object" "github.com/nspcc-dev/neofs-node/pkg/local_object_storage/blobovnicza" "github.com/nspcc-dev/neofs-node/pkg/local_object_storage/blobstor" meta "github.com/nspcc-dev/neofs-node/pkg/local_object_storage/metabase" + objectSDK "github.com/nspcc-dev/neofs-sdk-go/object" ) // Open opens all Shard's components. diff --git a/pkg/local_object_storage/shard/control_test.go b/pkg/local_object_storage/shard/control_test.go index 5288caff1..e2a3d902b 100644 --- a/pkg/local_object_storage/shard/control_test.go +++ b/pkg/local_object_storage/shard/control_test.go @@ -5,11 +5,11 @@ import ( "path" "testing" - objectSDK "github.com/nspcc-dev/neofs-api-go/pkg/object" - objecttest "github.com/nspcc-dev/neofs-api-go/pkg/object/test" "github.com/nspcc-dev/neofs-node/pkg/core/object" "github.com/nspcc-dev/neofs-node/pkg/local_object_storage/blobstor" meta "github.com/nspcc-dev/neofs-node/pkg/local_object_storage/metabase" + objectSDK "github.com/nspcc-dev/neofs-sdk-go/object" + objecttest "github.com/nspcc-dev/neofs-sdk-go/object/test" "github.com/stretchr/testify/require" ) diff --git a/pkg/local_object_storage/shard/delete.go b/pkg/local_object_storage/shard/delete.go index ef673d215..025b90380 100644 --- a/pkg/local_object_storage/shard/delete.go +++ b/pkg/local_object_storage/shard/delete.go @@ -3,11 +3,11 @@ package shard import ( "errors" - objectSDK "github.com/nspcc-dev/neofs-api-go/pkg/object" "github.com/nspcc-dev/neofs-node/pkg/core/object" "github.com/nspcc-dev/neofs-node/pkg/local_object_storage/blobovnicza" "github.com/nspcc-dev/neofs-node/pkg/local_object_storage/blobstor" meta "github.com/nspcc-dev/neofs-node/pkg/local_object_storage/metabase" + objectSDK "github.com/nspcc-dev/neofs-sdk-go/object" "go.uber.org/zap" ) diff --git a/pkg/local_object_storage/shard/delete_test.go b/pkg/local_object_storage/shard/delete_test.go index 053db63db..e3306ed57 100644 --- a/pkg/local_object_storage/shard/delete_test.go +++ b/pkg/local_object_storage/shard/delete_test.go @@ -3,9 +3,9 @@ package shard_test import ( "testing" - cidtest "github.com/nspcc-dev/neofs-api-go/pkg/container/id/test" "github.com/nspcc-dev/neofs-node/pkg/core/object" "github.com/nspcc-dev/neofs-node/pkg/local_object_storage/shard" + cidtest "github.com/nspcc-dev/neofs-sdk-go/container/id/test" "github.com/stretchr/testify/require" ) @@ -23,7 +23,7 @@ func testShardDelete(t *testing.T, hasWriteCache bool) { sh := newShard(t, hasWriteCache) defer releaseShard(sh, t) - cid := cidtest.Generate() + cid := cidtest.GenerateID() obj := generateRawObjectWithCID(t, cid) addAttribute(obj, "foo", "bar") diff --git a/pkg/local_object_storage/shard/exists.go b/pkg/local_object_storage/shard/exists.go index 4fe5a855d..09dd6e525 100644 --- a/pkg/local_object_storage/shard/exists.go +++ b/pkg/local_object_storage/shard/exists.go @@ -1,8 +1,8 @@ package shard import ( - "github.com/nspcc-dev/neofs-api-go/pkg/object" meta "github.com/nspcc-dev/neofs-node/pkg/local_object_storage/metabase" + "github.com/nspcc-dev/neofs-sdk-go/object" ) // ExistsPrm groups the parameters of Exists operation. diff --git a/pkg/local_object_storage/shard/gc.go b/pkg/local_object_storage/shard/gc.go index 4a3666a76..336198ac3 100644 --- a/pkg/local_object_storage/shard/gc.go +++ b/pkg/local_object_storage/shard/gc.go @@ -5,10 +5,10 @@ import ( "sync" "time" - "github.com/nspcc-dev/neofs-api-go/pkg/object" meta "github.com/nspcc-dev/neofs-node/pkg/local_object_storage/metabase" "github.com/nspcc-dev/neofs-node/pkg/util" "github.com/nspcc-dev/neofs-node/pkg/util/logger" + "github.com/nspcc-dev/neofs-sdk-go/object" "go.uber.org/zap" ) diff --git a/pkg/local_object_storage/shard/get.go b/pkg/local_object_storage/shard/get.go index 2576d2739..383799fc3 100644 --- a/pkg/local_object_storage/shard/get.go +++ b/pkg/local_object_storage/shard/get.go @@ -4,11 +4,11 @@ import ( "errors" "fmt" - objectSDK "github.com/nspcc-dev/neofs-api-go/pkg/object" "github.com/nspcc-dev/neofs-node/pkg/core/object" "github.com/nspcc-dev/neofs-node/pkg/local_object_storage/blobovnicza" "github.com/nspcc-dev/neofs-node/pkg/local_object_storage/blobstor" meta "github.com/nspcc-dev/neofs-node/pkg/local_object_storage/metabase" + objectSDK "github.com/nspcc-dev/neofs-sdk-go/object" "go.uber.org/zap" ) diff --git a/pkg/local_object_storage/shard/get_test.go b/pkg/local_object_storage/shard/get_test.go index 5778256a9..d92dfce92 100644 --- a/pkg/local_object_storage/shard/get_test.go +++ b/pkg/local_object_storage/shard/get_test.go @@ -6,10 +6,10 @@ import ( "testing" "time" - cidtest "github.com/nspcc-dev/neofs-api-go/pkg/container/id/test" - objectSDK "github.com/nspcc-dev/neofs-api-go/pkg/object" "github.com/nspcc-dev/neofs-node/pkg/core/object" "github.com/nspcc-dev/neofs-node/pkg/local_object_storage/shard" + cidtest "github.com/nspcc-dev/neofs-sdk-go/container/id/test" + objectSDK "github.com/nspcc-dev/neofs-sdk-go/object" "github.com/stretchr/testify/require" ) @@ -68,7 +68,7 @@ func testShardGet(t *testing.T, hasWriteCache bool) { t.Run("parent object", func(t *testing.T) { obj := generateRawObject(t) addAttribute(obj, "foo", "bar") - cid := cidtest.Generate() + cid := cidtest.GenerateID() splitID := objectSDK.NewSplitID() parent := generateRawObjectWithCID(t, cid) diff --git a/pkg/local_object_storage/shard/head.go b/pkg/local_object_storage/shard/head.go index 5528a300d..8bbaf2578 100644 --- a/pkg/local_object_storage/shard/head.go +++ b/pkg/local_object_storage/shard/head.go @@ -4,9 +4,9 @@ import ( "errors" "fmt" - objectSDK "github.com/nspcc-dev/neofs-api-go/pkg/object" "github.com/nspcc-dev/neofs-node/pkg/core/object" meta "github.com/nspcc-dev/neofs-node/pkg/local_object_storage/metabase" + objectSDK "github.com/nspcc-dev/neofs-sdk-go/object" ) // HeadPrm groups the parameters of Head operation. diff --git a/pkg/local_object_storage/shard/head_test.go b/pkg/local_object_storage/shard/head_test.go index 0d7516633..36dff11db 100644 --- a/pkg/local_object_storage/shard/head_test.go +++ b/pkg/local_object_storage/shard/head_test.go @@ -5,10 +5,10 @@ import ( "testing" "time" - cidtest "github.com/nspcc-dev/neofs-api-go/pkg/container/id/test" - objectSDK "github.com/nspcc-dev/neofs-api-go/pkg/object" "github.com/nspcc-dev/neofs-node/pkg/core/object" "github.com/nspcc-dev/neofs-node/pkg/local_object_storage/shard" + cidtest "github.com/nspcc-dev/neofs-sdk-go/container/id/test" + objectSDK "github.com/nspcc-dev/neofs-sdk-go/object" "github.com/stretchr/testify/require" ) @@ -46,7 +46,7 @@ func testShardHead(t *testing.T, hasWriteCache bool) { }) t.Run("virtual object", func(t *testing.T) { - cid := cidtest.Generate() + cid := cidtest.GenerateID() splitID := objectSDK.NewSplitID() parent := generateRawObjectWithCID(t, cid) diff --git a/pkg/local_object_storage/shard/inhume.go b/pkg/local_object_storage/shard/inhume.go index ae5b979a2..099de855f 100644 --- a/pkg/local_object_storage/shard/inhume.go +++ b/pkg/local_object_storage/shard/inhume.go @@ -1,8 +1,8 @@ package shard import ( - objectSDK "github.com/nspcc-dev/neofs-api-go/pkg/object" meta "github.com/nspcc-dev/neofs-node/pkg/local_object_storage/metabase" + objectSDK "github.com/nspcc-dev/neofs-sdk-go/object" "go.uber.org/zap" ) diff --git a/pkg/local_object_storage/shard/inhume_test.go b/pkg/local_object_storage/shard/inhume_test.go index c99e20355..613678256 100644 --- a/pkg/local_object_storage/shard/inhume_test.go +++ b/pkg/local_object_storage/shard/inhume_test.go @@ -3,9 +3,9 @@ package shard_test import ( "testing" - cidtest "github.com/nspcc-dev/neofs-api-go/pkg/container/id/test" "github.com/nspcc-dev/neofs-node/pkg/core/object" "github.com/nspcc-dev/neofs-node/pkg/local_object_storage/shard" + cidtest "github.com/nspcc-dev/neofs-sdk-go/container/id/test" "github.com/stretchr/testify/require" ) @@ -23,7 +23,7 @@ func testShardInhume(t *testing.T, hasWriteCache bool) { sh := newShard(t, hasWriteCache) defer releaseShard(sh, t) - cid := cidtest.Generate() + cid := cidtest.GenerateID() obj := generateRawObjectWithCID(t, cid) addAttribute(obj, "foo", "bar") diff --git a/pkg/local_object_storage/shard/list.go b/pkg/local_object_storage/shard/list.go index c9f906909..98dc4747a 100644 --- a/pkg/local_object_storage/shard/list.go +++ b/pkg/local_object_storage/shard/list.go @@ -3,9 +3,9 @@ package shard import ( "fmt" - cid "github.com/nspcc-dev/neofs-api-go/pkg/container/id" - "github.com/nspcc-dev/neofs-api-go/pkg/object" meta "github.com/nspcc-dev/neofs-node/pkg/local_object_storage/metabase" + cid "github.com/nspcc-dev/neofs-sdk-go/container/id" + "github.com/nspcc-dev/neofs-sdk-go/object" "go.uber.org/zap" ) diff --git a/pkg/local_object_storage/shard/list_test.go b/pkg/local_object_storage/shard/list_test.go index 04aee5a6f..49c889543 100644 --- a/pkg/local_object_storage/shard/list_test.go +++ b/pkg/local_object_storage/shard/list_test.go @@ -3,8 +3,8 @@ package shard_test import ( "testing" - cidtest "github.com/nspcc-dev/neofs-api-go/pkg/container/id/test" "github.com/nspcc-dev/neofs-node/pkg/local_object_storage/shard" + cidtest "github.com/nspcc-dev/neofs-sdk-go/container/id/test" "github.com/stretchr/testify/require" ) @@ -34,7 +34,7 @@ func testShardList(t *testing.T, sh *shard.Shard) { putPrm := new(shard.PutPrm) for i := 0; i < C; i++ { - cid := cidtest.Generate() + cid := cidtest.GenerateID() for j := 0; j < N; j++ { obj := generateRawObjectWithCID(t, cid) diff --git a/pkg/local_object_storage/shard/move.go b/pkg/local_object_storage/shard/move.go index 421b7e22c..d454a31d5 100644 --- a/pkg/local_object_storage/shard/move.go +++ b/pkg/local_object_storage/shard/move.go @@ -1,8 +1,8 @@ package shard import ( - objectSDK "github.com/nspcc-dev/neofs-api-go/pkg/object" meta "github.com/nspcc-dev/neofs-node/pkg/local_object_storage/metabase" + objectSDK "github.com/nspcc-dev/neofs-sdk-go/object" "go.uber.org/zap" ) diff --git a/pkg/local_object_storage/shard/range.go b/pkg/local_object_storage/shard/range.go index 2b4d03a69..abc4a5331 100644 --- a/pkg/local_object_storage/shard/range.go +++ b/pkg/local_object_storage/shard/range.go @@ -1,10 +1,10 @@ package shard import ( - objectSDK "github.com/nspcc-dev/neofs-api-go/pkg/object" "github.com/nspcc-dev/neofs-node/pkg/core/object" "github.com/nspcc-dev/neofs-node/pkg/local_object_storage/blobovnicza" "github.com/nspcc-dev/neofs-node/pkg/local_object_storage/blobstor" + objectSDK "github.com/nspcc-dev/neofs-sdk-go/object" ) // RngPrm groups the parameters of GetRange operation. diff --git a/pkg/local_object_storage/shard/select.go b/pkg/local_object_storage/shard/select.go index 7bd6c8703..1fe9d6571 100644 --- a/pkg/local_object_storage/shard/select.go +++ b/pkg/local_object_storage/shard/select.go @@ -3,9 +3,9 @@ package shard import ( "fmt" - cid "github.com/nspcc-dev/neofs-api-go/pkg/container/id" - objectSDK "github.com/nspcc-dev/neofs-api-go/pkg/object" meta "github.com/nspcc-dev/neofs-node/pkg/local_object_storage/metabase" + cid "github.com/nspcc-dev/neofs-sdk-go/container/id" + objectSDK "github.com/nspcc-dev/neofs-sdk-go/object" ) // SelectPrm groups the parameters of Select operation. diff --git a/pkg/local_object_storage/shard/shard.go b/pkg/local_object_storage/shard/shard.go index b851cca10..d4ca6768d 100644 --- a/pkg/local_object_storage/shard/shard.go +++ b/pkg/local_object_storage/shard/shard.go @@ -4,12 +4,12 @@ import ( "context" "time" - "github.com/nspcc-dev/neofs-api-go/pkg/object" "github.com/nspcc-dev/neofs-node/pkg/local_object_storage/blobstor" meta "github.com/nspcc-dev/neofs-node/pkg/local_object_storage/metabase" "github.com/nspcc-dev/neofs-node/pkg/local_object_storage/writecache" "github.com/nspcc-dev/neofs-node/pkg/util" "github.com/nspcc-dev/neofs-node/pkg/util/logger" + "github.com/nspcc-dev/neofs-sdk-go/object" "go.uber.org/atomic" "go.uber.org/zap" ) diff --git a/pkg/local_object_storage/shard/shard_test.go b/pkg/local_object_storage/shard/shard_test.go index a5bfb1b9a..fcd6927a9 100644 --- a/pkg/local_object_storage/shard/shard_test.go +++ b/pkg/local_object_storage/shard/shard_test.go @@ -7,18 +7,19 @@ import ( "path" "testing" - "github.com/nspcc-dev/neofs-api-go/pkg" - cid "github.com/nspcc-dev/neofs-api-go/pkg/container/id" - cidtest "github.com/nspcc-dev/neofs-api-go/pkg/container/id/test" - objectSDK "github.com/nspcc-dev/neofs-api-go/pkg/object" - "github.com/nspcc-dev/neofs-api-go/pkg/owner" - ownertest "github.com/nspcc-dev/neofs-api-go/pkg/owner/test" "github.com/nspcc-dev/neofs-node/pkg/core/object" "github.com/nspcc-dev/neofs-node/pkg/local_object_storage/blobstor" meta "github.com/nspcc-dev/neofs-node/pkg/local_object_storage/metabase" "github.com/nspcc-dev/neofs-node/pkg/local_object_storage/shard" "github.com/nspcc-dev/neofs-node/pkg/local_object_storage/writecache" "github.com/nspcc-dev/neofs-node/pkg/util/test" + "github.com/nspcc-dev/neofs-sdk-go/checksum" + cid "github.com/nspcc-dev/neofs-sdk-go/container/id" + cidtest "github.com/nspcc-dev/neofs-sdk-go/container/id/test" + objectSDK "github.com/nspcc-dev/neofs-sdk-go/object" + "github.com/nspcc-dev/neofs-sdk-go/owner" + ownertest "github.com/nspcc-dev/neofs-sdk-go/owner/test" + "github.com/nspcc-dev/neofs-sdk-go/version" "github.com/nspcc-dev/tzhash/tz" "github.com/stretchr/testify/require" "go.uber.org/zap" @@ -63,26 +64,26 @@ func releaseShard(s *shard.Shard, t testing.TB) { } func generateRawObject(t *testing.T) *object.RawObject { - return generateRawObjectWithCID(t, cidtest.Generate()) + return generateRawObjectWithCID(t, cidtest.GenerateID()) } func generateRawObjectWithCID(t *testing.T, cid *cid.ID) *object.RawObject { - version := pkg.NewVersion() + version := version.New() version.SetMajor(2) version.SetMinor(1) w, err := owner.NEO3WalletFromPublicKey(&test.DecodeKey(-1).PublicKey) require.NoError(t, err) - csum := new(pkg.Checksum) + csum := new(checksum.Checksum) csum.SetSHA256(sha256.Sum256(w.Bytes())) - csumTZ := new(pkg.Checksum) + csumTZ := new(checksum.Checksum) csumTZ.SetTillichZemor(tz.Sum(csum.Sum())) obj := object.NewRaw() obj.SetID(generateOID()) - obj.SetOwnerID(ownertest.Generate()) + obj.SetOwnerID(ownertest.GenerateID()) obj.SetContainerID(cid) obj.SetVersion(version) obj.SetPayloadChecksum(csum) diff --git a/pkg/local_object_storage/util/splitinfo.go b/pkg/local_object_storage/util/splitinfo.go index f17fc0794..4ad1eb4d1 100644 --- a/pkg/local_object_storage/util/splitinfo.go +++ b/pkg/local_object_storage/util/splitinfo.go @@ -1,7 +1,7 @@ package util import ( - objectSDK "github.com/nspcc-dev/neofs-api-go/pkg/object" + objectSDK "github.com/nspcc-dev/neofs-sdk-go/object" ) // MergeSplitInfo ignores conflicts and rewrites `to` with non empty values diff --git a/pkg/local_object_storage/util/splitinfo_test.go b/pkg/local_object_storage/util/splitinfo_test.go index 51bb84d58..638933d40 100644 --- a/pkg/local_object_storage/util/splitinfo_test.go +++ b/pkg/local_object_storage/util/splitinfo_test.go @@ -5,8 +5,8 @@ import ( "testing" "github.com/google/uuid" - "github.com/nspcc-dev/neofs-api-go/pkg/object" "github.com/nspcc-dev/neofs-node/pkg/local_object_storage/util" + "github.com/nspcc-dev/neofs-sdk-go/object" "github.com/stretchr/testify/require" ) diff --git a/pkg/local_object_storage/writecache/delete.go b/pkg/local_object_storage/writecache/delete.go index 838cf7f28..36281372f 100644 --- a/pkg/local_object_storage/writecache/delete.go +++ b/pkg/local_object_storage/writecache/delete.go @@ -3,10 +3,10 @@ package writecache import ( "errors" - objectSDK "github.com/nspcc-dev/neofs-api-go/pkg/object" "github.com/nspcc-dev/neofs-node/pkg/core/object" "github.com/nspcc-dev/neofs-node/pkg/local_object_storage/blobstor/fstree" storagelog "github.com/nspcc-dev/neofs-node/pkg/local_object_storage/internal/log" + objectSDK "github.com/nspcc-dev/neofs-sdk-go/object" "go.etcd.io/bbolt" ) diff --git a/pkg/local_object_storage/writecache/flush.go b/pkg/local_object_storage/writecache/flush.go index 8b682a465..5b8333b5b 100644 --- a/pkg/local_object_storage/writecache/flush.go +++ b/pkg/local_object_storage/writecache/flush.go @@ -5,11 +5,11 @@ import ( "time" "github.com/mr-tron/base58" - objectSDK "github.com/nspcc-dev/neofs-api-go/pkg/object" "github.com/nspcc-dev/neofs-node/pkg/core/object" "github.com/nspcc-dev/neofs-node/pkg/local_object_storage/blobovnicza" "github.com/nspcc-dev/neofs-node/pkg/local_object_storage/blobstor" meta "github.com/nspcc-dev/neofs-node/pkg/local_object_storage/metabase" + objectSDK "github.com/nspcc-dev/neofs-sdk-go/object" "go.etcd.io/bbolt" "go.uber.org/zap" ) diff --git a/pkg/local_object_storage/writecache/get.go b/pkg/local_object_storage/writecache/get.go index d93eee45e..164e2e61a 100644 --- a/pkg/local_object_storage/writecache/get.go +++ b/pkg/local_object_storage/writecache/get.go @@ -1,8 +1,8 @@ package writecache import ( - objectSDK "github.com/nspcc-dev/neofs-api-go/pkg/object" "github.com/nspcc-dev/neofs-node/pkg/core/object" + objectSDK "github.com/nspcc-dev/neofs-sdk-go/object" "go.etcd.io/bbolt" ) diff --git a/pkg/local_object_storage/writecache/iterate.go b/pkg/local_object_storage/writecache/iterate.go index 9273b9527..cfa2518cb 100644 --- a/pkg/local_object_storage/writecache/iterate.go +++ b/pkg/local_object_storage/writecache/iterate.go @@ -4,7 +4,7 @@ import ( "errors" "fmt" - "github.com/nspcc-dev/neofs-api-go/pkg/object" + "github.com/nspcc-dev/neofs-sdk-go/object" "go.etcd.io/bbolt" ) diff --git a/pkg/local_object_storage/writecache/put.go b/pkg/local_object_storage/writecache/put.go index cfe0b0e7d..f2dc39e8d 100644 --- a/pkg/local_object_storage/writecache/put.go +++ b/pkg/local_object_storage/writecache/put.go @@ -17,7 +17,7 @@ func (c *cache) Put(o *object.Object) error { return ErrBigObject } - data, err := o.Marshal(nil) + data, err := o.Marshal() if err != nil { return err } diff --git a/pkg/local_object_storage/writecache/storage.go b/pkg/local_object_storage/writecache/storage.go index 51d3fea21..350c2a795 100644 --- a/pkg/local_object_storage/writecache/storage.go +++ b/pkg/local_object_storage/writecache/storage.go @@ -7,11 +7,11 @@ import ( lru "github.com/hashicorp/golang-lru" "github.com/hashicorp/golang-lru/simplelru" - objectSDK "github.com/nspcc-dev/neofs-api-go/pkg/object" "github.com/nspcc-dev/neofs-node/pkg/core/object" "github.com/nspcc-dev/neofs-node/pkg/local_object_storage/blobstor/fstree" storagelog "github.com/nspcc-dev/neofs-node/pkg/local_object_storage/internal/log" "github.com/nspcc-dev/neofs-node/pkg/util" + objectSDK "github.com/nspcc-dev/neofs-sdk-go/object" "go.etcd.io/bbolt" "go.uber.org/zap" ) diff --git a/pkg/local_object_storage/writecache/writecache.go b/pkg/local_object_storage/writecache/writecache.go index 03f873c43..dfbaaf707 100644 --- a/pkg/local_object_storage/writecache/writecache.go +++ b/pkg/local_object_storage/writecache/writecache.go @@ -3,9 +3,9 @@ package writecache import ( "sync" - objectSDK "github.com/nspcc-dev/neofs-api-go/pkg/object" "github.com/nspcc-dev/neofs-node/pkg/core/object" "github.com/nspcc-dev/neofs-node/pkg/local_object_storage/blobstor/fstree" + objectSDK "github.com/nspcc-dev/neofs-sdk-go/object" "go.uber.org/zap" ) diff --git a/pkg/morph/client/audit/wrapper/result.go b/pkg/morph/client/audit/wrapper/result.go index 57c610977..0b947aefd 100644 --- a/pkg/morph/client/audit/wrapper/result.go +++ b/pkg/morph/client/audit/wrapper/result.go @@ -4,9 +4,9 @@ import ( "errors" "fmt" - auditAPI "github.com/nspcc-dev/neofs-api-go/pkg/audit" - cid "github.com/nspcc-dev/neofs-api-go/pkg/container/id" "github.com/nspcc-dev/neofs-node/pkg/morph/client/audit" + auditAPI "github.com/nspcc-dev/neofs-sdk-go/audit" + cid "github.com/nspcc-dev/neofs-sdk-go/container/id" ) // ResultID is an identity of audit result inside audit contract. diff --git a/pkg/morph/client/audit/wrapper/result_test.go b/pkg/morph/client/audit/wrapper/result_test.go index 2e54c270b..b9165e0b9 100644 --- a/pkg/morph/client/audit/wrapper/result_test.go +++ b/pkg/morph/client/audit/wrapper/result_test.go @@ -6,10 +6,10 @@ import ( "github.com/nspcc-dev/neo-go/pkg/crypto/keys" "github.com/nspcc-dev/neo-go/pkg/util" - auditAPI "github.com/nspcc-dev/neofs-api-go/pkg/audit" - cidtest "github.com/nspcc-dev/neofs-api-go/pkg/container/id/test" "github.com/nspcc-dev/neofs-node/pkg/morph/client" auditWrapper "github.com/nspcc-dev/neofs-node/pkg/morph/client/audit/wrapper" + auditAPI "github.com/nspcc-dev/neofs-sdk-go/audit" + cidtest "github.com/nspcc-dev/neofs-sdk-go/container/id/test" "github.com/stretchr/testify/require" ) @@ -33,7 +33,7 @@ func TestAuditResults(t *testing.T) { auditClientWrapper, err := auditWrapper.NewFromMorph(morphClient, auditHash, 0) require.NoError(t, err) - id := cidtest.Generate() + id := cidtest.GenerateID() auditRes := auditAPI.NewResult() auditRes.SetAuditEpoch(epoch) diff --git a/pkg/morph/client/balance/wrapper/balanceOf.go b/pkg/morph/client/balance/wrapper/balanceOf.go index fddd5f0c4..699433466 100644 --- a/pkg/morph/client/balance/wrapper/balanceOf.go +++ b/pkg/morph/client/balance/wrapper/balanceOf.go @@ -3,20 +3,21 @@ package wrapper import ( "math/big" - "github.com/nspcc-dev/neofs-api-go/pkg/owner" + "github.com/nspcc-dev/neo-go/pkg/encoding/address" "github.com/nspcc-dev/neofs-node/pkg/morph/client/balance" + "github.com/nspcc-dev/neofs-sdk-go/owner" ) // BalanceOf receives the amount of funds in the client's account // through the Balance contract call, and returns it. func (w *Wrapper) BalanceOf(id *owner.ID) (*big.Int, error) { - v, err := owner.ScriptHashBE(id) + h, err := address.StringToUint160(id.String()) if err != nil { return nil, err } args := balance.GetBalanceOfArgs{} - args.SetWallet(v) + args.SetWallet(h.BytesBE()) result, err := w.client.BalanceOf(args) if err != nil { diff --git a/pkg/morph/client/balance/wrapper/transfer.go b/pkg/morph/client/balance/wrapper/transfer.go index f3e01d7fd..e87e5ec16 100644 --- a/pkg/morph/client/balance/wrapper/transfer.go +++ b/pkg/morph/client/balance/wrapper/transfer.go @@ -1,11 +1,10 @@ package wrapper import ( - "fmt" - + "github.com/nspcc-dev/neo-go/pkg/encoding/address" "github.com/nspcc-dev/neo-go/pkg/util" - "github.com/nspcc-dev/neofs-api-go/pkg/owner" "github.com/nspcc-dev/neofs-node/pkg/morph/client/balance" + "github.com/nspcc-dev/neofs-sdk-go/owner" ) // TransferPrm groups parameters of TransferX method. @@ -22,20 +21,19 @@ type TransferPrm struct { // // If TryNotary is provided, calls notary contract. func (w *Wrapper) TransferX(p TransferPrm) error { - from, err := owner.ScriptHashBE(p.From) + from, err := address.StringToUint160(p.From.String()) if err != nil { - return fmt.Errorf("invalid sender: %w", err) + return err } - - to, err := owner.ScriptHashBE(p.To) + to, err := address.StringToUint160(p.From.String()) if err != nil { - return fmt.Errorf("invalid recipient: %w", err) + return err } // prepare invocation arguments args := balance.TransferXArgs{} - args.SetSender(from) - args.SetRecipient(to) + args.SetSender(from.BytesBE()) + args.SetRecipient(to.BytesBE()) args.SetAmount(p.Amount) args.SetDetails(p.Details) diff --git a/pkg/morph/client/container/wrapper/container.go b/pkg/morph/client/container/wrapper/container.go index 0e2121483..f14131cc0 100644 --- a/pkg/morph/client/container/wrapper/container.go +++ b/pkg/morph/client/container/wrapper/container.go @@ -5,14 +5,14 @@ import ( "errors" "fmt" - "github.com/nspcc-dev/neofs-api-go/pkg" - "github.com/nspcc-dev/neofs-api-go/pkg/container" - cid "github.com/nspcc-dev/neofs-api-go/pkg/container/id" - "github.com/nspcc-dev/neofs-api-go/pkg/owner" - "github.com/nspcc-dev/neofs-api-go/pkg/session" v2refs "github.com/nspcc-dev/neofs-api-go/v2/refs" core "github.com/nspcc-dev/neofs-node/pkg/core/container" client "github.com/nspcc-dev/neofs-node/pkg/morph/client/container" + "github.com/nspcc-dev/neofs-sdk-go/container" + cid "github.com/nspcc-dev/neofs-sdk-go/container/id" + "github.com/nspcc-dev/neofs-sdk-go/owner" + "github.com/nspcc-dev/neofs-sdk-go/session" + "github.com/nspcc-dev/neofs-sdk-go/signature" ) var ( @@ -143,7 +143,7 @@ func (w *Wrapper) Get(cid []byte) (*container.Container, error) { cnr.SetSessionToken(tok) } - sig := pkg.NewSignature() + sig := signature.New() sig.SetKey(rpcAnswer.PublicKey()) sig.SetSign(rpcAnswer.Signature()) diff --git a/pkg/morph/client/container/wrapper/eacl.go b/pkg/morph/client/container/wrapper/eacl.go index 6f3f9f636..7d09e0501 100644 --- a/pkg/morph/client/container/wrapper/eacl.go +++ b/pkg/morph/client/container/wrapper/eacl.go @@ -3,12 +3,12 @@ package wrapper import ( "fmt" - "github.com/nspcc-dev/neofs-api-go/pkg" - "github.com/nspcc-dev/neofs-api-go/pkg/acl/eacl" - cid "github.com/nspcc-dev/neofs-api-go/pkg/container/id" - "github.com/nspcc-dev/neofs-api-go/pkg/session" "github.com/nspcc-dev/neofs-node/pkg/core/container" client "github.com/nspcc-dev/neofs-node/pkg/morph/client/container" + cid "github.com/nspcc-dev/neofs-sdk-go/container/id" + "github.com/nspcc-dev/neofs-sdk-go/eacl" + "github.com/nspcc-dev/neofs-sdk-go/session" + "github.com/nspcc-dev/neofs-sdk-go/signature" ) // GetEACL reads the extended ACL table from NeoFS system @@ -58,7 +58,7 @@ func (w *Wrapper) GetEACL(cid *cid.ID) (*eacl.Table, error) { table.SetSessionToken(tok) } - tableSignature := pkg.NewSignature() + tableSignature := signature.New() tableSignature.SetKey(rpcAnswer.PublicKey()) tableSignature.SetSign(sig) diff --git a/pkg/morph/client/neofsid/wrapper/keys.go b/pkg/morph/client/neofsid/wrapper/keys.go index 12005015e..88467607c 100644 --- a/pkg/morph/client/neofsid/wrapper/keys.go +++ b/pkg/morph/client/neofsid/wrapper/keys.go @@ -5,8 +5,8 @@ import ( "fmt" "github.com/nspcc-dev/neo-go/pkg/crypto/keys" - "github.com/nspcc-dev/neofs-api-go/pkg/owner" "github.com/nspcc-dev/neofs-node/pkg/morph/client/neofsid" + "github.com/nspcc-dev/neofs-sdk-go/owner" ) // AccountKeys requests public keys of NeoFS account from NeoFS ID contract. diff --git a/pkg/morph/client/netmap/client.go b/pkg/morph/client/netmap/client.go index a72314508..91907ac59 100644 --- a/pkg/morph/client/netmap/client.go +++ b/pkg/morph/client/netmap/client.go @@ -3,8 +3,8 @@ package netmap import ( "errors" - "github.com/nspcc-dev/neofs-api-go/pkg/netmap" "github.com/nspcc-dev/neofs-node/pkg/morph/client" + "github.com/nspcc-dev/neofs-sdk-go/netmap" ) type NodeInfo = netmap.NodeInfo diff --git a/pkg/morph/client/netmap/wrapper/netmap.go b/pkg/morph/client/netmap/wrapper/netmap.go index 4f3b51ec6..8ca3b09f5 100644 --- a/pkg/morph/client/netmap/wrapper/netmap.go +++ b/pkg/morph/client/netmap/wrapper/netmap.go @@ -3,8 +3,8 @@ package wrapper import ( "fmt" - "github.com/nspcc-dev/neofs-api-go/pkg/netmap" client "github.com/nspcc-dev/neofs-node/pkg/morph/client/netmap" + "github.com/nspcc-dev/neofs-sdk-go/netmap" ) // GetNetMap receives information list about storage nodes diff --git a/pkg/morph/client/netmap/wrapper/snapshot.go b/pkg/morph/client/netmap/wrapper/snapshot.go index 83a0d72f7..f4fa97218 100644 --- a/pkg/morph/client/netmap/wrapper/snapshot.go +++ b/pkg/morph/client/netmap/wrapper/snapshot.go @@ -3,8 +3,8 @@ package wrapper import ( "fmt" - "github.com/nspcc-dev/neofs-api-go/pkg/netmap" netmap2 "github.com/nspcc-dev/neofs-node/pkg/morph/client/netmap" + "github.com/nspcc-dev/neofs-sdk-go/netmap" ) // Snapshot returns current netmap node infos. diff --git a/pkg/morph/client/netmap/wrapper/update_state.go b/pkg/morph/client/netmap/wrapper/update_state.go index df712af39..e44e61cdc 100644 --- a/pkg/morph/client/netmap/wrapper/update_state.go +++ b/pkg/morph/client/netmap/wrapper/update_state.go @@ -3,8 +3,8 @@ package wrapper import ( "fmt" - "github.com/nspcc-dev/neofs-api-go/pkg/netmap" contract "github.com/nspcc-dev/neofs-node/pkg/morph/client/netmap" + "github.com/nspcc-dev/neofs-sdk-go/netmap" ) // UpdatePeerState changes peer status through Netmap contract diff --git a/pkg/morph/client/reputation/wrapper/get.go b/pkg/morph/client/reputation/wrapper/get.go index cb7ae949d..c79da38d0 100644 --- a/pkg/morph/client/reputation/wrapper/get.go +++ b/pkg/morph/client/reputation/wrapper/get.go @@ -3,8 +3,8 @@ package wrapper import ( "fmt" - "github.com/nspcc-dev/neofs-api-go/pkg/reputation" reputationClient "github.com/nspcc-dev/neofs-node/pkg/morph/client/reputation" + "github.com/nspcc-dev/neofs-sdk-go/reputation" ) type ( diff --git a/pkg/morph/client/reputation/wrapper/put.go b/pkg/morph/client/reputation/wrapper/put.go index 22fc1f863..df7a744e7 100644 --- a/pkg/morph/client/reputation/wrapper/put.go +++ b/pkg/morph/client/reputation/wrapper/put.go @@ -3,8 +3,8 @@ package wrapper import ( "fmt" - "github.com/nspcc-dev/neofs-api-go/pkg/reputation" reputationClient "github.com/nspcc-dev/neofs-node/pkg/morph/client/reputation" + "github.com/nspcc-dev/neofs-sdk-go/reputation" ) type ( diff --git a/pkg/morph/event/netmap/update_peer.go b/pkg/morph/event/netmap/update_peer.go index 6c3b7bf5b..baf35c592 100644 --- a/pkg/morph/event/netmap/update_peer.go +++ b/pkg/morph/event/netmap/update_peer.go @@ -7,10 +7,10 @@ import ( "github.com/nspcc-dev/neo-go/pkg/crypto/keys" "github.com/nspcc-dev/neo-go/pkg/network/payload" "github.com/nspcc-dev/neo-go/pkg/vm/stackitem" - "github.com/nspcc-dev/neofs-api-go/pkg/netmap" v2netmap "github.com/nspcc-dev/neofs-api-go/v2/netmap" "github.com/nspcc-dev/neofs-node/pkg/morph/client" "github.com/nspcc-dev/neofs-node/pkg/morph/event" + "github.com/nspcc-dev/neofs-sdk-go/netmap" ) type UpdatePeer struct { diff --git a/pkg/morph/event/netmap/update_peer_notary.go b/pkg/morph/event/netmap/update_peer_notary.go index 8ead20101..0738bbfd4 100644 --- a/pkg/morph/event/netmap/update_peer_notary.go +++ b/pkg/morph/event/netmap/update_peer_notary.go @@ -7,9 +7,9 @@ import ( "github.com/nspcc-dev/neo-go/pkg/crypto/keys" "github.com/nspcc-dev/neo-go/pkg/vm/opcode" - "github.com/nspcc-dev/neofs-api-go/pkg/netmap" netmapv2 "github.com/nspcc-dev/neofs-api-go/v2/netmap" "github.com/nspcc-dev/neofs-node/pkg/morph/event" + "github.com/nspcc-dev/neofs-sdk-go/netmap" ) var errNilPubKey = errors.New("could not parse public key: public key is nil") diff --git a/pkg/morph/event/netmap/update_peer_test.go b/pkg/morph/event/netmap/update_peer_test.go index 1da93ea8a..dd5052a73 100644 --- a/pkg/morph/event/netmap/update_peer_test.go +++ b/pkg/morph/event/netmap/update_peer_test.go @@ -6,8 +6,8 @@ import ( "github.com/nspcc-dev/neo-go/pkg/crypto/keys" "github.com/nspcc-dev/neo-go/pkg/vm/stackitem" - "github.com/nspcc-dev/neofs-api-go/pkg/netmap" "github.com/nspcc-dev/neofs-node/pkg/morph/event" + "github.com/nspcc-dev/neofs-sdk-go/netmap" "github.com/stretchr/testify/require" ) diff --git a/pkg/morph/event/reputation/put.go b/pkg/morph/event/reputation/put.go index fbc8f8ffb..9d31c12ea 100644 --- a/pkg/morph/event/reputation/put.go +++ b/pkg/morph/event/reputation/put.go @@ -5,9 +5,9 @@ import ( "github.com/nspcc-dev/neo-go/pkg/network/payload" "github.com/nspcc-dev/neo-go/pkg/vm/stackitem" - "github.com/nspcc-dev/neofs-api-go/pkg/reputation" "github.com/nspcc-dev/neofs-node/pkg/morph/client" "github.com/nspcc-dev/neofs-node/pkg/morph/event" + "github.com/nspcc-dev/neofs-sdk-go/reputation" ) // Put structure of reputation.reputationPut notification from diff --git a/pkg/morph/event/reputation/put_test.go b/pkg/morph/event/reputation/put_test.go index c67a96065..e9ed967ee 100644 --- a/pkg/morph/event/reputation/put_test.go +++ b/pkg/morph/event/reputation/put_test.go @@ -5,8 +5,8 @@ import ( "testing" "github.com/nspcc-dev/neo-go/pkg/vm/stackitem" - "github.com/nspcc-dev/neofs-api-go/pkg/reputation" "github.com/nspcc-dev/neofs-node/pkg/morph/event" + "github.com/nspcc-dev/neofs-sdk-go/reputation" "github.com/stretchr/testify/require" ) diff --git a/pkg/network/cache/client.go b/pkg/network/cache/client.go index 738b4fcd9..9e2ff02fd 100644 --- a/pkg/network/cache/client.go +++ b/pkg/network/cache/client.go @@ -4,13 +4,13 @@ import ( "encoding/hex" "sync" - "github.com/nspcc-dev/neofs-api-go/pkg/client" clientcore "github.com/nspcc-dev/neofs-node/pkg/core/client" "github.com/nspcc-dev/neofs-node/pkg/network" + "github.com/nspcc-dev/neofs-sdk-go/client" ) type ( - // ClientCache is a structure around neofs-api-go/pkg/client to reuse + // ClientCache is a structure around neofs-sdk-go/client to reuse // already created clients. ClientCache struct { mu *sync.RWMutex diff --git a/pkg/network/cache/multi.go b/pkg/network/cache/multi.go index 86905c58c..16f2125e6 100644 --- a/pkg/network/cache/multi.go +++ b/pkg/network/cache/multi.go @@ -8,17 +8,17 @@ import ( "io" "sync" - "github.com/nspcc-dev/neofs-api-go/pkg/accounting" - "github.com/nspcc-dev/neofs-api-go/pkg/acl/eacl" - "github.com/nspcc-dev/neofs-api-go/pkg/client" - "github.com/nspcc-dev/neofs-api-go/pkg/container" - cid "github.com/nspcc-dev/neofs-api-go/pkg/container/id" - "github.com/nspcc-dev/neofs-api-go/pkg/netmap" - "github.com/nspcc-dev/neofs-api-go/pkg/object" - "github.com/nspcc-dev/neofs-api-go/pkg/owner" - "github.com/nspcc-dev/neofs-api-go/pkg/session" rawclient "github.com/nspcc-dev/neofs-api-go/rpc/client" "github.com/nspcc-dev/neofs-node/pkg/network" + "github.com/nspcc-dev/neofs-sdk-go/accounting" + "github.com/nspcc-dev/neofs-sdk-go/client" + "github.com/nspcc-dev/neofs-sdk-go/container" + cid "github.com/nspcc-dev/neofs-sdk-go/container/id" + "github.com/nspcc-dev/neofs-sdk-go/eacl" + "github.com/nspcc-dev/neofs-sdk-go/netmap" + "github.com/nspcc-dev/neofs-sdk-go/object" + "github.com/nspcc-dev/neofs-sdk-go/owner" + "github.com/nspcc-dev/neofs-sdk-go/session" ) type multiClient struct { diff --git a/pkg/network/group.go b/pkg/network/group.go index 8c2a8be87..ebe6bf4c8 100644 --- a/pkg/network/group.go +++ b/pkg/network/group.go @@ -5,7 +5,7 @@ import ( "fmt" "sort" - "github.com/nspcc-dev/neofs-api-go/pkg/netmap" + "github.com/nspcc-dev/neofs-sdk-go/netmap" ) // AddressGroup represents list of network addresses of the node. diff --git a/pkg/network/validation.go b/pkg/network/validation.go index fb2aa153f..3d2013737 100644 --- a/pkg/network/validation.go +++ b/pkg/network/validation.go @@ -3,7 +3,7 @@ package network import ( "errors" - "github.com/nspcc-dev/neofs-api-go/pkg/netmap" + "github.com/nspcc-dev/neofs-sdk-go/netmap" ) const ( diff --git a/pkg/network/validation_test.go b/pkg/network/validation_test.go index d27517f7c..b44d10cc6 100644 --- a/pkg/network/validation_test.go +++ b/pkg/network/validation_test.go @@ -3,7 +3,7 @@ package network import ( "testing" - "github.com/nspcc-dev/neofs-api-go/pkg/netmap" + "github.com/nspcc-dev/neofs-sdk-go/netmap" "github.com/stretchr/testify/require" ) diff --git a/pkg/services/accounting/morph/executor.go b/pkg/services/accounting/morph/executor.go index f0409930d..7ec66232a 100644 --- a/pkg/services/accounting/morph/executor.go +++ b/pkg/services/accounting/morph/executor.go @@ -3,11 +3,11 @@ package accounting import ( "context" - "github.com/nspcc-dev/neofs-api-go/pkg/owner" "github.com/nspcc-dev/neofs-api-go/v2/accounting" "github.com/nspcc-dev/neofs-node/pkg/morph/client/balance/wrapper" accountingSvc "github.com/nspcc-dev/neofs-node/pkg/services/accounting" "github.com/nspcc-dev/neofs-node/pkg/util/precision" + "github.com/nspcc-dev/neofs-sdk-go/owner" ) type morphExecutor struct { diff --git a/pkg/services/audit/auditor/context.go b/pkg/services/audit/auditor/context.go index 5ab0583dd..adde683d7 100644 --- a/pkg/services/audit/auditor/context.go +++ b/pkg/services/audit/auditor/context.go @@ -4,14 +4,14 @@ import ( "sync" "time" - cid "github.com/nspcc-dev/neofs-api-go/pkg/container/id" - "github.com/nspcc-dev/neofs-api-go/pkg/netmap" - "github.com/nspcc-dev/neofs-api-go/pkg/object" - "github.com/nspcc-dev/neofs-api-go/pkg/storagegroup" "github.com/nspcc-dev/neofs-node/pkg/services/audit" "github.com/nspcc-dev/neofs-node/pkg/services/object_manager/placement" "github.com/nspcc-dev/neofs-node/pkg/util" "github.com/nspcc-dev/neofs-node/pkg/util/logger" + cid "github.com/nspcc-dev/neofs-sdk-go/container/id" + "github.com/nspcc-dev/neofs-sdk-go/netmap" + "github.com/nspcc-dev/neofs-sdk-go/object" + "github.com/nspcc-dev/neofs-sdk-go/storagegroup" "go.uber.org/atomic" "go.uber.org/zap" ) diff --git a/pkg/services/audit/auditor/pdp.go b/pkg/services/audit/auditor/pdp.go index d9d082b0c..d0d0e23a3 100644 --- a/pkg/services/audit/auditor/pdp.go +++ b/pkg/services/audit/auditor/pdp.go @@ -6,8 +6,8 @@ import ( "sync" "time" - "github.com/nspcc-dev/neofs-api-go/pkg/netmap" - "github.com/nspcc-dev/neofs-api-go/pkg/object" + "github.com/nspcc-dev/neofs-sdk-go/netmap" + "github.com/nspcc-dev/neofs-sdk-go/object" "github.com/nspcc-dev/tzhash/tz" "go.uber.org/zap" ) diff --git a/pkg/services/audit/auditor/pop.go b/pkg/services/audit/auditor/pop.go index 39e060443..73bae0a19 100644 --- a/pkg/services/audit/auditor/pop.go +++ b/pkg/services/audit/auditor/pop.go @@ -1,9 +1,9 @@ package auditor import ( - "github.com/nspcc-dev/neofs-api-go/pkg/client" - "github.com/nspcc-dev/neofs-api-go/pkg/netmap" - "github.com/nspcc-dev/neofs-api-go/pkg/object" + "github.com/nspcc-dev/neofs-sdk-go/client" + "github.com/nspcc-dev/neofs-sdk-go/netmap" + "github.com/nspcc-dev/neofs-sdk-go/object" "go.uber.org/zap" ) diff --git a/pkg/services/audit/auditor/por.go b/pkg/services/audit/auditor/por.go index 9ff298c25..61414ff16 100644 --- a/pkg/services/audit/auditor/por.go +++ b/pkg/services/audit/auditor/por.go @@ -5,9 +5,9 @@ import ( "encoding/hex" "sync" - "github.com/nspcc-dev/neofs-api-go/pkg/object" "github.com/nspcc-dev/neofs-node/pkg/services/object_manager/placement" "github.com/nspcc-dev/neofs-node/pkg/util/rand" + "github.com/nspcc-dev/neofs-sdk-go/object" "github.com/nspcc-dev/tzhash/tz" "go.uber.org/zap" ) diff --git a/pkg/services/audit/report.go b/pkg/services/audit/report.go index 977e6a2c1..2641e2cc9 100644 --- a/pkg/services/audit/report.go +++ b/pkg/services/audit/report.go @@ -3,9 +3,9 @@ package audit import ( "sync" - "github.com/nspcc-dev/neofs-api-go/pkg/audit" - cid "github.com/nspcc-dev/neofs-api-go/pkg/container/id" - "github.com/nspcc-dev/neofs-api-go/pkg/object" + "github.com/nspcc-dev/neofs-sdk-go/audit" + cid "github.com/nspcc-dev/neofs-sdk-go/container/id" + "github.com/nspcc-dev/neofs-sdk-go/object" ) // Report tracks the progress of auditing container data. diff --git a/pkg/services/audit/task.go b/pkg/services/audit/task.go index b252005c4..65fa1cf23 100644 --- a/pkg/services/audit/task.go +++ b/pkg/services/audit/task.go @@ -3,10 +3,10 @@ package audit import ( "context" - "github.com/nspcc-dev/neofs-api-go/pkg/container" - cid "github.com/nspcc-dev/neofs-api-go/pkg/container/id" - "github.com/nspcc-dev/neofs-api-go/pkg/netmap" - "github.com/nspcc-dev/neofs-api-go/pkg/object" + "github.com/nspcc-dev/neofs-sdk-go/container" + cid "github.com/nspcc-dev/neofs-sdk-go/container/id" + "github.com/nspcc-dev/neofs-sdk-go/netmap" + "github.com/nspcc-dev/neofs-sdk-go/object" ) // Task groups groups the container audit parameters. diff --git a/pkg/services/container/announcement/load/controller/calls.go b/pkg/services/container/announcement/load/controller/calls.go index 31beb860e..2de4d7370 100644 --- a/pkg/services/container/announcement/load/controller/calls.go +++ b/pkg/services/container/announcement/load/controller/calls.go @@ -3,8 +3,8 @@ package loadcontroller import ( "context" - "github.com/nspcc-dev/neofs-api-go/pkg/container" "github.com/nspcc-dev/neofs-node/pkg/util/logger" + "github.com/nspcc-dev/neofs-sdk-go/container" "go.uber.org/zap" ) diff --git a/pkg/services/container/announcement/load/controller/calls_test.go b/pkg/services/container/announcement/load/controller/calls_test.go index 07e7bae79..1899d6321 100644 --- a/pkg/services/container/announcement/load/controller/calls_test.go +++ b/pkg/services/container/announcement/load/controller/calls_test.go @@ -6,9 +6,9 @@ import ( "sync" "testing" - "github.com/nspcc-dev/neofs-api-go/pkg/container" - cidtest "github.com/nspcc-dev/neofs-api-go/pkg/container/id/test" loadcontroller "github.com/nspcc-dev/neofs-node/pkg/services/container/announcement/load/controller" + "github.com/nspcc-dev/neofs-sdk-go/container" + cidtest "github.com/nspcc-dev/neofs-sdk-go/container/id/test" "github.com/stretchr/testify/require" ) @@ -75,7 +75,7 @@ func (s *testAnnouncementStorage) Close() error { func randAnnouncement() container.UsedSpaceAnnouncement { a := container.NewAnnouncement() - a.SetContainerID(cidtest.Generate()) + a.SetContainerID(cidtest.GenerateID()) a.SetUsedSpace(rand.Uint64()) return *a diff --git a/pkg/services/container/announcement/load/controller/deps.go b/pkg/services/container/announcement/load/controller/deps.go index c598ea261..fb199a3c0 100644 --- a/pkg/services/container/announcement/load/controller/deps.go +++ b/pkg/services/container/announcement/load/controller/deps.go @@ -4,7 +4,7 @@ import ( "context" "io" - "github.com/nspcc-dev/neofs-api-go/pkg/container" + "github.com/nspcc-dev/neofs-sdk-go/container" ) // UsedSpaceHandler describes the signature of the UsedSpaceAnnouncement diff --git a/pkg/services/container/announcement/load/controller/util.go b/pkg/services/container/announcement/load/controller/util.go index 4b13c8f0d..83b0deaf2 100644 --- a/pkg/services/container/announcement/load/controller/util.go +++ b/pkg/services/container/announcement/load/controller/util.go @@ -3,7 +3,7 @@ package loadcontroller import ( "context" - "github.com/nspcc-dev/neofs-api-go/pkg/container" + "github.com/nspcc-dev/neofs-sdk-go/container" ) func usedSpaceFilterEpochEQ(epoch uint64) UsedSpaceFilter { diff --git a/pkg/services/container/announcement/load/route/calls.go b/pkg/services/container/announcement/load/route/calls.go index 7ad6a83b3..72a96db4d 100644 --- a/pkg/services/container/announcement/load/route/calls.go +++ b/pkg/services/container/announcement/load/route/calls.go @@ -5,8 +5,8 @@ import ( "encoding/hex" "sync" - "github.com/nspcc-dev/neofs-api-go/pkg/container" loadcontroller "github.com/nspcc-dev/neofs-node/pkg/services/container/announcement/load/controller" + "github.com/nspcc-dev/neofs-sdk-go/container" "go.uber.org/zap" ) diff --git a/pkg/services/container/announcement/load/route/deps.go b/pkg/services/container/announcement/load/route/deps.go index c6389c48e..d8c5f28ec 100644 --- a/pkg/services/container/announcement/load/route/deps.go +++ b/pkg/services/container/announcement/load/route/deps.go @@ -1,8 +1,8 @@ package loadroute import ( - "github.com/nspcc-dev/neofs-api-go/pkg/container" loadcontroller "github.com/nspcc-dev/neofs-node/pkg/services/container/announcement/load/controller" + "github.com/nspcc-dev/neofs-sdk-go/container" ) // ServerInfo describes a set of diff --git a/pkg/services/container/announcement/load/route/placement/calls.go b/pkg/services/container/announcement/load/route/placement/calls.go index 7b4164da9..1e3d5d75c 100644 --- a/pkg/services/container/announcement/load/route/placement/calls.go +++ b/pkg/services/container/announcement/load/route/placement/calls.go @@ -4,8 +4,8 @@ import ( "bytes" "fmt" - "github.com/nspcc-dev/neofs-api-go/pkg/container" loadroute "github.com/nspcc-dev/neofs-node/pkg/services/container/announcement/load/route" + "github.com/nspcc-dev/neofs-sdk-go/container" ) // NextStage composes container nodes for the container and epoch from a, diff --git a/pkg/services/container/announcement/load/route/placement/deps.go b/pkg/services/container/announcement/load/route/placement/deps.go index 116072e63..ccf31e013 100644 --- a/pkg/services/container/announcement/load/route/placement/deps.go +++ b/pkg/services/container/announcement/load/route/placement/deps.go @@ -1,8 +1,8 @@ package placementrouter import ( - cid "github.com/nspcc-dev/neofs-api-go/pkg/container/id" - "github.com/nspcc-dev/neofs-api-go/pkg/netmap" + cid "github.com/nspcc-dev/neofs-sdk-go/container/id" + "github.com/nspcc-dev/neofs-sdk-go/netmap" ) // PlacementBuilder describes interface of NeoFS placement calculator. diff --git a/pkg/services/container/announcement/load/route/util.go b/pkg/services/container/announcement/load/route/util.go index 941fe0c26..91b55c50f 100644 --- a/pkg/services/container/announcement/load/route/util.go +++ b/pkg/services/container/announcement/load/route/util.go @@ -4,7 +4,7 @@ import ( "bytes" "errors" - "github.com/nspcc-dev/neofs-api-go/pkg/container" + "github.com/nspcc-dev/neofs-sdk-go/container" ) var errWrongRoute = errors.New("wrong route") diff --git a/pkg/services/container/announcement/load/storage/storage.go b/pkg/services/container/announcement/load/storage/storage.go index 569403ac4..fb1b61cba 100644 --- a/pkg/services/container/announcement/load/storage/storage.go +++ b/pkg/services/container/announcement/load/storage/storage.go @@ -4,8 +4,8 @@ import ( "sort" "sync" - "github.com/nspcc-dev/neofs-api-go/pkg/container" loadcontroller "github.com/nspcc-dev/neofs-node/pkg/services/container/announcement/load/controller" + "github.com/nspcc-dev/neofs-sdk-go/container" ) type usedSpaceEstimations struct { diff --git a/pkg/services/container/announcement/load/storage/storage_test.go b/pkg/services/container/announcement/load/storage/storage_test.go index 441c1af86..b5d4689f6 100644 --- a/pkg/services/container/announcement/load/storage/storage_test.go +++ b/pkg/services/container/announcement/load/storage/storage_test.go @@ -4,8 +4,8 @@ import ( "math/rand" "testing" - "github.com/nspcc-dev/neofs-api-go/pkg/container" - cidtest "github.com/nspcc-dev/neofs-api-go/pkg/container/id/test" + "github.com/nspcc-dev/neofs-sdk-go/container" + cidtest "github.com/nspcc-dev/neofs-sdk-go/container/id/test" "github.com/stretchr/testify/require" ) @@ -13,7 +13,7 @@ func TestStorage(t *testing.T) { const epoch uint64 = 13 a := container.NewAnnouncement() - a.SetContainerID(cidtest.Generate()) + a.SetContainerID(cidtest.GenerateID()) a.SetEpoch(epoch) const opinionsNum = 100 diff --git a/pkg/services/container/morph/executor.go b/pkg/services/container/morph/executor.go index 3cef3fcf9..91f1864c0 100644 --- a/pkg/services/container/morph/executor.go +++ b/pkg/services/container/morph/executor.go @@ -3,17 +3,17 @@ package container import ( "context" - "github.com/nspcc-dev/neofs-api-go/pkg" - eaclSDK "github.com/nspcc-dev/neofs-api-go/pkg/acl/eacl" - containerSDK "github.com/nspcc-dev/neofs-api-go/pkg/container" - cid "github.com/nspcc-dev/neofs-api-go/pkg/container/id" - "github.com/nspcc-dev/neofs-api-go/pkg/owner" - "github.com/nspcc-dev/neofs-api-go/pkg/session" "github.com/nspcc-dev/neofs-api-go/v2/container" "github.com/nspcc-dev/neofs-api-go/v2/refs" containercore "github.com/nspcc-dev/neofs-node/pkg/core/container" containerSvc "github.com/nspcc-dev/neofs-node/pkg/services/container" "github.com/nspcc-dev/neofs-node/pkg/services/object/acl/eacl" + containerSDK "github.com/nspcc-dev/neofs-sdk-go/container" + cid "github.com/nspcc-dev/neofs-sdk-go/container/id" + eaclSDK "github.com/nspcc-dev/neofs-sdk-go/eacl" + "github.com/nspcc-dev/neofs-sdk-go/owner" + "github.com/nspcc-dev/neofs-sdk-go/session" + "github.com/nspcc-dev/neofs-sdk-go/signature" ) type morphExecutor struct { @@ -53,7 +53,7 @@ func (s *morphExecutor) Put(ctx containerSvc.ContextWithToken, body *container.P cnr := containerSDK.NewContainerFromV2(body.GetContainer()) cnr.SetSignature( - pkg.NewSignatureFromV2(body.GetSignature()), + signature.NewFromV2(body.GetSignature()), ) cnr.SetSessionToken( @@ -127,7 +127,7 @@ func (s *morphExecutor) List(ctx context.Context, body *container.ListRequestBod func (s *morphExecutor) SetExtendedACL(ctx containerSvc.ContextWithToken, body *container.SetExtendedACLRequestBody) (*container.SetExtendedACLResponseBody, error) { table := eaclSDK.NewTableFromV2(body.GetEACL()) - sign := pkg.NewSignatureFromV2(body.GetSignature()) + sign := signature.NewFromV2(body.GetSignature()) table.SetSignature(sign) diff --git a/pkg/services/control/ir/server/sign.go b/pkg/services/control/ir/server/sign.go index 4b94b7eed..56e63650d 100644 --- a/pkg/services/control/ir/server/sign.go +++ b/pkg/services/control/ir/server/sign.go @@ -5,8 +5,8 @@ import ( "crypto/ecdsa" "errors" - "github.com/nspcc-dev/neofs-api-go/util/signature" control "github.com/nspcc-dev/neofs-node/pkg/services/control/ir" + "github.com/nspcc-dev/neofs-sdk-go/util/signature" ) // SignedMessage is an interface of Control service message. diff --git a/pkg/services/control/server/gc.go b/pkg/services/control/server/gc.go index 97751c0a0..8aea9ac73 100644 --- a/pkg/services/control/server/gc.go +++ b/pkg/services/control/server/gc.go @@ -4,8 +4,8 @@ import ( "context" "fmt" - "github.com/nspcc-dev/neofs-api-go/pkg/object" "github.com/nspcc-dev/neofs-node/pkg/services/control" + "github.com/nspcc-dev/neofs-sdk-go/object" "google.golang.org/grpc/codes" "google.golang.org/grpc/status" ) diff --git a/pkg/services/control/server/netmap_snapshot.go b/pkg/services/control/server/netmap_snapshot.go index 19250d65e..5dda08214 100644 --- a/pkg/services/control/server/netmap_snapshot.go +++ b/pkg/services/control/server/netmap_snapshot.go @@ -3,8 +3,8 @@ package control import ( "context" - netmapAPI "github.com/nspcc-dev/neofs-api-go/pkg/netmap" "github.com/nspcc-dev/neofs-node/pkg/services/control" + netmapAPI "github.com/nspcc-dev/neofs-sdk-go/netmap" "google.golang.org/grpc/codes" "google.golang.org/grpc/status" ) diff --git a/pkg/services/control/server/sign.go b/pkg/services/control/server/sign.go index e8c715486..bf43b24bb 100644 --- a/pkg/services/control/server/sign.go +++ b/pkg/services/control/server/sign.go @@ -5,8 +5,8 @@ import ( "crypto/ecdsa" "errors" - "github.com/nspcc-dev/neofs-api-go/util/signature" "github.com/nspcc-dev/neofs-node/pkg/services/control" + "github.com/nspcc-dev/neofs-sdk-go/util/signature" ) // SignedMessage is an interface of Control service message. diff --git a/pkg/services/netmap/executor.go b/pkg/services/netmap/executor.go index 9a33dfe74..f957bb9a4 100644 --- a/pkg/services/netmap/executor.go +++ b/pkg/services/netmap/executor.go @@ -3,13 +3,13 @@ package netmap import ( "context" - "github.com/nspcc-dev/neofs-api-go/pkg" "github.com/nspcc-dev/neofs-api-go/v2/netmap" "github.com/nspcc-dev/neofs-api-go/v2/refs" + "github.com/nspcc-dev/neofs-sdk-go/version" ) type executorSvc struct { - version *pkg.Version + version *version.Version state NodeState netInfo NetworkInfo @@ -32,7 +32,7 @@ type NetworkInfo interface { Dump(*refs.Version) (*netmap.NetworkInfo, error) } -func NewExecutionService(s NodeState, v *pkg.Version, netInfo NetworkInfo) Server { +func NewExecutionService(s NodeState, v *version.Version, netInfo NetworkInfo) Server { if s == nil || v == nil || netInfo == nil { // this should never happen, otherwise it programmers bug panic("can't create netmap execution service") @@ -48,7 +48,7 @@ func NewExecutionService(s NodeState, v *pkg.Version, netInfo NetworkInfo) Serve func (s *executorSvc) LocalNodeInfo( _ context.Context, req *netmap.LocalNodeInfoRequest) (*netmap.LocalNodeInfoResponse, error) { - ver := pkg.NewVersionFromV2(req.GetMetaHeader().GetVersion()) + ver := version.NewFromV2(req.GetMetaHeader().GetVersion()) ni, err := s.state.LocalNodeInfo() if err != nil { diff --git a/pkg/services/object/acl/acl.go b/pkg/services/object/acl/acl.go index 6b0ba2e68..c7701fe07 100644 --- a/pkg/services/object/acl/acl.go +++ b/pkg/services/object/acl/acl.go @@ -7,11 +7,6 @@ import ( "fmt" "github.com/nspcc-dev/neo-go/pkg/crypto/keys" - acl "github.com/nspcc-dev/neofs-api-go/pkg/acl/eacl" - cid "github.com/nspcc-dev/neofs-api-go/pkg/container/id" - objectSDK "github.com/nspcc-dev/neofs-api-go/pkg/object" - "github.com/nspcc-dev/neofs-api-go/pkg/owner" - "github.com/nspcc-dev/neofs-api-go/util/signature" bearer "github.com/nspcc-dev/neofs-api-go/v2/acl" "github.com/nspcc-dev/neofs-api-go/v2/object" "github.com/nspcc-dev/neofs-api-go/v2/refs" @@ -23,6 +18,11 @@ import ( objectSvc "github.com/nspcc-dev/neofs-node/pkg/services/object" "github.com/nspcc-dev/neofs-node/pkg/services/object/acl/eacl" eaclV2 "github.com/nspcc-dev/neofs-node/pkg/services/object/acl/eacl/v2" + cid "github.com/nspcc-dev/neofs-sdk-go/container/id" + acl "github.com/nspcc-dev/neofs-sdk-go/eacl" + objectSDK "github.com/nspcc-dev/neofs-sdk-go/object" + "github.com/nspcc-dev/neofs-sdk-go/owner" + "github.com/nspcc-dev/neofs-sdk-go/util/signature" ) type ( diff --git a/pkg/services/object/acl/acl_test.go b/pkg/services/object/acl/acl_test.go index 23aa5e91e..c41e12f74 100644 --- a/pkg/services/object/acl/acl_test.go +++ b/pkg/services/object/acl/acl_test.go @@ -3,13 +3,13 @@ package acl import ( "testing" - "github.com/nspcc-dev/neofs-api-go/pkg/acl/eacl" - "github.com/nspcc-dev/neofs-api-go/pkg/owner" - ownertest "github.com/nspcc-dev/neofs-api-go/pkg/owner/test" "github.com/nspcc-dev/neofs-api-go/v2/acl" acltest "github.com/nspcc-dev/neofs-api-go/v2/acl/test" "github.com/nspcc-dev/neofs-api-go/v2/session" sessiontest "github.com/nspcc-dev/neofs-api-go/v2/session/test" + "github.com/nspcc-dev/neofs-sdk-go/eacl" + "github.com/nspcc-dev/neofs-sdk-go/owner" + ownertest "github.com/nspcc-dev/neofs-sdk-go/owner/test" "github.com/stretchr/testify/require" ) @@ -46,10 +46,10 @@ func TestStickyCheck(t *testing.T) { info.requestRole = eacl.RoleSystem info.basicACL.SetSticky() - require.True(t, stickyBitCheck(info, ownertest.Generate())) + require.True(t, stickyBitCheck(info, ownertest.GenerateID())) info.basicACL.ResetSticky() - require.True(t, stickyBitCheck(info, ownertest.Generate())) + require.True(t, stickyBitCheck(info, ownertest.GenerateID())) }) t.Run("owner ID and/or public key emptiness", func(t *testing.T) { @@ -73,7 +73,7 @@ func TestStickyCheck(t *testing.T) { var ownerID *owner.ID if withOwner { - ownerID = ownertest.Generate() + ownerID = ownertest.GenerateID() } require.Equal(t, expected, stickyBitCheck(info, ownerID)) diff --git a/pkg/services/object/acl/basic_helper.go b/pkg/services/object/acl/basic_helper.go index 51a234c76..861d25b71 100644 --- a/pkg/services/object/acl/basic_helper.go +++ b/pkg/services/object/acl/basic_helper.go @@ -1,7 +1,7 @@ package acl import ( - "github.com/nspcc-dev/neofs-api-go/pkg/acl/eacl" + "github.com/nspcc-dev/neofs-sdk-go/eacl" ) // wrapper around basic ACL to provide easy access to basic ACL fields diff --git a/pkg/services/object/acl/basic_helper_test.go b/pkg/services/object/acl/basic_helper_test.go index 08a16c04e..ded0041ba 100644 --- a/pkg/services/object/acl/basic_helper_test.go +++ b/pkg/services/object/acl/basic_helper_test.go @@ -3,7 +3,7 @@ package acl import ( "testing" - "github.com/nspcc-dev/neofs-api-go/pkg/acl/eacl" + "github.com/nspcc-dev/neofs-sdk-go/eacl" "github.com/stretchr/testify/require" ) diff --git a/pkg/services/object/acl/classifier.go b/pkg/services/object/acl/classifier.go index 881ad06f8..0014ec224 100644 --- a/pkg/services/object/acl/classifier.go +++ b/pkg/services/object/acl/classifier.go @@ -7,17 +7,17 @@ import ( "fmt" "github.com/nspcc-dev/neo-go/pkg/crypto/keys" - "github.com/nspcc-dev/neofs-api-go/pkg" - acl "github.com/nspcc-dev/neofs-api-go/pkg/acl/eacl" - "github.com/nspcc-dev/neofs-api-go/pkg/container" - cid "github.com/nspcc-dev/neofs-api-go/pkg/container/id" - "github.com/nspcc-dev/neofs-api-go/pkg/netmap" - "github.com/nspcc-dev/neofs-api-go/pkg/owner" - "github.com/nspcc-dev/neofs-api-go/util/signature" bearer "github.com/nspcc-dev/neofs-api-go/v2/acl" "github.com/nspcc-dev/neofs-api-go/v2/session" v2signature "github.com/nspcc-dev/neofs-api-go/v2/signature" core "github.com/nspcc-dev/neofs-node/pkg/core/netmap" + "github.com/nspcc-dev/neofs-sdk-go/container" + cid "github.com/nspcc-dev/neofs-sdk-go/container/id" + acl "github.com/nspcc-dev/neofs-sdk-go/eacl" + "github.com/nspcc-dev/neofs-sdk-go/netmap" + "github.com/nspcc-dev/neofs-sdk-go/owner" + "github.com/nspcc-dev/neofs-sdk-go/signature" + sigutil "github.com/nspcc-dev/neofs-sdk-go/util/signature" "go.uber.org/zap" ) @@ -125,7 +125,7 @@ func requestOwner(req metaWithToken) (*owner.ID, *keys.PublicKey, error) { return user, key, nil } -func originalBodySignature(v *session.RequestVerificationHeader) *pkg.Signature { +func originalBodySignature(v *session.RequestVerificationHeader) *signature.Signature { if v == nil { return nil } @@ -134,7 +134,7 @@ func originalBodySignature(v *session.RequestVerificationHeader) *pkg.Signature v = v.GetOrigin() } - return pkg.NewSignatureFromV2(v.GetBodySignature()) + return signature.NewFromV2(v.GetBodySignature()) } func (c SenderClassifier) isInnerRingKey(owner []byte) (bool, error) { @@ -200,7 +200,7 @@ func lookupKeyInContainer( func ownerFromToken(token *session.SessionToken) (*owner.ID, *keys.PublicKey, error) { // 1. First check signature of session token. signWrapper := v2signature.StableMarshalerWrapper{SM: token.GetBody()} - if err := signature.VerifyDataWithSource(signWrapper, func() (key, sig []byte) { + if err := sigutil.VerifyDataWithSource(signWrapper, func() (key, sig []byte) { tokenSignature := token.GetSignature() return tokenSignature.GetKey(), tokenSignature.GetSign() }); err != nil { diff --git a/pkg/services/object/acl/eacl/types.go b/pkg/services/object/acl/eacl/types.go index a2e859a4d..3a90a667b 100644 --- a/pkg/services/object/acl/eacl/types.go +++ b/pkg/services/object/acl/eacl/types.go @@ -1,9 +1,9 @@ package eacl import ( - "github.com/nspcc-dev/neofs-api-go/pkg/acl/eacl" - cid "github.com/nspcc-dev/neofs-api-go/pkg/container/id" bearer "github.com/nspcc-dev/neofs-api-go/v2/acl" + cid "github.com/nspcc-dev/neofs-sdk-go/container/id" + "github.com/nspcc-dev/neofs-sdk-go/eacl" ) // Source is the interface that wraps diff --git a/pkg/services/object/acl/eacl/v2/eacl_test.go b/pkg/services/object/acl/eacl/v2/eacl_test.go index d925eb51a..934587a83 100644 --- a/pkg/services/object/acl/eacl/v2/eacl_test.go +++ b/pkg/services/object/acl/eacl/v2/eacl_test.go @@ -7,14 +7,14 @@ import ( "testing" "github.com/nspcc-dev/neo-go/pkg/crypto/keys" - "github.com/nspcc-dev/neofs-api-go/pkg/acl/eacl" - cid "github.com/nspcc-dev/neofs-api-go/pkg/container/id" - cidtest "github.com/nspcc-dev/neofs-api-go/pkg/container/id/test" - objectSDK "github.com/nspcc-dev/neofs-api-go/pkg/object" objectV2 "github.com/nspcc-dev/neofs-api-go/v2/object" "github.com/nspcc-dev/neofs-api-go/v2/session" "github.com/nspcc-dev/neofs-node/pkg/core/object" eacl2 "github.com/nspcc-dev/neofs-node/pkg/services/object/acl/eacl" + cid "github.com/nspcc-dev/neofs-sdk-go/container/id" + cidtest "github.com/nspcc-dev/neofs-sdk-go/container/id/test" + "github.com/nspcc-dev/neofs-sdk-go/eacl" + objectSDK "github.com/nspcc-dev/neofs-sdk-go/object" "github.com/stretchr/testify/require" ) @@ -61,7 +61,7 @@ func testID(t *testing.T) *objectSDK.ID { func testAddress(t *testing.T) *objectSDK.Address { addr := objectSDK.NewAddress() addr.SetObjectID(testID(t)) - addr.SetContainerID(cidtest.Generate()) + addr.SetContainerID(cidtest.GenerateID()) return addr } diff --git a/pkg/services/object/acl/eacl/v2/headers.go b/pkg/services/object/acl/eacl/v2/headers.go index 4399314c2..6f23f6a5d 100644 --- a/pkg/services/object/acl/eacl/v2/headers.go +++ b/pkg/services/object/acl/eacl/v2/headers.go @@ -3,16 +3,16 @@ package v2 import ( "fmt" - "github.com/nspcc-dev/neofs-api-go/pkg" - eaclSDK "github.com/nspcc-dev/neofs-api-go/pkg/acl/eacl" - cid "github.com/nspcc-dev/neofs-api-go/pkg/container/id" - objectSDK "github.com/nspcc-dev/neofs-api-go/pkg/object" "github.com/nspcc-dev/neofs-api-go/v2/acl" objectV2 "github.com/nspcc-dev/neofs-api-go/v2/object" "github.com/nspcc-dev/neofs-api-go/v2/refs" "github.com/nspcc-dev/neofs-api-go/v2/session" "github.com/nspcc-dev/neofs-node/pkg/core/object" "github.com/nspcc-dev/neofs-node/pkg/services/object/acl/eacl" + cid "github.com/nspcc-dev/neofs-sdk-go/container/id" + eaclSDK "github.com/nspcc-dev/neofs-sdk-go/eacl" + objectSDK "github.com/nspcc-dev/neofs-sdk-go/object" + sessionSDK "github.com/nspcc-dev/neofs-sdk-go/session" ) type Option func(*cfg) @@ -76,7 +76,7 @@ func requestHeaders(msg xHeaderSource) []eacl.Header { res := make([]eacl.Header, 0, len(xHdrs)) for i := range xHdrs { - res = append(res, pkg.NewXHeaderFromV2(xHdrs[i])) + res = append(res, sessionSDK.NewXHeaderFromV2(xHdrs[i])) } return res diff --git a/pkg/services/object/acl/eacl/v2/localstore.go b/pkg/services/object/acl/eacl/v2/localstore.go index b1552f9b4..0973fabd7 100644 --- a/pkg/services/object/acl/eacl/v2/localstore.go +++ b/pkg/services/object/acl/eacl/v2/localstore.go @@ -3,9 +3,9 @@ package v2 import ( "io" - objectSDK "github.com/nspcc-dev/neofs-api-go/pkg/object" "github.com/nspcc-dev/neofs-node/pkg/core/object" "github.com/nspcc-dev/neofs-node/pkg/local_object_storage/engine" + objectSDK "github.com/nspcc-dev/neofs-sdk-go/object" ) type localStorage struct { diff --git a/pkg/services/object/acl/eacl/v2/object.go b/pkg/services/object/acl/eacl/v2/object.go index 0dd30f38a..21c4605cf 100644 --- a/pkg/services/object/acl/eacl/v2/object.go +++ b/pkg/services/object/acl/eacl/v2/object.go @@ -3,12 +3,12 @@ package v2 import ( "strconv" - cid "github.com/nspcc-dev/neofs-api-go/pkg/container/id" - objectSDK "github.com/nspcc-dev/neofs-api-go/pkg/object" - "github.com/nspcc-dev/neofs-api-go/pkg/owner" "github.com/nspcc-dev/neofs-api-go/v2/acl" "github.com/nspcc-dev/neofs-node/pkg/core/object" "github.com/nspcc-dev/neofs-node/pkg/services/object/acl/eacl" + 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/owner" ) type sysObjHdr struct { diff --git a/pkg/services/object/acl/eacl/validator.go b/pkg/services/object/acl/eacl/validator.go index 9ad18319e..2174aa3a4 100644 --- a/pkg/services/object/acl/eacl/validator.go +++ b/pkg/services/object/acl/eacl/validator.go @@ -4,9 +4,9 @@ import ( "bytes" "errors" - "github.com/nspcc-dev/neofs-api-go/pkg/acl/eacl" "github.com/nspcc-dev/neofs-node/pkg/core/container" "github.com/nspcc-dev/neofs-node/pkg/util/logger" + "github.com/nspcc-dev/neofs-sdk-go/eacl" "go.uber.org/zap" ) diff --git a/pkg/services/object/acl/eacl/validator_test.go b/pkg/services/object/acl/eacl/validator_test.go index 7add95a20..adb31f3f1 100644 --- a/pkg/services/object/acl/eacl/validator_test.go +++ b/pkg/services/object/acl/eacl/validator_test.go @@ -4,7 +4,7 @@ import ( "math/rand" "testing" - "github.com/nspcc-dev/neofs-api-go/pkg/acl/eacl" + "github.com/nspcc-dev/neofs-sdk-go/eacl" "github.com/stretchr/testify/require" ) diff --git a/pkg/services/object/delete/exec.go b/pkg/services/object/delete/exec.go index 094e81b2b..25241b9b1 100644 --- a/pkg/services/object/delete/exec.go +++ b/pkg/services/object/delete/exec.go @@ -4,12 +4,12 @@ import ( "context" "strconv" - cid "github.com/nspcc-dev/neofs-api-go/pkg/container/id" - objectSDK "github.com/nspcc-dev/neofs-api-go/pkg/object" objectV2 "github.com/nspcc-dev/neofs-api-go/v2/object" "github.com/nspcc-dev/neofs-node/pkg/core/object" "github.com/nspcc-dev/neofs-node/pkg/services/object/util" "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" "go.uber.org/zap" ) diff --git a/pkg/services/object/delete/local.go b/pkg/services/object/delete/local.go index cd446ca98..3caf50c4b 100644 --- a/pkg/services/object/delete/local.go +++ b/pkg/services/object/delete/local.go @@ -1,7 +1,7 @@ package deletesvc import ( - objectSDK "github.com/nspcc-dev/neofs-api-go/pkg/object" + objectSDK "github.com/nspcc-dev/neofs-sdk-go/object" "go.uber.org/zap" ) diff --git a/pkg/services/object/delete/prm.go b/pkg/services/object/delete/prm.go index a75ca4608..21d03bfd5 100644 --- a/pkg/services/object/delete/prm.go +++ b/pkg/services/object/delete/prm.go @@ -1,8 +1,8 @@ package deletesvc import ( - "github.com/nspcc-dev/neofs-api-go/pkg/object" "github.com/nspcc-dev/neofs-node/pkg/services/object/util" + "github.com/nspcc-dev/neofs-sdk-go/object" ) // TombstoneAddressWriter is an interface of tombstone address setter. diff --git a/pkg/services/object/delete/service.go b/pkg/services/object/delete/service.go index 81f943ea6..3878ef470 100644 --- a/pkg/services/object/delete/service.go +++ b/pkg/services/object/delete/service.go @@ -1,13 +1,13 @@ package deletesvc import ( - objectSDK "github.com/nspcc-dev/neofs-api-go/pkg/object" - "github.com/nspcc-dev/neofs-api-go/pkg/owner" "github.com/nspcc-dev/neofs-node/pkg/core/netmap" getsvc "github.com/nspcc-dev/neofs-node/pkg/services/object/get" putsvc "github.com/nspcc-dev/neofs-node/pkg/services/object/put" searchsvc "github.com/nspcc-dev/neofs-node/pkg/services/object/search" "github.com/nspcc-dev/neofs-node/pkg/util/logger" + objectSDK "github.com/nspcc-dev/neofs-sdk-go/object" + "github.com/nspcc-dev/neofs-sdk-go/owner" "go.uber.org/zap" ) diff --git a/pkg/services/object/delete/util.go b/pkg/services/object/delete/util.go index 31a92ed2a..e3641a075 100644 --- a/pkg/services/object/delete/util.go +++ b/pkg/services/object/delete/util.go @@ -3,12 +3,12 @@ package deletesvc import ( "errors" - objectSDK "github.com/nspcc-dev/neofs-api-go/pkg/object" "github.com/nspcc-dev/neofs-node/pkg/core/object" getsvc "github.com/nspcc-dev/neofs-node/pkg/services/object/get" putsvc "github.com/nspcc-dev/neofs-node/pkg/services/object/put" searchsvc "github.com/nspcc-dev/neofs-node/pkg/services/object/search" "github.com/nspcc-dev/neofs-node/pkg/services/object_manager/placement" + objectSDK "github.com/nspcc-dev/neofs-sdk-go/object" ) type headSvcWrapper getsvc.Service diff --git a/pkg/services/object/delete/v2/util.go b/pkg/services/object/delete/v2/util.go index 72b18a1ab..fa5c8eef6 100644 --- a/pkg/services/object/delete/v2/util.go +++ b/pkg/services/object/delete/v2/util.go @@ -1,10 +1,10 @@ package deletesvc import ( - "github.com/nspcc-dev/neofs-api-go/pkg/object" objectV2 "github.com/nspcc-dev/neofs-api-go/v2/object" deletesvc "github.com/nspcc-dev/neofs-node/pkg/services/object/delete" "github.com/nspcc-dev/neofs-node/pkg/services/object/util" + "github.com/nspcc-dev/neofs-sdk-go/object" ) type tombstoneBodyWriter struct { diff --git a/pkg/services/object/get/assemble.go b/pkg/services/object/get/assemble.go index 312475542..09061fcfa 100644 --- a/pkg/services/object/get/assemble.go +++ b/pkg/services/object/get/assemble.go @@ -1,8 +1,8 @@ package getsvc import ( - objectSDK "github.com/nspcc-dev/neofs-api-go/pkg/object" "github.com/nspcc-dev/neofs-node/pkg/core/object" + objectSDK "github.com/nspcc-dev/neofs-sdk-go/object" "go.uber.org/zap" ) diff --git a/pkg/services/object/get/exec.go b/pkg/services/object/get/exec.go index e97d7f09c..9eda8882d 100644 --- a/pkg/services/object/get/exec.go +++ b/pkg/services/object/get/exec.go @@ -5,12 +5,12 @@ import ( "crypto/ecdsa" "errors" - cid "github.com/nspcc-dev/neofs-api-go/pkg/container/id" - objectSDK "github.com/nspcc-dev/neofs-api-go/pkg/object" clientcore "github.com/nspcc-dev/neofs-node/pkg/core/client" "github.com/nspcc-dev/neofs-node/pkg/core/object" "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" "go.uber.org/zap" ) diff --git a/pkg/services/object/get/get.go b/pkg/services/object/get/get.go index c65bdfe19..319c14178 100644 --- a/pkg/services/object/get/get.go +++ b/pkg/services/object/get/get.go @@ -3,8 +3,8 @@ package getsvc import ( "context" - objectSDK "github.com/nspcc-dev/neofs-api-go/pkg/object" "github.com/nspcc-dev/neofs-node/pkg/util" + objectSDK "github.com/nspcc-dev/neofs-sdk-go/object" "go.uber.org/zap" ) diff --git a/pkg/services/object/get/get_test.go b/pkg/services/object/get/get_test.go index abfd16435..56f27e52c 100644 --- a/pkg/services/object/get/get_test.go +++ b/pkg/services/object/get/get_test.go @@ -9,17 +9,17 @@ import ( "strconv" "testing" - "github.com/nspcc-dev/neofs-api-go/pkg/container" - cid "github.com/nspcc-dev/neofs-api-go/pkg/container/id" - cidtest "github.com/nspcc-dev/neofs-api-go/pkg/container/id/test" - "github.com/nspcc-dev/neofs-api-go/pkg/netmap" - objectSDK "github.com/nspcc-dev/neofs-api-go/pkg/object" "github.com/nspcc-dev/neofs-node/pkg/core/client" "github.com/nspcc-dev/neofs-node/pkg/core/object" "github.com/nspcc-dev/neofs-node/pkg/network" "github.com/nspcc-dev/neofs-node/pkg/services/object/util" "github.com/nspcc-dev/neofs-node/pkg/services/object_manager/placement" "github.com/nspcc-dev/neofs-node/pkg/util/logger/test" + "github.com/nspcc-dev/neofs-sdk-go/container" + cid "github.com/nspcc-dev/neofs-sdk-go/container/id" + cidtest "github.com/nspcc-dev/neofs-sdk-go/container/id/test" + "github.com/nspcc-dev/neofs-sdk-go/netmap" + objectSDK "github.com/nspcc-dev/neofs-sdk-go/object" "github.com/stretchr/testify/require" ) @@ -189,7 +189,7 @@ func generateAddress() *objectSDK.Address { addr := objectSDK.NewAddress() addr.SetObjectID(generateID()) - addr.SetContainerID(cidtest.Generate()) + addr.SetContainerID(cidtest.GenerateID()) return addr } diff --git a/pkg/services/object/get/local.go b/pkg/services/object/get/local.go index 8c964520d..0e0234c53 100644 --- a/pkg/services/object/get/local.go +++ b/pkg/services/object/get/local.go @@ -3,8 +3,8 @@ package getsvc import ( "errors" - objectSDK "github.com/nspcc-dev/neofs-api-go/pkg/object" "github.com/nspcc-dev/neofs-node/pkg/core/object" + objectSDK "github.com/nspcc-dev/neofs-sdk-go/object" "go.uber.org/zap" ) diff --git a/pkg/services/object/get/prm.go b/pkg/services/object/get/prm.go index 57aa81d1d..64be0cd89 100644 --- a/pkg/services/object/get/prm.go +++ b/pkg/services/object/get/prm.go @@ -3,10 +3,10 @@ package getsvc import ( "hash" - objectSDK "github.com/nspcc-dev/neofs-api-go/pkg/object" coreclient "github.com/nspcc-dev/neofs-node/pkg/core/client" "github.com/nspcc-dev/neofs-node/pkg/core/object" "github.com/nspcc-dev/neofs-node/pkg/services/object/util" + objectSDK "github.com/nspcc-dev/neofs-sdk-go/object" ) // Prm groups parameters of Get service call. diff --git a/pkg/services/object/get/remote.go b/pkg/services/object/get/remote.go index 458cbb5b2..eccf11806 100644 --- a/pkg/services/object/get/remote.go +++ b/pkg/services/object/get/remote.go @@ -4,9 +4,9 @@ import ( "context" "errors" - objectSDK "github.com/nspcc-dev/neofs-api-go/pkg/object" "github.com/nspcc-dev/neofs-node/pkg/core/client" "github.com/nspcc-dev/neofs-node/pkg/core/object" + objectSDK "github.com/nspcc-dev/neofs-sdk-go/object" "go.uber.org/zap" ) diff --git a/pkg/services/object/get/service.go b/pkg/services/object/get/service.go index df3df599e..af9f369ae 100644 --- a/pkg/services/object/get/service.go +++ b/pkg/services/object/get/service.go @@ -3,8 +3,6 @@ package getsvc import ( "crypto/ecdsa" - objectSDK "github.com/nspcc-dev/neofs-api-go/pkg/object" - "github.com/nspcc-dev/neofs-api-go/pkg/session" "github.com/nspcc-dev/neofs-node/pkg/core/client" "github.com/nspcc-dev/neofs-node/pkg/core/netmap" "github.com/nspcc-dev/neofs-node/pkg/core/object" @@ -12,6 +10,8 @@ import ( "github.com/nspcc-dev/neofs-node/pkg/services/object/util" "github.com/nspcc-dev/neofs-node/pkg/services/object_manager/placement" "github.com/nspcc-dev/neofs-node/pkg/util/logger" + objectSDK "github.com/nspcc-dev/neofs-sdk-go/object" + "github.com/nspcc-dev/neofs-sdk-go/session" "go.uber.org/zap" ) diff --git a/pkg/services/object/get/util.go b/pkg/services/object/get/util.go index b1e858589..fa47394d2 100644 --- a/pkg/services/object/get/util.go +++ b/pkg/services/object/get/util.go @@ -3,13 +3,13 @@ package getsvc import ( "io" - objectSDK "github.com/nspcc-dev/neofs-api-go/pkg/object" coreclient "github.com/nspcc-dev/neofs-node/pkg/core/client" "github.com/nspcc-dev/neofs-node/pkg/core/netmap" "github.com/nspcc-dev/neofs-node/pkg/core/object" "github.com/nspcc-dev/neofs-node/pkg/local_object_storage/engine" internal "github.com/nspcc-dev/neofs-node/pkg/services/object/internal/client" internalclient "github.com/nspcc-dev/neofs-node/pkg/services/object/internal/client" + objectSDK "github.com/nspcc-dev/neofs-sdk-go/object" ) type SimpleObjectWriter struct { diff --git a/pkg/services/object/get/v2/service.go b/pkg/services/object/get/v2/service.go index 5bd13788a..63e4ebd41 100644 --- a/pkg/services/object/get/v2/service.go +++ b/pkg/services/object/get/v2/service.go @@ -4,11 +4,11 @@ import ( "context" "errors" - "github.com/nspcc-dev/neofs-api-go/pkg/object" objectV2 "github.com/nspcc-dev/neofs-api-go/v2/object" objectSvc "github.com/nspcc-dev/neofs-node/pkg/services/object" getsvc "github.com/nspcc-dev/neofs-node/pkg/services/object/get" objutil "github.com/nspcc-dev/neofs-node/pkg/services/object/util" + "github.com/nspcc-dev/neofs-sdk-go/object" ) // Service implements Get operation of Object service v2. diff --git a/pkg/services/object/get/v2/util.go b/pkg/services/object/get/v2/util.go index a72365068..1d36a2075 100644 --- a/pkg/services/object/get/v2/util.go +++ b/pkg/services/object/get/v2/util.go @@ -9,9 +9,7 @@ import ( "io" "sync" - objectSDK "github.com/nspcc-dev/neofs-api-go/pkg/object" rpcclient "github.com/nspcc-dev/neofs-api-go/rpc/client" - signature2 "github.com/nspcc-dev/neofs-api-go/util/signature" objectV2 "github.com/nspcc-dev/neofs-api-go/v2/object" "github.com/nspcc-dev/neofs-api-go/v2/refs" "github.com/nspcc-dev/neofs-api-go/v2/rpc" @@ -24,6 +22,8 @@ import ( getsvc "github.com/nspcc-dev/neofs-node/pkg/services/object/get" "github.com/nspcc-dev/neofs-node/pkg/services/object/internal" "github.com/nspcc-dev/neofs-node/pkg/services/object/util" + objectSDK "github.com/nspcc-dev/neofs-sdk-go/object" + signature2 "github.com/nspcc-dev/neofs-sdk-go/util/signature" "github.com/nspcc-dev/tzhash/tz" ) diff --git a/pkg/services/object/head/prm.go b/pkg/services/object/head/prm.go index 6a0f75641..fbfb4fa76 100644 --- a/pkg/services/object/head/prm.go +++ b/pkg/services/object/head/prm.go @@ -1,7 +1,7 @@ package headsvc import ( - "github.com/nspcc-dev/neofs-api-go/pkg/object" + "github.com/nspcc-dev/neofs-sdk-go/object" ) type Prm struct { diff --git a/pkg/services/object/head/remote.go b/pkg/services/object/head/remote.go index 6204c0023..37a656ce5 100644 --- a/pkg/services/object/head/remote.go +++ b/pkg/services/object/head/remote.go @@ -5,13 +5,13 @@ import ( "errors" "fmt" - "github.com/nspcc-dev/neofs-api-go/pkg/client" - "github.com/nspcc-dev/neofs-api-go/pkg/netmap" - objectSDK "github.com/nspcc-dev/neofs-api-go/pkg/object" clientcore "github.com/nspcc-dev/neofs-node/pkg/core/client" "github.com/nspcc-dev/neofs-node/pkg/core/object" internalclient "github.com/nspcc-dev/neofs-node/pkg/services/object/internal/client" "github.com/nspcc-dev/neofs-node/pkg/services/object/util" + "github.com/nspcc-dev/neofs-sdk-go/client" + "github.com/nspcc-dev/neofs-sdk-go/netmap" + objectSDK "github.com/nspcc-dev/neofs-sdk-go/object" ) type ClientConstructor interface { diff --git a/pkg/services/object/internal/client/client.go b/pkg/services/object/internal/client/client.go index f750735fa..c87c8e266 100644 --- a/pkg/services/object/internal/client/client.go +++ b/pkg/services/object/internal/client/client.go @@ -5,13 +5,12 @@ import ( "crypto/ecdsa" "strconv" - "github.com/nspcc-dev/neofs-api-go/pkg" - "github.com/nspcc-dev/neofs-api-go/pkg/client" - cid "github.com/nspcc-dev/neofs-api-go/pkg/container/id" - "github.com/nspcc-dev/neofs-api-go/pkg/object" - "github.com/nspcc-dev/neofs-api-go/pkg/session" - "github.com/nspcc-dev/neofs-api-go/pkg/token" session2 "github.com/nspcc-dev/neofs-api-go/v2/session" + "github.com/nspcc-dev/neofs-sdk-go/client" + cid "github.com/nspcc-dev/neofs-sdk-go/container/id" + "github.com/nspcc-dev/neofs-sdk-go/object" + "github.com/nspcc-dev/neofs-sdk-go/session" + "github.com/nspcc-dev/neofs-sdk-go/token" ) type commonPrm struct { @@ -60,7 +59,7 @@ func (x *commonPrm) SetBearerToken(tok *token.BearerToken) { // SetXHeaders sets request X-Headers. // // By default X-Headers will not be attached to the request. -func (x *commonPrm) SetXHeaders(xhdrs []*pkg.XHeader) { +func (x *commonPrm) SetXHeaders(xhdrs []*session.XHeader) { for _, xhdr := range xhdrs { x.opts = append(x.opts, client.WithXHeader(xhdr)) } @@ -76,7 +75,7 @@ type readPrmCommon struct { // // By default current epoch on the server will be used. func (x *readPrmCommon) SetNetmapEpoch(epoch uint64) { - xNetmapEpoch := pkg.NewXHeader() + xNetmapEpoch := session.NewXHeader() xNetmapEpoch.SetKey(session2.XHeaderNetmapEpoch) xNetmapEpoch.SetValue(strconv.FormatUint(epoch, 10)) diff --git a/pkg/services/object/put/remote.go b/pkg/services/object/put/remote.go index adaac9b7d..0f3ec3869 100644 --- a/pkg/services/object/put/remote.go +++ b/pkg/services/object/put/remote.go @@ -4,12 +4,12 @@ import ( "context" "fmt" - "github.com/nspcc-dev/neofs-api-go/pkg/netmap" clientcore "github.com/nspcc-dev/neofs-node/pkg/core/client" "github.com/nspcc-dev/neofs-node/pkg/core/object" internalclient "github.com/nspcc-dev/neofs-node/pkg/services/object/internal/client" "github.com/nspcc-dev/neofs-node/pkg/services/object/util" "github.com/nspcc-dev/neofs-node/pkg/services/object_manager/transformer" + "github.com/nspcc-dev/neofs-sdk-go/netmap" ) type remoteTarget struct { diff --git a/pkg/services/object/put/res.go b/pkg/services/object/put/res.go index 3ac432687..e09b3a0b3 100644 --- a/pkg/services/object/put/res.go +++ b/pkg/services/object/put/res.go @@ -1,7 +1,7 @@ package putsvc import ( - "github.com/nspcc-dev/neofs-api-go/pkg/object" + "github.com/nspcc-dev/neofs-sdk-go/object" ) type PutResponse struct { diff --git a/pkg/services/object/put/validation.go b/pkg/services/object/put/validation.go index 042c6b8ce..80067ef38 100644 --- a/pkg/services/object/put/validation.go +++ b/pkg/services/object/put/validation.go @@ -7,9 +7,9 @@ import ( "fmt" "hash" - "github.com/nspcc-dev/neofs-api-go/pkg" "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" "github.com/nspcc-dev/tzhash/tz" ) @@ -53,9 +53,9 @@ func (t *validatingTarget) WriteHeader(obj *object.RawObject) error { switch typ := cs.Type(); typ { default: return fmt.Errorf("(%T) unsupported payload checksum type %v", t, typ) - case pkg.ChecksumSHA256: + case checksum.SHA256: t.hash = sha256.New() - case pkg.ChecksumTZ: + case checksum.TZ: t.hash = tz.New() } diff --git a/pkg/services/object/search/exec.go b/pkg/services/object/search/exec.go index 830739e83..dfedd9eb2 100644 --- a/pkg/services/object/search/exec.go +++ b/pkg/services/object/search/exec.go @@ -3,11 +3,11 @@ package searchsvc import ( "context" - cid "github.com/nspcc-dev/neofs-api-go/pkg/container/id" - objectSDK "github.com/nspcc-dev/neofs-api-go/pkg/object" "github.com/nspcc-dev/neofs-node/pkg/core/client" "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" "go.uber.org/zap" ) diff --git a/pkg/services/object/search/prm.go b/pkg/services/object/search/prm.go index 49e19c211..2e0cdffd0 100644 --- a/pkg/services/object/search/prm.go +++ b/pkg/services/object/search/prm.go @@ -1,10 +1,10 @@ package searchsvc import ( - cid "github.com/nspcc-dev/neofs-api-go/pkg/container/id" - objectSDK "github.com/nspcc-dev/neofs-api-go/pkg/object" 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" ) // Prm groups parameters of Get service call. diff --git a/pkg/services/object/search/search_test.go b/pkg/services/object/search/search_test.go index 7dd04ae91..b1e4517ca 100644 --- a/pkg/services/object/search/search_test.go +++ b/pkg/services/object/search/search_test.go @@ -9,16 +9,16 @@ import ( "strconv" "testing" - "github.com/nspcc-dev/neofs-api-go/pkg/container" - cid "github.com/nspcc-dev/neofs-api-go/pkg/container/id" - cidtest "github.com/nspcc-dev/neofs-api-go/pkg/container/id/test" - "github.com/nspcc-dev/neofs-api-go/pkg/netmap" - objectSDK "github.com/nspcc-dev/neofs-api-go/pkg/object" clientcore "github.com/nspcc-dev/neofs-node/pkg/core/client" "github.com/nspcc-dev/neofs-node/pkg/network" "github.com/nspcc-dev/neofs-node/pkg/services/object/util" "github.com/nspcc-dev/neofs-node/pkg/services/object_manager/placement" "github.com/nspcc-dev/neofs-node/pkg/util/logger/test" + "github.com/nspcc-dev/neofs-sdk-go/container" + cid "github.com/nspcc-dev/neofs-sdk-go/container/id" + cidtest "github.com/nspcc-dev/neofs-sdk-go/container/id/test" + "github.com/nspcc-dev/neofs-sdk-go/netmap" + objectSDK "github.com/nspcc-dev/neofs-sdk-go/object" "github.com/stretchr/testify/require" ) @@ -159,7 +159,7 @@ func TestGetLocalOnly(t *testing.T) { storage := newTestStorage() svc := newSvc(storage) - cid := cidtest.Generate() + cid := cidtest.GenerateID() ids := generateIDs(10) storage.addResult(cid, ids, nil) @@ -175,7 +175,7 @@ func TestGetLocalOnly(t *testing.T) { storage := newTestStorage() svc := newSvc(storage) - cid := cidtest.Generate() + cid := cidtest.GenerateID() testErr := errors.New("any error") storage.addResult(cid, nil, testErr) diff --git a/pkg/services/object/search/service.go b/pkg/services/object/search/service.go index 940404301..299739d24 100644 --- a/pkg/services/object/search/service.go +++ b/pkg/services/object/search/service.go @@ -3,15 +3,15 @@ package searchsvc import ( "crypto/ecdsa" - cid "github.com/nspcc-dev/neofs-api-go/pkg/container/id" - "github.com/nspcc-dev/neofs-api-go/pkg/object" - "github.com/nspcc-dev/neofs-api-go/pkg/session" "github.com/nspcc-dev/neofs-node/pkg/core/client" "github.com/nspcc-dev/neofs-node/pkg/core/netmap" "github.com/nspcc-dev/neofs-node/pkg/local_object_storage/engine" "github.com/nspcc-dev/neofs-node/pkg/services/object/util" "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" + "github.com/nspcc-dev/neofs-sdk-go/object" + "github.com/nspcc-dev/neofs-sdk-go/session" "go.uber.org/zap" ) diff --git a/pkg/services/object/search/util.go b/pkg/services/object/search/util.go index 133e46469..348e3b43d 100644 --- a/pkg/services/object/search/util.go +++ b/pkg/services/object/search/util.go @@ -3,14 +3,14 @@ package searchsvc import ( "sync" - cid "github.com/nspcc-dev/neofs-api-go/pkg/container/id" - objectSDK "github.com/nspcc-dev/neofs-api-go/pkg/object" "github.com/nspcc-dev/neofs-node/pkg/core/client" "github.com/nspcc-dev/neofs-node/pkg/core/netmap" "github.com/nspcc-dev/neofs-node/pkg/local_object_storage/engine" internalclient "github.com/nspcc-dev/neofs-node/pkg/services/object/internal/client" "github.com/nspcc-dev/neofs-node/pkg/services/object/util" "github.com/nspcc-dev/neofs-node/pkg/services/object_manager/placement" + cid "github.com/nspcc-dev/neofs-sdk-go/container/id" + objectSDK "github.com/nspcc-dev/neofs-sdk-go/object" ) type uniqueIDWriter struct { diff --git a/pkg/services/object/search/v2/streamer.go b/pkg/services/object/search/v2/streamer.go index ebbb1494f..c16ac5251 100644 --- a/pkg/services/object/search/v2/streamer.go +++ b/pkg/services/object/search/v2/streamer.go @@ -1,10 +1,10 @@ package searchsvc import ( - objectSDK "github.com/nspcc-dev/neofs-api-go/pkg/object" "github.com/nspcc-dev/neofs-api-go/v2/object" "github.com/nspcc-dev/neofs-api-go/v2/refs" objectSvc "github.com/nspcc-dev/neofs-node/pkg/services/object" + objectSDK "github.com/nspcc-dev/neofs-sdk-go/object" ) type streamWriter struct { diff --git a/pkg/services/object/search/v2/util.go b/pkg/services/object/search/v2/util.go index a1dcb2522..09c8d7fa8 100644 --- a/pkg/services/object/search/v2/util.go +++ b/pkg/services/object/search/v2/util.go @@ -6,8 +6,6 @@ import ( "io" "sync" - cid "github.com/nspcc-dev/neofs-api-go/pkg/container/id" - objectSDK "github.com/nspcc-dev/neofs-api-go/pkg/object" rpcclient "github.com/nspcc-dev/neofs-api-go/rpc/client" objectV2 "github.com/nspcc-dev/neofs-api-go/v2/object" "github.com/nspcc-dev/neofs-api-go/v2/rpc" @@ -19,6 +17,8 @@ import ( "github.com/nspcc-dev/neofs-node/pkg/services/object/internal" 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" ) func (s *Service) toPrm(req *objectV2.SearchRequest, stream objectSvc.SearchStream) (*searchsvc.Prm, error) { diff --git a/pkg/services/object/util/chain.go b/pkg/services/object/util/chain.go index ff9280562..281179513 100644 --- a/pkg/services/object/util/chain.go +++ b/pkg/services/object/util/chain.go @@ -4,7 +4,7 @@ import ( "errors" "fmt" - objectSDK "github.com/nspcc-dev/neofs-api-go/pkg/object" + objectSDK "github.com/nspcc-dev/neofs-sdk-go/object" "github.com/nspcc-dev/neofs-node/pkg/core/object" ) diff --git a/pkg/services/object/util/key.go b/pkg/services/object/util/key.go index 74c8c05df..54aa0d4a6 100644 --- a/pkg/services/object/util/key.go +++ b/pkg/services/object/util/key.go @@ -4,9 +4,9 @@ import ( "crypto/ecdsa" "errors" - "github.com/nspcc-dev/neofs-api-go/pkg/session" "github.com/nspcc-dev/neofs-node/pkg/core/netmap" "github.com/nspcc-dev/neofs-node/pkg/services/session/storage" + "github.com/nspcc-dev/neofs-sdk-go/session" ) var ( diff --git a/pkg/services/object/util/key_test.go b/pkg/services/object/util/key_test.go index 19af7a19a..20b12bcac 100644 --- a/pkg/services/object/util/key_test.go +++ b/pkg/services/object/util/key_test.go @@ -7,10 +7,10 @@ import ( "github.com/google/uuid" "github.com/nspcc-dev/neo-go/pkg/crypto/keys" - "github.com/nspcc-dev/neofs-api-go/pkg/session" sessionV2 "github.com/nspcc-dev/neofs-api-go/v2/session" "github.com/nspcc-dev/neofs-node/pkg/services/object/util" tokenStorage "github.com/nspcc-dev/neofs-node/pkg/services/session/storage" + "github.com/nspcc-dev/neofs-sdk-go/session" "github.com/stretchr/testify/require" ) diff --git a/pkg/services/object/util/placement.go b/pkg/services/object/util/placement.go index a63da2a04..852ebb6ed 100644 --- a/pkg/services/object/util/placement.go +++ b/pkg/services/object/util/placement.go @@ -3,12 +3,12 @@ package util import ( "fmt" - netmapSDK "github.com/nspcc-dev/neofs-api-go/pkg/netmap" - "github.com/nspcc-dev/neofs-api-go/pkg/object" "github.com/nspcc-dev/neofs-node/pkg/core/container" "github.com/nspcc-dev/neofs-node/pkg/core/netmap" "github.com/nspcc-dev/neofs-node/pkg/network" "github.com/nspcc-dev/neofs-node/pkg/services/object_manager/placement" + netmapSDK "github.com/nspcc-dev/neofs-sdk-go/netmap" + "github.com/nspcc-dev/neofs-sdk-go/object" ) type localPlacement struct { diff --git a/pkg/services/object/util/prm.go b/pkg/services/object/util/prm.go index bb250e845..dbf2fdaf9 100644 --- a/pkg/services/object/util/prm.go +++ b/pkg/services/object/util/prm.go @@ -3,10 +3,9 @@ package util import ( "strconv" - "github.com/nspcc-dev/neofs-api-go/pkg" - sessionsdk "github.com/nspcc-dev/neofs-api-go/pkg/session" - "github.com/nspcc-dev/neofs-api-go/pkg/token" "github.com/nspcc-dev/neofs-api-go/v2/session" + sessionsdk "github.com/nspcc-dev/neofs-sdk-go/session" + "github.com/nspcc-dev/neofs-sdk-go/token" ) type CommonPrm struct { @@ -20,7 +19,7 @@ type CommonPrm struct { ttl uint32 - xhdrs []*pkg.XHeader + xhdrs []*sessionsdk.XHeader } // TTL returns TTL for new requests. @@ -33,7 +32,7 @@ func (p *CommonPrm) TTL() uint32 { } // Returns X-Headers for new requests. -func (p *CommonPrm) XHeaders() []*pkg.XHeader { +func (p *CommonPrm) XHeaders() []*sessionsdk.XHeader { if p != nil { return p.xhdrs } @@ -105,7 +104,7 @@ func CommonPrmFromV2(req interface { prm := &CommonPrm{ local: ttl <= 1, // FIXME: use constant - xhdrs: make([]*pkg.XHeader, 0, len(xHdrs)), + xhdrs: make([]*sessionsdk.XHeader, 0, len(xHdrs)), ttl: ttl - 1, // decrease TTL for new requests } @@ -134,7 +133,7 @@ func CommonPrmFromV2(req interface { return nil, err } default: - xhdr := pkg.NewXHeaderFromV2(xHdrs[i]) + xhdr := sessionsdk.NewXHeaderFromV2(xHdrs[i]) prm.xhdrs = append(prm.xhdrs, xhdr) } diff --git a/pkg/services/object_manager/placement/netmap.go b/pkg/services/object_manager/placement/netmap.go index 5c074b083..8261846e3 100644 --- a/pkg/services/object_manager/placement/netmap.go +++ b/pkg/services/object_manager/placement/netmap.go @@ -3,9 +3,9 @@ package placement import ( "fmt" - netmapSDK "github.com/nspcc-dev/neofs-api-go/pkg/netmap" - "github.com/nspcc-dev/neofs-api-go/pkg/object" "github.com/nspcc-dev/neofs-node/pkg/core/netmap" + netmapSDK "github.com/nspcc-dev/neofs-sdk-go/netmap" + "github.com/nspcc-dev/neofs-sdk-go/object" ) type netMapBuilder struct { diff --git a/pkg/services/object_manager/placement/traverser.go b/pkg/services/object_manager/placement/traverser.go index e86d74a1a..a29ae89b8 100644 --- a/pkg/services/object_manager/placement/traverser.go +++ b/pkg/services/object_manager/placement/traverser.go @@ -5,10 +5,10 @@ import ( "fmt" "sync" - "github.com/nspcc-dev/neofs-api-go/pkg/container" - "github.com/nspcc-dev/neofs-api-go/pkg/netmap" - "github.com/nspcc-dev/neofs-api-go/pkg/object" "github.com/nspcc-dev/neofs-node/pkg/network" + "github.com/nspcc-dev/neofs-sdk-go/container" + "github.com/nspcc-dev/neofs-sdk-go/netmap" + "github.com/nspcc-dev/neofs-sdk-go/object" ) // Builder is an interface of the diff --git a/pkg/services/object_manager/placement/traverser_test.go b/pkg/services/object_manager/placement/traverser_test.go index d567383a9..8d0cd35f9 100644 --- a/pkg/services/object_manager/placement/traverser_test.go +++ b/pkg/services/object_manager/placement/traverser_test.go @@ -4,10 +4,10 @@ import ( "strconv" "testing" - "github.com/nspcc-dev/neofs-api-go/pkg/container" - "github.com/nspcc-dev/neofs-api-go/pkg/netmap" - "github.com/nspcc-dev/neofs-api-go/pkg/object" "github.com/nspcc-dev/neofs-node/pkg/network" + "github.com/nspcc-dev/neofs-sdk-go/container" + "github.com/nspcc-dev/neofs-sdk-go/netmap" + "github.com/nspcc-dev/neofs-sdk-go/object" "github.com/stretchr/testify/require" ) diff --git a/pkg/services/object_manager/storagegroup/collect.go b/pkg/services/object_manager/storagegroup/collect.go index b08d64be5..e3bcc5069 100644 --- a/pkg/services/object_manager/storagegroup/collect.go +++ b/pkg/services/object_manager/storagegroup/collect.go @@ -1,13 +1,13 @@ package storagegroup import ( - "github.com/nspcc-dev/neofs-api-go/pkg" - "github.com/nspcc-dev/neofs-api-go/pkg/client" - cid "github.com/nspcc-dev/neofs-api-go/pkg/container/id" - objectSDK "github.com/nspcc-dev/neofs-api-go/pkg/object" - "github.com/nspcc-dev/neofs-api-go/pkg/storagegroup" "github.com/nspcc-dev/neofs-node/pkg/core/object" objutil "github.com/nspcc-dev/neofs-node/pkg/services/object/util" + "github.com/nspcc-dev/neofs-sdk-go/checksum" + "github.com/nspcc-dev/neofs-sdk-go/client" + 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/storagegroup" "github.com/nspcc-dev/tzhash/tz" ) @@ -43,7 +43,7 @@ func CollectMembers(r objutil.HeadReceiver, cid *cid.ID, members []*objectSDK.ID return nil, err } - cs := pkg.NewChecksum() + cs := checksum.New() tzHash := [client.TZSize]byte{} copy(tzHash[:], sumHash) cs.SetTillichZemor(tzHash) diff --git a/pkg/services/object_manager/storagegroup/search.go b/pkg/services/object_manager/storagegroup/search.go index 1cc00aae4..bf5cef716 100644 --- a/pkg/services/object_manager/storagegroup/search.go +++ b/pkg/services/object_manager/storagegroup/search.go @@ -1,7 +1,7 @@ package storagegroup import ( - "github.com/nspcc-dev/neofs-api-go/pkg/object" + "github.com/nspcc-dev/neofs-sdk-go/object" ) // SearchQuery returns search query to filter diff --git a/pkg/services/object_manager/transformer/fmt.go b/pkg/services/object_manager/transformer/fmt.go index 03bf9b28b..06c7521d1 100644 --- a/pkg/services/object_manager/transformer/fmt.go +++ b/pkg/services/object_manager/transformer/fmt.go @@ -4,11 +4,11 @@ import ( "crypto/ecdsa" "fmt" - "github.com/nspcc-dev/neofs-api-go/pkg" - objectSDK "github.com/nspcc-dev/neofs-api-go/pkg/object" - "github.com/nspcc-dev/neofs-api-go/pkg/session" "github.com/nspcc-dev/neofs-node/pkg/core/netmap" "github.com/nspcc-dev/neofs-node/pkg/core/object" + objectSDK "github.com/nspcc-dev/neofs-sdk-go/object" + "github.com/nspcc-dev/neofs-sdk-go/session" + "github.com/nspcc-dev/neofs-sdk-go/version" ) type formatter struct { @@ -64,7 +64,7 @@ func (f *formatter) Write(p []byte) (n int, err error) { func (f *formatter) Close() (*AccessIdentifiers, error) { curEpoch := f.prm.NetworkState.CurrentEpoch() - f.obj.SetVersion(pkg.SDKVersion()) + f.obj.SetVersion(version.Current()) f.obj.SetPayloadSize(f.sz) f.obj.SetSessionToken(f.prm.SessionToken) f.obj.SetCreationEpoch(curEpoch) diff --git a/pkg/services/object_manager/transformer/transformer.go b/pkg/services/object_manager/transformer/transformer.go index eae8ca2fe..0b4ca58dc 100644 --- a/pkg/services/object_manager/transformer/transformer.go +++ b/pkg/services/object_manager/transformer/transformer.go @@ -6,9 +6,9 @@ import ( "hash" "io" - "github.com/nspcc-dev/neofs-api-go/pkg" - objectSDK "github.com/nspcc-dev/neofs-api-go/pkg/object" "github.com/nspcc-dev/neofs-node/pkg/core/object" + "github.com/nspcc-dev/neofs-sdk-go/checksum" + objectSDK "github.com/nspcc-dev/neofs-sdk-go/object" "github.com/nspcc-dev/tzhash/tz" ) @@ -140,7 +140,7 @@ func payloadHashersForObject(obj *object.RawObject) []*payloadChecksumHasher { csSHA := [sha256.Size]byte{} copy(csSHA[:], cs) - checksum := pkg.NewChecksum() + checksum := checksum.New() checksum.SetSHA256(csSHA) obj.SetPayloadChecksum(checksum) @@ -156,7 +156,7 @@ func payloadHashersForObject(obj *object.RawObject) []*payloadChecksumHasher { csTZ := [tzChecksumSize]byte{} copy(csTZ[:], cs) - checksum := pkg.NewChecksum() + checksum := checksum.New() checksum.SetTillichZemor(csTZ) obj.SetPayloadHomomorphicHash(checksum) diff --git a/pkg/services/object_manager/transformer/types.go b/pkg/services/object_manager/transformer/types.go index ddbe12abd..14371f142 100644 --- a/pkg/services/object_manager/transformer/types.go +++ b/pkg/services/object_manager/transformer/types.go @@ -3,8 +3,8 @@ package transformer import ( "io" - objectSDK "github.com/nspcc-dev/neofs-api-go/pkg/object" "github.com/nspcc-dev/neofs-node/pkg/core/object" + objectSDK "github.com/nspcc-dev/neofs-sdk-go/object" ) // AccessIdentifiers represents group of the object identifiers diff --git a/pkg/services/policer/check.go b/pkg/services/policer/check.go index b32caf9e5..ca75e7cdf 100644 --- a/pkg/services/policer/check.go +++ b/pkg/services/policer/check.go @@ -5,12 +5,12 @@ import ( "errors" "strings" - "github.com/nspcc-dev/neofs-api-go/pkg/netmap" - "github.com/nspcc-dev/neofs-api-go/pkg/object" "github.com/nspcc-dev/neofs-node/pkg/core/container" "github.com/nspcc-dev/neofs-node/pkg/local_object_storage/engine" headsvc "github.com/nspcc-dev/neofs-node/pkg/services/object/head" "github.com/nspcc-dev/neofs-node/pkg/services/replicator" + "github.com/nspcc-dev/neofs-sdk-go/netmap" + "github.com/nspcc-dev/neofs-sdk-go/object" "go.uber.org/zap" ) diff --git a/pkg/services/policer/policer.go b/pkg/services/policer/policer.go index 337d1f56e..69348a373 100644 --- a/pkg/services/policer/policer.go +++ b/pkg/services/policer/policer.go @@ -4,7 +4,6 @@ import ( "sync" "time" - "github.com/nspcc-dev/neofs-api-go/pkg/object" "github.com/nspcc-dev/neofs-node/pkg/core/container" "github.com/nspcc-dev/neofs-node/pkg/core/netmap" "github.com/nspcc-dev/neofs-node/pkg/local_object_storage/engine" @@ -12,6 +11,7 @@ import ( "github.com/nspcc-dev/neofs-node/pkg/services/object_manager/placement" "github.com/nspcc-dev/neofs-node/pkg/services/replicator" "github.com/nspcc-dev/neofs-node/pkg/util/logger" + "github.com/nspcc-dev/neofs-sdk-go/object" "go.uber.org/zap" ) diff --git a/pkg/services/policer/queue.go b/pkg/services/policer/queue.go index ac7c5336c..f3864a6c2 100644 --- a/pkg/services/policer/queue.go +++ b/pkg/services/policer/queue.go @@ -1,9 +1,9 @@ package policer import ( - "github.com/nspcc-dev/neofs-api-go/pkg/object" "github.com/nspcc-dev/neofs-node/pkg/local_object_storage/engine" "github.com/nspcc-dev/neofs-node/pkg/util/rand" + "github.com/nspcc-dev/neofs-sdk-go/object" ) type jobQueue struct { diff --git a/pkg/services/replicator/task.go b/pkg/services/replicator/task.go index 1521a9c72..2baed4536 100644 --- a/pkg/services/replicator/task.go +++ b/pkg/services/replicator/task.go @@ -1,8 +1,8 @@ package replicator import ( - "github.com/nspcc-dev/neofs-api-go/pkg/netmap" - "github.com/nspcc-dev/neofs-api-go/pkg/object" + "github.com/nspcc-dev/neofs-sdk-go/netmap" + "github.com/nspcc-dev/neofs-sdk-go/object" ) // Task represents group of Replicator task parameters. diff --git a/pkg/services/reputation/common/managers.go b/pkg/services/reputation/common/managers.go index 9cddc8094..5f378f04b 100644 --- a/pkg/services/reputation/common/managers.go +++ b/pkg/services/reputation/common/managers.go @@ -5,10 +5,10 @@ import ( "fmt" "github.com/nspcc-dev/hrw" - apiNetmap "github.com/nspcc-dev/neofs-api-go/pkg/netmap" netmapcore "github.com/nspcc-dev/neofs-node/pkg/core/netmap" "github.com/nspcc-dev/neofs-node/pkg/services/reputation" "github.com/nspcc-dev/neofs-node/pkg/util/logger" + apiNetmap "github.com/nspcc-dev/neofs-sdk-go/netmap" "go.uber.org/zap" ) diff --git a/pkg/services/session/storage/executor.go b/pkg/services/session/storage/executor.go index ebb7af7c0..5edbdf95a 100644 --- a/pkg/services/session/storage/executor.go +++ b/pkg/services/session/storage/executor.go @@ -7,8 +7,8 @@ import ( "github.com/google/uuid" "github.com/mr-tron/base58" "github.com/nspcc-dev/neo-go/pkg/crypto/keys" - "github.com/nspcc-dev/neofs-api-go/pkg/owner" "github.com/nspcc-dev/neofs-api-go/v2/session" + "github.com/nspcc-dev/neofs-sdk-go/owner" ) func (s *TokenStore) Create(ctx context.Context, body *session.CreateRequestBody) (*session.CreateResponseBody, error) { diff --git a/pkg/services/session/storage/storage.go b/pkg/services/session/storage/storage.go index e480b7b4f..3d514aab0 100644 --- a/pkg/services/session/storage/storage.go +++ b/pkg/services/session/storage/storage.go @@ -5,7 +5,7 @@ import ( "sync" "github.com/mr-tron/base58" - "github.com/nspcc-dev/neofs-api-go/pkg/owner" + "github.com/nspcc-dev/neofs-sdk-go/owner" ) type key struct { diff --git a/pkg/services/util/response/service.go b/pkg/services/util/response/service.go index 5cdeb84ed..ff3879d36 100644 --- a/pkg/services/util/response/service.go +++ b/pkg/services/util/response/service.go @@ -1,11 +1,11 @@ package response import ( - "github.com/nspcc-dev/neofs-api-go/pkg" "github.com/nspcc-dev/neofs-api-go/v2/refs" "github.com/nspcc-dev/neofs-api-go/v2/session" "github.com/nspcc-dev/neofs-node/pkg/core/netmap" "github.com/nspcc-dev/neofs-node/pkg/services/util" + "github.com/nspcc-dev/neofs-sdk-go/version" ) // Service represents universal v2 service @@ -25,7 +25,7 @@ type cfg struct { func defaultCfg() *cfg { return &cfg{ - version: pkg.SDKVersion().ToV2(), + version: version.Current().ToV2(), } } diff --git a/pkg/util/attributes/parser.go b/pkg/util/attributes/parser.go index 46562a4ca..f188c0f2d 100644 --- a/pkg/util/attributes/parser.go +++ b/pkg/util/attributes/parser.go @@ -5,7 +5,7 @@ import ( "fmt" "strings" - "github.com/nspcc-dev/neofs-api-go/pkg/netmap" + "github.com/nspcc-dev/neofs-sdk-go/netmap" ) const (