forked from TrueCloudLab/frostfs-node
Move to frostfs-node
Signed-off-by: Pavel Karpy <p.karpy@yadro.com>
This commit is contained in:
parent
42554a9298
commit
923f84722a
934 changed files with 3470 additions and 3451 deletions
|
@ -4,7 +4,7 @@ import (
|
|||
"context"
|
||||
"fmt"
|
||||
|
||||
"github.com/nspcc-dev/neofs-api-go/v2/accounting"
|
||||
"github.com/TrueCloudLab/frostfs-api-go/v2/accounting"
|
||||
)
|
||||
|
||||
type ServiceExecutor interface {
|
||||
|
|
|
@ -5,10 +5,10 @@ import (
|
|||
"errors"
|
||||
"fmt"
|
||||
|
||||
"github.com/nspcc-dev/neofs-api-go/v2/accounting"
|
||||
"github.com/nspcc-dev/neofs-node/pkg/morph/client/balance"
|
||||
accountingSvc "github.com/nspcc-dev/neofs-node/pkg/services/accounting"
|
||||
"github.com/nspcc-dev/neofs-sdk-go/user"
|
||||
"github.com/TrueCloudLab/frostfs-api-go/v2/accounting"
|
||||
"github.com/TrueCloudLab/frostfs-node/pkg/morph/client/balance"
|
||||
accountingSvc "github.com/TrueCloudLab/frostfs-node/pkg/services/accounting"
|
||||
"github.com/TrueCloudLab/frostfs-sdk-go/user"
|
||||
)
|
||||
|
||||
type morphExecutor struct {
|
||||
|
|
|
@ -3,9 +3,9 @@ package accounting
|
|||
import (
|
||||
"context"
|
||||
|
||||
"github.com/nspcc-dev/neofs-api-go/v2/accounting"
|
||||
"github.com/nspcc-dev/neofs-node/pkg/services/util"
|
||||
"github.com/nspcc-dev/neofs-node/pkg/services/util/response"
|
||||
"github.com/TrueCloudLab/frostfs-api-go/v2/accounting"
|
||||
"github.com/TrueCloudLab/frostfs-node/pkg/services/util"
|
||||
"github.com/TrueCloudLab/frostfs-node/pkg/services/util/response"
|
||||
)
|
||||
|
||||
type responseService struct {
|
||||
|
|
|
@ -3,7 +3,7 @@ package accounting
|
|||
import (
|
||||
"context"
|
||||
|
||||
"github.com/nspcc-dev/neofs-api-go/v2/accounting"
|
||||
"github.com/TrueCloudLab/frostfs-api-go/v2/accounting"
|
||||
)
|
||||
|
||||
// Server is an interface of the NeoFS API Accounting service server.
|
||||
|
|
|
@ -4,8 +4,8 @@ import (
|
|||
"context"
|
||||
"crypto/ecdsa"
|
||||
|
||||
"github.com/nspcc-dev/neofs-api-go/v2/accounting"
|
||||
"github.com/nspcc-dev/neofs-node/pkg/services/util"
|
||||
"github.com/TrueCloudLab/frostfs-api-go/v2/accounting"
|
||||
"github.com/TrueCloudLab/frostfs-node/pkg/services/util"
|
||||
)
|
||||
|
||||
type signService struct {
|
||||
|
|
|
@ -5,14 +5,14 @@ import (
|
|||
"sync"
|
||||
"time"
|
||||
|
||||
"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"
|
||||
oid "github.com/nspcc-dev/neofs-sdk-go/object/id"
|
||||
"github.com/TrueCloudLab/frostfs-node/pkg/services/audit"
|
||||
"github.com/TrueCloudLab/frostfs-node/pkg/services/object_manager/placement"
|
||||
"github.com/TrueCloudLab/frostfs-node/pkg/util"
|
||||
"github.com/TrueCloudLab/frostfs-node/pkg/util/logger"
|
||||
cid "github.com/TrueCloudLab/frostfs-sdk-go/container/id"
|
||||
"github.com/TrueCloudLab/frostfs-sdk-go/netmap"
|
||||
"github.com/TrueCloudLab/frostfs-sdk-go/object"
|
||||
oid "github.com/TrueCloudLab/frostfs-sdk-go/object/id"
|
||||
"go.uber.org/atomic"
|
||||
"go.uber.org/zap"
|
||||
)
|
||||
|
|
|
@ -5,11 +5,11 @@ import (
|
|||
"sync"
|
||||
"time"
|
||||
|
||||
"github.com/nspcc-dev/neofs-node/pkg/util/rand"
|
||||
"github.com/nspcc-dev/neofs-sdk-go/netmap"
|
||||
"github.com/nspcc-dev/neofs-sdk-go/object"
|
||||
oid "github.com/nspcc-dev/neofs-sdk-go/object/id"
|
||||
"github.com/nspcc-dev/tzhash/tz"
|
||||
"github.com/TrueCloudLab/frostfs-node/pkg/util/rand"
|
||||
"github.com/TrueCloudLab/frostfs-sdk-go/netmap"
|
||||
"github.com/TrueCloudLab/frostfs-sdk-go/object"
|
||||
oid "github.com/TrueCloudLab/frostfs-sdk-go/object/id"
|
||||
"github.com/TrueCloudLab/tzhash/tz"
|
||||
"go.uber.org/zap"
|
||||
)
|
||||
|
||||
|
|
|
@ -1,9 +1,9 @@
|
|||
package auditor
|
||||
|
||||
import (
|
||||
"github.com/nspcc-dev/neofs-sdk-go/netmap"
|
||||
oid "github.com/nspcc-dev/neofs-sdk-go/object/id"
|
||||
"github.com/nspcc-dev/tzhash/tz"
|
||||
"github.com/TrueCloudLab/frostfs-sdk-go/netmap"
|
||||
oid "github.com/TrueCloudLab/frostfs-sdk-go/object/id"
|
||||
"github.com/TrueCloudLab/tzhash/tz"
|
||||
"go.uber.org/zap"
|
||||
)
|
||||
|
||||
|
|
|
@ -4,13 +4,13 @@ import (
|
|||
"bytes"
|
||||
"sync"
|
||||
|
||||
"github.com/nspcc-dev/neofs-node/pkg/services/object_manager/placement"
|
||||
"github.com/nspcc-dev/neofs-node/pkg/util/rand"
|
||||
containerSDK "github.com/nspcc-dev/neofs-sdk-go/container"
|
||||
"github.com/nspcc-dev/neofs-sdk-go/netmap"
|
||||
oid "github.com/nspcc-dev/neofs-sdk-go/object/id"
|
||||
storagegroupSDK "github.com/nspcc-dev/neofs-sdk-go/storagegroup"
|
||||
"github.com/nspcc-dev/tzhash/tz"
|
||||
"github.com/TrueCloudLab/frostfs-node/pkg/services/object_manager/placement"
|
||||
"github.com/TrueCloudLab/frostfs-node/pkg/util/rand"
|
||||
containerSDK "github.com/TrueCloudLab/frostfs-sdk-go/container"
|
||||
"github.com/TrueCloudLab/frostfs-sdk-go/netmap"
|
||||
oid "github.com/TrueCloudLab/frostfs-sdk-go/object/id"
|
||||
storagegroupSDK "github.com/TrueCloudLab/frostfs-sdk-go/storagegroup"
|
||||
"github.com/TrueCloudLab/tzhash/tz"
|
||||
"go.uber.org/zap"
|
||||
)
|
||||
|
||||
|
|
|
@ -1,7 +1,7 @@
|
|||
package auditor
|
||||
|
||||
import (
|
||||
"github.com/nspcc-dev/neofs-node/pkg/util/rand"
|
||||
"github.com/TrueCloudLab/frostfs-node/pkg/util/rand"
|
||||
)
|
||||
|
||||
// nextRandUint64 returns random uint64 number [0; n) outside exclude map.
|
||||
|
|
|
@ -3,9 +3,9 @@ package audit
|
|||
import (
|
||||
"sync"
|
||||
|
||||
"github.com/nspcc-dev/neofs-sdk-go/audit"
|
||||
cid "github.com/nspcc-dev/neofs-sdk-go/container/id"
|
||||
oid "github.com/nspcc-dev/neofs-sdk-go/object/id"
|
||||
"github.com/TrueCloudLab/frostfs-sdk-go/audit"
|
||||
cid "github.com/TrueCloudLab/frostfs-sdk-go/container/id"
|
||||
oid "github.com/TrueCloudLab/frostfs-sdk-go/object/id"
|
||||
)
|
||||
|
||||
// Report tracks the progress of auditing container data.
|
||||
|
|
|
@ -3,10 +3,10 @@ package audit
|
|||
import (
|
||||
"context"
|
||||
|
||||
"github.com/nspcc-dev/neofs-node/pkg/core/storagegroup"
|
||||
"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/TrueCloudLab/frostfs-node/pkg/core/storagegroup"
|
||||
"github.com/TrueCloudLab/frostfs-sdk-go/container"
|
||||
cid "github.com/TrueCloudLab/frostfs-sdk-go/container/id"
|
||||
"github.com/TrueCloudLab/frostfs-sdk-go/netmap"
|
||||
)
|
||||
|
||||
// Task groups groups the container audit parameters.
|
||||
|
|
|
@ -3,8 +3,8 @@ package audittask
|
|||
import (
|
||||
"context"
|
||||
|
||||
"github.com/nspcc-dev/neofs-node/pkg/services/audit"
|
||||
"github.com/nspcc-dev/neofs-node/pkg/services/audit/auditor"
|
||||
"github.com/TrueCloudLab/frostfs-node/pkg/services/audit"
|
||||
"github.com/TrueCloudLab/frostfs-node/pkg/services/audit/auditor"
|
||||
"go.uber.org/zap"
|
||||
)
|
||||
|
||||
|
|
|
@ -3,10 +3,10 @@ package audittask
|
|||
import (
|
||||
"time"
|
||||
|
||||
"github.com/nspcc-dev/neofs-node/pkg/services/audit"
|
||||
"github.com/nspcc-dev/neofs-node/pkg/services/audit/auditor"
|
||||
"github.com/nspcc-dev/neofs-node/pkg/util"
|
||||
"github.com/nspcc-dev/neofs-node/pkg/util/logger"
|
||||
"github.com/TrueCloudLab/frostfs-node/pkg/services/audit"
|
||||
"github.com/TrueCloudLab/frostfs-node/pkg/services/audit/auditor"
|
||||
"github.com/TrueCloudLab/frostfs-node/pkg/util"
|
||||
"github.com/TrueCloudLab/frostfs-node/pkg/util/logger"
|
||||
"go.uber.org/zap"
|
||||
)
|
||||
|
||||
|
|
|
@ -1,7 +1,7 @@
|
|||
package audittask
|
||||
|
||||
import (
|
||||
"github.com/nspcc-dev/neofs-node/pkg/services/audit"
|
||||
"github.com/TrueCloudLab/frostfs-node/pkg/services/audit"
|
||||
)
|
||||
|
||||
// PushTask adds a task to the queue for processing.
|
||||
|
|
|
@ -3,8 +3,8 @@ package loadcontroller
|
|||
import (
|
||||
"context"
|
||||
|
||||
"github.com/nspcc-dev/neofs-node/pkg/util/logger"
|
||||
"github.com/nspcc-dev/neofs-sdk-go/container"
|
||||
"github.com/TrueCloudLab/frostfs-node/pkg/util/logger"
|
||||
"github.com/TrueCloudLab/frostfs-sdk-go/container"
|
||||
"go.uber.org/zap"
|
||||
)
|
||||
|
||||
|
|
|
@ -6,9 +6,9 @@ import (
|
|||
"sync"
|
||||
"testing"
|
||||
|
||||
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"
|
||||
loadcontroller "github.com/TrueCloudLab/frostfs-node/pkg/services/container/announcement/load/controller"
|
||||
"github.com/TrueCloudLab/frostfs-sdk-go/container"
|
||||
cidtest "github.com/TrueCloudLab/frostfs-sdk-go/container/id/test"
|
||||
"github.com/stretchr/testify/require"
|
||||
)
|
||||
|
||||
|
|
|
@ -4,7 +4,7 @@ import (
|
|||
"context"
|
||||
"io"
|
||||
|
||||
"github.com/nspcc-dev/neofs-sdk-go/container"
|
||||
"github.com/TrueCloudLab/frostfs-sdk-go/container"
|
||||
)
|
||||
|
||||
// UsedSpaceHandler describes the signature of the container.SizeEstimation
|
||||
|
|
|
@ -1,7 +1,7 @@
|
|||
package loadcontroller
|
||||
|
||||
import (
|
||||
"github.com/nspcc-dev/neofs-node/pkg/util/logger"
|
||||
"github.com/TrueCloudLab/frostfs-node/pkg/util/logger"
|
||||
"go.uber.org/zap"
|
||||
)
|
||||
|
||||
|
|
|
@ -3,7 +3,7 @@ package loadcontroller
|
|||
import (
|
||||
"context"
|
||||
|
||||
"github.com/nspcc-dev/neofs-sdk-go/container"
|
||||
"github.com/TrueCloudLab/frostfs-sdk-go/container"
|
||||
)
|
||||
|
||||
func usedSpaceFilterEpochEQ(epoch uint64) UsedSpaceFilter {
|
||||
|
|
|
@ -5,8 +5,8 @@ import (
|
|||
"encoding/hex"
|
||||
"sync"
|
||||
|
||||
loadcontroller "github.com/nspcc-dev/neofs-node/pkg/services/container/announcement/load/controller"
|
||||
"github.com/nspcc-dev/neofs-sdk-go/container"
|
||||
loadcontroller "github.com/TrueCloudLab/frostfs-node/pkg/services/container/announcement/load/controller"
|
||||
"github.com/TrueCloudLab/frostfs-sdk-go/container"
|
||||
"go.uber.org/zap"
|
||||
)
|
||||
|
||||
|
|
|
@ -1,8 +1,8 @@
|
|||
package loadroute
|
||||
|
||||
import (
|
||||
loadcontroller "github.com/nspcc-dev/neofs-node/pkg/services/container/announcement/load/controller"
|
||||
"github.com/nspcc-dev/neofs-sdk-go/container"
|
||||
loadcontroller "github.com/TrueCloudLab/frostfs-node/pkg/services/container/announcement/load/controller"
|
||||
"github.com/TrueCloudLab/frostfs-sdk-go/container"
|
||||
)
|
||||
|
||||
// ServerInfo describes a set of
|
||||
|
|
|
@ -1,7 +1,7 @@
|
|||
package loadroute
|
||||
|
||||
import (
|
||||
"github.com/nspcc-dev/neofs-node/pkg/util/logger"
|
||||
"github.com/TrueCloudLab/frostfs-node/pkg/util/logger"
|
||||
"go.uber.org/zap"
|
||||
)
|
||||
|
||||
|
|
|
@ -4,9 +4,9 @@ import (
|
|||
"bytes"
|
||||
"fmt"
|
||||
|
||||
netmapcore "github.com/nspcc-dev/neofs-node/pkg/core/netmap"
|
||||
loadroute "github.com/nspcc-dev/neofs-node/pkg/services/container/announcement/load/route"
|
||||
"github.com/nspcc-dev/neofs-sdk-go/container"
|
||||
netmapcore "github.com/TrueCloudLab/frostfs-node/pkg/core/netmap"
|
||||
loadroute "github.com/TrueCloudLab/frostfs-node/pkg/services/container/announcement/load/route"
|
||||
"github.com/TrueCloudLab/frostfs-sdk-go/container"
|
||||
)
|
||||
|
||||
// NextStage composes container nodes for the container and epoch from a,
|
||||
|
|
|
@ -1,8 +1,8 @@
|
|||
package placementrouter
|
||||
|
||||
import (
|
||||
cid "github.com/nspcc-dev/neofs-sdk-go/container/id"
|
||||
"github.com/nspcc-dev/neofs-sdk-go/netmap"
|
||||
cid "github.com/TrueCloudLab/frostfs-sdk-go/container/id"
|
||||
"github.com/TrueCloudLab/frostfs-sdk-go/netmap"
|
||||
)
|
||||
|
||||
// PlacementBuilder describes interface of NeoFS placement calculator.
|
||||
|
|
|
@ -3,7 +3,7 @@ package loadroute
|
|||
import (
|
||||
"fmt"
|
||||
|
||||
"github.com/nspcc-dev/neofs-node/pkg/util/logger"
|
||||
"github.com/TrueCloudLab/frostfs-node/pkg/util/logger"
|
||||
)
|
||||
|
||||
// Prm groups the required parameters of the Router's constructor.
|
||||
|
|
|
@ -4,7 +4,7 @@ import (
|
|||
"bytes"
|
||||
"errors"
|
||||
|
||||
"github.com/nspcc-dev/neofs-sdk-go/container"
|
||||
"github.com/TrueCloudLab/frostfs-sdk-go/container"
|
||||
)
|
||||
|
||||
var errWrongRoute = errors.New("wrong route")
|
||||
|
|
|
@ -4,8 +4,8 @@ import (
|
|||
"sort"
|
||||
"sync"
|
||||
|
||||
loadcontroller "github.com/nspcc-dev/neofs-node/pkg/services/container/announcement/load/controller"
|
||||
"github.com/nspcc-dev/neofs-sdk-go/container"
|
||||
loadcontroller "github.com/TrueCloudLab/frostfs-node/pkg/services/container/announcement/load/controller"
|
||||
"github.com/TrueCloudLab/frostfs-sdk-go/container"
|
||||
)
|
||||
|
||||
type usedSpaceEstimations struct {
|
||||
|
|
|
@ -4,8 +4,8 @@ import (
|
|||
"math/rand"
|
||||
"testing"
|
||||
|
||||
"github.com/nspcc-dev/neofs-sdk-go/container"
|
||||
cidtest "github.com/nspcc-dev/neofs-sdk-go/container/id/test"
|
||||
"github.com/TrueCloudLab/frostfs-sdk-go/container"
|
||||
cidtest "github.com/TrueCloudLab/frostfs-sdk-go/container/id/test"
|
||||
"github.com/stretchr/testify/require"
|
||||
)
|
||||
|
||||
|
|
|
@ -4,8 +4,8 @@ import (
|
|||
"context"
|
||||
"fmt"
|
||||
|
||||
"github.com/nspcc-dev/neofs-api-go/v2/container"
|
||||
"github.com/nspcc-dev/neofs-api-go/v2/session"
|
||||
"github.com/TrueCloudLab/frostfs-api-go/v2/container"
|
||||
"github.com/TrueCloudLab/frostfs-api-go/v2/session"
|
||||
)
|
||||
|
||||
type ServiceExecutor interface {
|
||||
|
|
|
@ -5,15 +5,15 @@ import (
|
|||
"errors"
|
||||
"fmt"
|
||||
|
||||
"github.com/nspcc-dev/neofs-api-go/v2/container"
|
||||
"github.com/nspcc-dev/neofs-api-go/v2/refs"
|
||||
sessionV2 "github.com/nspcc-dev/neofs-api-go/v2/session"
|
||||
containercore "github.com/nspcc-dev/neofs-node/pkg/core/container"
|
||||
containerSvc "github.com/nspcc-dev/neofs-node/pkg/services/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/session"
|
||||
"github.com/nspcc-dev/neofs-sdk-go/user"
|
||||
"github.com/TrueCloudLab/frostfs-api-go/v2/container"
|
||||
"github.com/TrueCloudLab/frostfs-api-go/v2/refs"
|
||||
sessionV2 "github.com/TrueCloudLab/frostfs-api-go/v2/session"
|
||||
containercore "github.com/TrueCloudLab/frostfs-node/pkg/core/container"
|
||||
containerSvc "github.com/TrueCloudLab/frostfs-node/pkg/services/container"
|
||||
cid "github.com/TrueCloudLab/frostfs-sdk-go/container/id"
|
||||
eaclSDK "github.com/TrueCloudLab/frostfs-sdk-go/eacl"
|
||||
"github.com/TrueCloudLab/frostfs-sdk-go/session"
|
||||
"github.com/TrueCloudLab/frostfs-sdk-go/user"
|
||||
)
|
||||
|
||||
type morphExecutor struct {
|
||||
|
|
|
@ -4,19 +4,19 @@ import (
|
|||
"context"
|
||||
"testing"
|
||||
|
||||
"github.com/TrueCloudLab/frostfs-api-go/v2/container"
|
||||
"github.com/TrueCloudLab/frostfs-api-go/v2/refs"
|
||||
"github.com/TrueCloudLab/frostfs-api-go/v2/session"
|
||||
containerCore "github.com/TrueCloudLab/frostfs-node/pkg/core/container"
|
||||
containerSvc "github.com/TrueCloudLab/frostfs-node/pkg/services/container"
|
||||
containerSvcMorph "github.com/TrueCloudLab/frostfs-node/pkg/services/container/morph"
|
||||
cid "github.com/TrueCloudLab/frostfs-sdk-go/container/id"
|
||||
cidtest "github.com/TrueCloudLab/frostfs-sdk-go/container/id/test"
|
||||
containertest "github.com/TrueCloudLab/frostfs-sdk-go/container/test"
|
||||
frostfscrypto "github.com/TrueCloudLab/frostfs-sdk-go/crypto"
|
||||
frostfsecdsa "github.com/TrueCloudLab/frostfs-sdk-go/crypto/ecdsa"
|
||||
sessiontest "github.com/TrueCloudLab/frostfs-sdk-go/session/test"
|
||||
"github.com/nspcc-dev/neo-go/pkg/crypto/keys"
|
||||
"github.com/nspcc-dev/neofs-api-go/v2/container"
|
||||
"github.com/nspcc-dev/neofs-api-go/v2/refs"
|
||||
"github.com/nspcc-dev/neofs-api-go/v2/session"
|
||||
containerCore "github.com/nspcc-dev/neofs-node/pkg/core/container"
|
||||
containerSvc "github.com/nspcc-dev/neofs-node/pkg/services/container"
|
||||
containerSvcMorph "github.com/nspcc-dev/neofs-node/pkg/services/container/morph"
|
||||
cid "github.com/nspcc-dev/neofs-sdk-go/container/id"
|
||||
cidtest "github.com/nspcc-dev/neofs-sdk-go/container/id/test"
|
||||
containertest "github.com/nspcc-dev/neofs-sdk-go/container/test"
|
||||
neofscrypto "github.com/nspcc-dev/neofs-sdk-go/crypto"
|
||||
neofsecdsa "github.com/nspcc-dev/neofs-sdk-go/crypto/ecdsa"
|
||||
sessiontest "github.com/nspcc-dev/neofs-sdk-go/session/test"
|
||||
"github.com/stretchr/testify/require"
|
||||
)
|
||||
|
||||
|
@ -52,8 +52,8 @@ func TestInvalidToken(t *testing.T) {
|
|||
StableMarshal([]byte) []byte
|
||||
SetSignature(signature *refs.Signature)
|
||||
}) {
|
||||
signer := neofsecdsa.Signer(priv.PrivateKey)
|
||||
var sig neofscrypto.Signature
|
||||
signer := frostfsecdsa.Signer(priv.PrivateKey)
|
||||
var sig frostfscrypto.Signature
|
||||
require.NoError(t, sig.Calculate(signer, reqBody.StableMarshal(nil)))
|
||||
|
||||
var sigV2 refs.Signature
|
||||
|
|
|
@ -3,9 +3,9 @@ package container
|
|||
import (
|
||||
"context"
|
||||
|
||||
"github.com/nspcc-dev/neofs-api-go/v2/container"
|
||||
"github.com/nspcc-dev/neofs-node/pkg/services/util"
|
||||
"github.com/nspcc-dev/neofs-node/pkg/services/util/response"
|
||||
"github.com/TrueCloudLab/frostfs-api-go/v2/container"
|
||||
"github.com/TrueCloudLab/frostfs-node/pkg/services/util"
|
||||
"github.com/TrueCloudLab/frostfs-node/pkg/services/util/response"
|
||||
)
|
||||
|
||||
type responseService struct {
|
||||
|
|
|
@ -3,7 +3,7 @@ package container
|
|||
import (
|
||||
"context"
|
||||
|
||||
"github.com/nspcc-dev/neofs-api-go/v2/container"
|
||||
"github.com/TrueCloudLab/frostfs-api-go/v2/container"
|
||||
)
|
||||
|
||||
// Server is an interface of the NeoFS API Container service server.
|
||||
|
|
|
@ -4,8 +4,8 @@ import (
|
|||
"context"
|
||||
"crypto/ecdsa"
|
||||
|
||||
"github.com/nspcc-dev/neofs-api-go/v2/container"
|
||||
"github.com/nspcc-dev/neofs-node/pkg/services/util"
|
||||
"github.com/TrueCloudLab/frostfs-api-go/v2/container"
|
||||
"github.com/TrueCloudLab/frostfs-node/pkg/services/util"
|
||||
)
|
||||
|
||||
type signService struct {
|
||||
|
|
|
@ -1,8 +1,8 @@
|
|||
package control
|
||||
|
||||
import (
|
||||
"github.com/nspcc-dev/neofs-api-go/v2/rpc/grpc"
|
||||
"github.com/nspcc-dev/neofs-api-go/v2/rpc/message"
|
||||
"github.com/TrueCloudLab/frostfs-api-go/v2/rpc/grpc"
|
||||
"github.com/TrueCloudLab/frostfs-api-go/v2/rpc/message"
|
||||
)
|
||||
|
||||
type requestWrapper struct {
|
||||
|
|
|
@ -1,8 +1,8 @@
|
|||
package control
|
||||
|
||||
import (
|
||||
"github.com/nspcc-dev/neofs-api-go/v2/rpc/grpc"
|
||||
"github.com/nspcc-dev/neofs-api-go/v2/rpc/message"
|
||||
"github.com/TrueCloudLab/frostfs-api-go/v2/rpc/grpc"
|
||||
"github.com/TrueCloudLab/frostfs-api-go/v2/rpc/message"
|
||||
)
|
||||
|
||||
type requestWrapper struct {
|
||||
|
|
|
@ -1,8 +1,8 @@
|
|||
package control
|
||||
|
||||
import (
|
||||
"github.com/nspcc-dev/neofs-api-go/v2/rpc/client"
|
||||
"github.com/nspcc-dev/neofs-api-go/v2/rpc/common"
|
||||
"github.com/TrueCloudLab/frostfs-api-go/v2/rpc/client"
|
||||
"github.com/TrueCloudLab/frostfs-api-go/v2/rpc/common"
|
||||
)
|
||||
|
||||
const serviceName = "ircontrol.ControlService"
|
||||
|
|
|
@ -3,7 +3,7 @@ package control
|
|||
import (
|
||||
"context"
|
||||
|
||||
control "github.com/nspcc-dev/neofs-node/pkg/services/control/ir"
|
||||
control "github.com/TrueCloudLab/frostfs-node/pkg/services/control/ir"
|
||||
"google.golang.org/grpc/codes"
|
||||
"google.golang.org/grpc/status"
|
||||
)
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
package control
|
||||
|
||||
import control "github.com/nspcc-dev/neofs-node/pkg/services/control/ir"
|
||||
import control "github.com/TrueCloudLab/frostfs-node/pkg/services/control/ir"
|
||||
|
||||
// HealthChecker is component interface for calculating
|
||||
// the current health status of a node.
|
||||
|
|
|
@ -6,10 +6,10 @@ import (
|
|||
"errors"
|
||||
"fmt"
|
||||
|
||||
"github.com/nspcc-dev/neofs-api-go/v2/refs"
|
||||
control "github.com/nspcc-dev/neofs-node/pkg/services/control/ir"
|
||||
neofscrypto "github.com/nspcc-dev/neofs-sdk-go/crypto"
|
||||
neofsecdsa "github.com/nspcc-dev/neofs-sdk-go/crypto/ecdsa"
|
||||
"github.com/TrueCloudLab/frostfs-api-go/v2/refs"
|
||||
control "github.com/TrueCloudLab/frostfs-node/pkg/services/control/ir"
|
||||
frostfscrypto "github.com/TrueCloudLab/frostfs-sdk-go/crypto"
|
||||
frostfsecdsa "github.com/TrueCloudLab/frostfs-sdk-go/crypto/ecdsa"
|
||||
)
|
||||
|
||||
// SignedMessage is an interface of Control service message.
|
||||
|
@ -56,7 +56,7 @@ func (s *Server) isValidRequest(req SignedMessage) error {
|
|||
sigV2.SetSign(sign.GetSign())
|
||||
sigV2.SetScheme(refs.ECDSA_SHA512)
|
||||
|
||||
var sig neofscrypto.Signature
|
||||
var sig frostfscrypto.Signature
|
||||
if err := sig.ReadFromV2(sigV2); err != nil {
|
||||
return fmt.Errorf("can't read signature: %w", err)
|
||||
}
|
||||
|
@ -76,9 +76,9 @@ func SignMessage(key *ecdsa.PrivateKey, msg SignedMessage) error {
|
|||
return fmt.Errorf("marshal request body: %w", err)
|
||||
}
|
||||
|
||||
var sig neofscrypto.Signature
|
||||
var sig frostfscrypto.Signature
|
||||
|
||||
err = sig.Calculate(neofsecdsa.Signer(*key), binBody)
|
||||
err = sig.Calculate(frostfsecdsa.Signer(*key), binBody)
|
||||
if err != nil {
|
||||
return fmt.Errorf("calculate signature: %w", err)
|
||||
}
|
||||
|
|
5
pkg/services/control/ir/service.pb.go
generated
5
pkg/services/control/ir/service.pb.go
generated
|
@ -7,10 +7,11 @@
|
|||
package control
|
||||
|
||||
import (
|
||||
protoreflect "google.golang.org/protobuf/reflect/protoreflect"
|
||||
protoimpl "google.golang.org/protobuf/runtime/protoimpl"
|
||||
reflect "reflect"
|
||||
sync "sync"
|
||||
|
||||
protoreflect "google.golang.org/protobuf/reflect/protoreflect"
|
||||
protoimpl "google.golang.org/protobuf/runtime/protoimpl"
|
||||
)
|
||||
|
||||
const (
|
||||
|
|
|
@ -4,7 +4,7 @@ package ircontrol;
|
|||
|
||||
import "pkg/services/control/ir/types.proto";
|
||||
|
||||
option go_package = "github.com/nspcc-dev/neofs-node/pkg/services/ir/control";
|
||||
option go_package = "github.com/TrueCloudLab/frostfs-node/pkg/services/ir/control";
|
||||
|
||||
// `ControlService` provides an interface for internal work with the Inner Ring node.
|
||||
service ControlService {
|
||||
|
|
1
pkg/services/control/ir/service_grpc.pb.go
generated
1
pkg/services/control/ir/service_grpc.pb.go
generated
|
@ -8,6 +8,7 @@ package control
|
|||
|
||||
import (
|
||||
context "context"
|
||||
|
||||
grpc "google.golang.org/grpc"
|
||||
codes "google.golang.org/grpc/codes"
|
||||
status "google.golang.org/grpc/status"
|
||||
|
|
4
pkg/services/control/ir/service_neofs.pb.go
generated
4
pkg/services/control/ir/service_neofs.pb.go
generated
|
@ -1,8 +1,8 @@
|
|||
// Code generated by protoc-gen-go-neofs. DO NOT EDIT.
|
||||
// Code generated by protoc-gen-go-frostfs. DO NOT EDIT.
|
||||
|
||||
package control
|
||||
|
||||
import "github.com/nspcc-dev/neofs-api-go/v2/util/proto"
|
||||
import "github.com/TrueCloudLab/frostfs-api-go/v2/util/proto"
|
||||
|
||||
// StableSize returns the size of x in protobuf format.
|
||||
//
|
||||
|
|
|
@ -3,7 +3,7 @@ package control_test
|
|||
import (
|
||||
"testing"
|
||||
|
||||
control "github.com/nspcc-dev/neofs-node/pkg/services/control/ir"
|
||||
control "github.com/TrueCloudLab/frostfs-node/pkg/services/control/ir"
|
||||
"github.com/stretchr/testify/require"
|
||||
"google.golang.org/protobuf/proto"
|
||||
)
|
||||
|
|
5
pkg/services/control/ir/types.pb.go
generated
5
pkg/services/control/ir/types.pb.go
generated
|
@ -7,10 +7,11 @@
|
|||
package control
|
||||
|
||||
import (
|
||||
protoreflect "google.golang.org/protobuf/reflect/protoreflect"
|
||||
protoimpl "google.golang.org/protobuf/runtime/protoimpl"
|
||||
reflect "reflect"
|
||||
sync "sync"
|
||||
|
||||
protoreflect "google.golang.org/protobuf/reflect/protoreflect"
|
||||
protoimpl "google.golang.org/protobuf/runtime/protoimpl"
|
||||
)
|
||||
|
||||
const (
|
||||
|
|
|
@ -2,7 +2,7 @@ syntax = "proto3";
|
|||
|
||||
package ircontrol;
|
||||
|
||||
option go_package = "github.com/nspcc-dev/neofs-node/pkg/services/ir/control";
|
||||
option go_package = "github.com/TrueCloudLab/frostfs-node/pkg/services/ir/control";
|
||||
|
||||
// Signature of some message.
|
||||
message Signature {
|
||||
|
|
4
pkg/services/control/ir/types_neofs.pb.go
generated
4
pkg/services/control/ir/types_neofs.pb.go
generated
|
@ -1,8 +1,8 @@
|
|||
// Code generated by protoc-gen-go-neofs. DO NOT EDIT.
|
||||
// Code generated by protoc-gen-go-frostfs. DO NOT EDIT.
|
||||
|
||||
package control
|
||||
|
||||
import "github.com/nspcc-dev/neofs-api-go/v2/util/proto"
|
||||
import "github.com/TrueCloudLab/frostfs-api-go/v2/util/proto"
|
||||
|
||||
// StableSize returns the size of x in protobuf format.
|
||||
//
|
||||
|
|
|
@ -1,8 +1,8 @@
|
|||
package control
|
||||
|
||||
import (
|
||||
"github.com/nspcc-dev/neofs-api-go/v2/rpc/client"
|
||||
"github.com/nspcc-dev/neofs-api-go/v2/rpc/common"
|
||||
"github.com/TrueCloudLab/frostfs-api-go/v2/rpc/client"
|
||||
"github.com/TrueCloudLab/frostfs-api-go/v2/rpc/common"
|
||||
)
|
||||
|
||||
const serviceName = "control.ControlService"
|
||||
|
|
|
@ -3,8 +3,8 @@ package control
|
|||
import (
|
||||
"context"
|
||||
|
||||
"github.com/nspcc-dev/neofs-node/pkg/local_object_storage/shard"
|
||||
"github.com/nspcc-dev/neofs-node/pkg/services/control"
|
||||
"github.com/TrueCloudLab/frostfs-node/pkg/local_object_storage/shard"
|
||||
"github.com/TrueCloudLab/frostfs-node/pkg/services/control"
|
||||
"google.golang.org/grpc/codes"
|
||||
"google.golang.org/grpc/status"
|
||||
)
|
||||
|
|
|
@ -7,14 +7,14 @@ import (
|
|||
"errors"
|
||||
"fmt"
|
||||
|
||||
"github.com/TrueCloudLab/frostfs-node/pkg/local_object_storage/engine"
|
||||
"github.com/TrueCloudLab/frostfs-node/pkg/services/control"
|
||||
"github.com/TrueCloudLab/frostfs-node/pkg/services/object_manager/placement"
|
||||
"github.com/TrueCloudLab/frostfs-node/pkg/services/replicator"
|
||||
"github.com/TrueCloudLab/frostfs-sdk-go/netmap"
|
||||
objectSDK "github.com/TrueCloudLab/frostfs-sdk-go/object"
|
||||
oid "github.com/TrueCloudLab/frostfs-sdk-go/object/id"
|
||||
"github.com/nspcc-dev/neo-go/pkg/crypto/keys"
|
||||
"github.com/nspcc-dev/neofs-node/pkg/local_object_storage/engine"
|
||||
"github.com/nspcc-dev/neofs-node/pkg/services/control"
|
||||
"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-sdk-go/netmap"
|
||||
objectSDK "github.com/nspcc-dev/neofs-sdk-go/object"
|
||||
oid "github.com/nspcc-dev/neofs-sdk-go/object/id"
|
||||
"google.golang.org/grpc/codes"
|
||||
"google.golang.org/grpc/status"
|
||||
)
|
||||
|
|
|
@ -3,8 +3,8 @@ package control
|
|||
import (
|
||||
"context"
|
||||
|
||||
"github.com/nspcc-dev/neofs-node/pkg/local_object_storage/engine"
|
||||
"github.com/nspcc-dev/neofs-node/pkg/services/control"
|
||||
"github.com/TrueCloudLab/frostfs-node/pkg/local_object_storage/engine"
|
||||
"github.com/TrueCloudLab/frostfs-node/pkg/services/control"
|
||||
"google.golang.org/grpc/codes"
|
||||
"google.golang.org/grpc/status"
|
||||
)
|
||||
|
|
|
@ -4,9 +4,9 @@ import (
|
|||
"context"
|
||||
"fmt"
|
||||
|
||||
"github.com/nspcc-dev/neofs-node/pkg/local_object_storage/engine"
|
||||
"github.com/nspcc-dev/neofs-node/pkg/services/control"
|
||||
oid "github.com/nspcc-dev/neofs-sdk-go/object/id"
|
||||
"github.com/TrueCloudLab/frostfs-node/pkg/local_object_storage/engine"
|
||||
"github.com/TrueCloudLab/frostfs-node/pkg/services/control"
|
||||
oid "github.com/TrueCloudLab/frostfs-sdk-go/object/id"
|
||||
"google.golang.org/grpc/codes"
|
||||
"google.golang.org/grpc/status"
|
||||
)
|
||||
|
|
|
@ -3,7 +3,7 @@ package control
|
|||
import (
|
||||
"context"
|
||||
|
||||
"github.com/nspcc-dev/neofs-node/pkg/services/control"
|
||||
"github.com/TrueCloudLab/frostfs-node/pkg/services/control"
|
||||
"google.golang.org/grpc/codes"
|
||||
"google.golang.org/grpc/status"
|
||||
)
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
package control
|
||||
|
||||
import "github.com/nspcc-dev/neofs-node/pkg/local_object_storage/shard"
|
||||
import "github.com/TrueCloudLab/frostfs-node/pkg/local_object_storage/shard"
|
||||
|
||||
func (s *Server) getShardIDList(raw [][]byte) []*shard.ID {
|
||||
if len(raw) != 0 {
|
||||
|
|
|
@ -3,9 +3,9 @@ package control
|
|||
import (
|
||||
"context"
|
||||
|
||||
"github.com/nspcc-dev/neofs-node/pkg/local_object_storage/blobstor"
|
||||
"github.com/nspcc-dev/neofs-node/pkg/local_object_storage/shard/mode"
|
||||
"github.com/nspcc-dev/neofs-node/pkg/services/control"
|
||||
"github.com/TrueCloudLab/frostfs-node/pkg/local_object_storage/blobstor"
|
||||
"github.com/TrueCloudLab/frostfs-node/pkg/local_object_storage/shard/mode"
|
||||
"github.com/TrueCloudLab/frostfs-node/pkg/services/control"
|
||||
"google.golang.org/grpc/codes"
|
||||
"google.golang.org/grpc/status"
|
||||
)
|
||||
|
|
|
@ -3,8 +3,8 @@ package control
|
|||
import (
|
||||
"context"
|
||||
|
||||
"github.com/nspcc-dev/neofs-node/pkg/local_object_storage/shard"
|
||||
"github.com/nspcc-dev/neofs-node/pkg/services/control"
|
||||
"github.com/TrueCloudLab/frostfs-node/pkg/local_object_storage/shard"
|
||||
"github.com/TrueCloudLab/frostfs-node/pkg/services/control"
|
||||
"google.golang.org/grpc/codes"
|
||||
"google.golang.org/grpc/status"
|
||||
)
|
||||
|
|
|
@ -3,11 +3,11 @@ package control
|
|||
import (
|
||||
"crypto/ecdsa"
|
||||
|
||||
"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"
|
||||
"github.com/nspcc-dev/neofs-node/pkg/services/control"
|
||||
"github.com/nspcc-dev/neofs-node/pkg/services/replicator"
|
||||
"github.com/TrueCloudLab/frostfs-node/pkg/core/container"
|
||||
"github.com/TrueCloudLab/frostfs-node/pkg/core/netmap"
|
||||
"github.com/TrueCloudLab/frostfs-node/pkg/local_object_storage/engine"
|
||||
"github.com/TrueCloudLab/frostfs-node/pkg/services/control"
|
||||
"github.com/TrueCloudLab/frostfs-node/pkg/services/replicator"
|
||||
)
|
||||
|
||||
// Server is an entity that serves
|
||||
|
|
|
@ -3,7 +3,7 @@ package control
|
|||
import (
|
||||
"context"
|
||||
|
||||
"github.com/nspcc-dev/neofs-node/pkg/services/control"
|
||||
"github.com/TrueCloudLab/frostfs-node/pkg/services/control"
|
||||
"google.golang.org/grpc/codes"
|
||||
"google.golang.org/grpc/status"
|
||||
)
|
||||
|
|
|
@ -4,8 +4,8 @@ import (
|
|||
"context"
|
||||
"fmt"
|
||||
|
||||
"github.com/nspcc-dev/neofs-node/pkg/local_object_storage/shard/mode"
|
||||
"github.com/nspcc-dev/neofs-node/pkg/services/control"
|
||||
"github.com/TrueCloudLab/frostfs-node/pkg/local_object_storage/shard/mode"
|
||||
"github.com/TrueCloudLab/frostfs-node/pkg/services/control"
|
||||
"google.golang.org/grpc/codes"
|
||||
"google.golang.org/grpc/status"
|
||||
)
|
||||
|
|
|
@ -6,10 +6,10 @@ import (
|
|||
"errors"
|
||||
"fmt"
|
||||
|
||||
"github.com/nspcc-dev/neofs-api-go/v2/refs"
|
||||
"github.com/nspcc-dev/neofs-node/pkg/services/control"
|
||||
neofscrypto "github.com/nspcc-dev/neofs-sdk-go/crypto"
|
||||
neofsecdsa "github.com/nspcc-dev/neofs-sdk-go/crypto/ecdsa"
|
||||
"github.com/TrueCloudLab/frostfs-api-go/v2/refs"
|
||||
"github.com/TrueCloudLab/frostfs-node/pkg/services/control"
|
||||
frostfscrypto "github.com/TrueCloudLab/frostfs-sdk-go/crypto"
|
||||
frostfsecdsa "github.com/TrueCloudLab/frostfs-sdk-go/crypto/ecdsa"
|
||||
)
|
||||
|
||||
// SignedMessage is an interface of Control service message.
|
||||
|
@ -56,7 +56,7 @@ func (s *Server) isValidRequest(req SignedMessage) error {
|
|||
sigV2.SetSign(sign.GetSign())
|
||||
sigV2.SetScheme(refs.ECDSA_SHA512)
|
||||
|
||||
var sig neofscrypto.Signature
|
||||
var sig frostfscrypto.Signature
|
||||
if err := sig.ReadFromV2(sigV2); err != nil {
|
||||
return fmt.Errorf("can't read signature: %w", err)
|
||||
}
|
||||
|
@ -76,9 +76,9 @@ func SignMessage(key *ecdsa.PrivateKey, msg SignedMessage) error {
|
|||
return fmt.Errorf("marshal request body: %w", err)
|
||||
}
|
||||
|
||||
var sig neofscrypto.Signature
|
||||
var sig frostfscrypto.Signature
|
||||
|
||||
err = sig.Calculate(neofsecdsa.Signer(*key), binBody)
|
||||
err = sig.Calculate(frostfsecdsa.Signer(*key), binBody)
|
||||
if err != nil {
|
||||
return fmt.Errorf("calculate signature: %w", err)
|
||||
}
|
||||
|
|
|
@ -3,8 +3,8 @@ package control
|
|||
import (
|
||||
"context"
|
||||
|
||||
"github.com/nspcc-dev/neofs-node/pkg/services/control"
|
||||
cid "github.com/nspcc-dev/neofs-sdk-go/container/id"
|
||||
"github.com/TrueCloudLab/frostfs-node/pkg/services/control"
|
||||
cid "github.com/TrueCloudLab/frostfs-sdk-go/container/id"
|
||||
"google.golang.org/grpc/codes"
|
||||
"google.golang.org/grpc/status"
|
||||
)
|
||||
|
|
5
pkg/services/control/service.pb.go
generated
5
pkg/services/control/service.pb.go
generated
|
@ -7,10 +7,11 @@
|
|||
package control
|
||||
|
||||
import (
|
||||
protoreflect "google.golang.org/protobuf/reflect/protoreflect"
|
||||
protoimpl "google.golang.org/protobuf/runtime/protoimpl"
|
||||
reflect "reflect"
|
||||
sync "sync"
|
||||
|
||||
protoreflect "google.golang.org/protobuf/reflect/protoreflect"
|
||||
protoimpl "google.golang.org/protobuf/runtime/protoimpl"
|
||||
)
|
||||
|
||||
const (
|
||||
|
|
|
@ -4,7 +4,7 @@ package control;
|
|||
|
||||
import "pkg/services/control/types.proto";
|
||||
|
||||
option go_package = "github.com/nspcc-dev/neofs-node/pkg/services/control";
|
||||
option go_package = "github.com/TrueCloudLab/frostfs-node/pkg/services/control";
|
||||
|
||||
// `ControlService` provides an interface for internal work with the storage node.
|
||||
service ControlService {
|
||||
|
|
1
pkg/services/control/service_grpc.pb.go
generated
1
pkg/services/control/service_grpc.pb.go
generated
|
@ -8,6 +8,7 @@ package control
|
|||
|
||||
import (
|
||||
context "context"
|
||||
|
||||
grpc "google.golang.org/grpc"
|
||||
codes "google.golang.org/grpc/codes"
|
||||
status "google.golang.org/grpc/status"
|
||||
|
|
4
pkg/services/control/service_neofs.pb.go
generated
4
pkg/services/control/service_neofs.pb.go
generated
|
@ -1,8 +1,8 @@
|
|||
// Code generated by protoc-gen-go-neofs. DO NOT EDIT.
|
||||
// Code generated by protoc-gen-go-frostfs. DO NOT EDIT.
|
||||
|
||||
package control
|
||||
|
||||
import "github.com/nspcc-dev/neofs-api-go/v2/util/proto"
|
||||
import "github.com/TrueCloudLab/frostfs-api-go/v2/util/proto"
|
||||
|
||||
// StableSize returns the size of x in protobuf format.
|
||||
//
|
||||
|
|
|
@ -4,7 +4,7 @@ import (
|
|||
"bytes"
|
||||
"testing"
|
||||
|
||||
"github.com/nspcc-dev/neofs-node/pkg/services/control"
|
||||
"github.com/TrueCloudLab/frostfs-node/pkg/services/control"
|
||||
)
|
||||
|
||||
func TestHealthCheckResponse_Body_StableMarshal(t *testing.T) {
|
||||
|
|
5
pkg/services/control/types.pb.go
generated
5
pkg/services/control/types.pb.go
generated
|
@ -7,10 +7,11 @@
|
|||
package control
|
||||
|
||||
import (
|
||||
protoreflect "google.golang.org/protobuf/reflect/protoreflect"
|
||||
protoimpl "google.golang.org/protobuf/runtime/protoimpl"
|
||||
reflect "reflect"
|
||||
sync "sync"
|
||||
|
||||
protoreflect "google.golang.org/protobuf/reflect/protoreflect"
|
||||
protoimpl "google.golang.org/protobuf/runtime/protoimpl"
|
||||
)
|
||||
|
||||
const (
|
||||
|
|
|
@ -2,7 +2,7 @@ syntax = "proto3";
|
|||
|
||||
package control;
|
||||
|
||||
option go_package = "github.com/nspcc-dev/neofs-node/pkg/services/control";
|
||||
option go_package = "github.com/TrueCloudLab/frostfs-node/pkg/services/control";
|
||||
|
||||
// Signature of some message.
|
||||
message Signature {
|
||||
|
|
4
pkg/services/control/types_neofs.pb.go
generated
4
pkg/services/control/types_neofs.pb.go
generated
|
@ -1,8 +1,8 @@
|
|||
// Code generated by protoc-gen-go-neofs. DO NOT EDIT.
|
||||
// Code generated by protoc-gen-go-frostfs. DO NOT EDIT.
|
||||
|
||||
package control
|
||||
|
||||
import "github.com/nspcc-dev/neofs-api-go/v2/util/proto"
|
||||
import "github.com/TrueCloudLab/frostfs-api-go/v2/util/proto"
|
||||
|
||||
// StableSize returns the size of x in protobuf format.
|
||||
//
|
||||
|
|
|
@ -6,10 +6,10 @@ import (
|
|||
"strconv"
|
||||
"testing"
|
||||
|
||||
"github.com/TrueCloudLab/frostfs-node/pkg/local_object_storage/blobstor/blobovniczatree"
|
||||
"github.com/TrueCloudLab/frostfs-node/pkg/local_object_storage/blobstor/fstree"
|
||||
"github.com/TrueCloudLab/frostfs-node/pkg/services/control"
|
||||
"github.com/google/uuid"
|
||||
"github.com/nspcc-dev/neofs-node/pkg/local_object_storage/blobstor/blobovniczatree"
|
||||
"github.com/nspcc-dev/neofs-node/pkg/local_object_storage/blobstor/fstree"
|
||||
"github.com/nspcc-dev/neofs-node/pkg/services/control"
|
||||
)
|
||||
|
||||
func TestNetmap_StableMarshal(t *testing.T) {
|
||||
|
|
|
@ -5,11 +5,11 @@ import (
|
|||
"errors"
|
||||
"fmt"
|
||||
|
||||
"github.com/nspcc-dev/neofs-api-go/v2/netmap"
|
||||
"github.com/nspcc-dev/neofs-api-go/v2/refs"
|
||||
"github.com/nspcc-dev/neofs-node/pkg/core/version"
|
||||
netmapSDK "github.com/nspcc-dev/neofs-sdk-go/netmap"
|
||||
versionsdk "github.com/nspcc-dev/neofs-sdk-go/version"
|
||||
"github.com/TrueCloudLab/frostfs-api-go/v2/netmap"
|
||||
"github.com/TrueCloudLab/frostfs-api-go/v2/refs"
|
||||
"github.com/TrueCloudLab/frostfs-node/pkg/core/version"
|
||||
netmapSDK "github.com/TrueCloudLab/frostfs-sdk-go/netmap"
|
||||
versionsdk "github.com/TrueCloudLab/frostfs-sdk-go/version"
|
||||
)
|
||||
|
||||
type executorSvc struct {
|
||||
|
|
|
@ -3,9 +3,9 @@ package netmap
|
|||
import (
|
||||
"context"
|
||||
|
||||
"github.com/nspcc-dev/neofs-api-go/v2/netmap"
|
||||
"github.com/nspcc-dev/neofs-node/pkg/services/util"
|
||||
"github.com/nspcc-dev/neofs-node/pkg/services/util/response"
|
||||
"github.com/TrueCloudLab/frostfs-api-go/v2/netmap"
|
||||
"github.com/TrueCloudLab/frostfs-node/pkg/services/util"
|
||||
"github.com/TrueCloudLab/frostfs-node/pkg/services/util/response"
|
||||
)
|
||||
|
||||
type responseService struct {
|
||||
|
|
|
@ -3,7 +3,7 @@ package netmap
|
|||
import (
|
||||
"context"
|
||||
|
||||
"github.com/nspcc-dev/neofs-api-go/v2/netmap"
|
||||
"github.com/TrueCloudLab/frostfs-api-go/v2/netmap"
|
||||
)
|
||||
|
||||
// Server is an interface of the NeoFS API Netmap service server.
|
||||
|
|
|
@ -4,8 +4,8 @@ import (
|
|||
"context"
|
||||
"crypto/ecdsa"
|
||||
|
||||
"github.com/nspcc-dev/neofs-api-go/v2/netmap"
|
||||
"github.com/nspcc-dev/neofs-node/pkg/services/util"
|
||||
"github.com/TrueCloudLab/frostfs-api-go/v2/netmap"
|
||||
"github.com/TrueCloudLab/frostfs-node/pkg/services/util"
|
||||
)
|
||||
|
||||
type signService struct {
|
||||
|
|
|
@ -1,7 +1,7 @@
|
|||
package notificator
|
||||
|
||||
import (
|
||||
oid "github.com/nspcc-dev/neofs-sdk-go/object/id"
|
||||
oid "github.com/TrueCloudLab/frostfs-sdk-go/object/id"
|
||||
)
|
||||
|
||||
// NotificationSource is a source of object notifications.
|
||||
|
|
|
@ -3,8 +3,8 @@ package nats
|
|||
import (
|
||||
"time"
|
||||
|
||||
"github.com/TrueCloudLab/frostfs-node/pkg/util/logger"
|
||||
"github.com/nats-io/nats.go"
|
||||
"github.com/nspcc-dev/neofs-node/pkg/util/logger"
|
||||
)
|
||||
|
||||
func WithClientCert(certPath, keyPath string) Option {
|
||||
|
|
|
@ -6,9 +6,9 @@ import (
|
|||
"fmt"
|
||||
"sync"
|
||||
|
||||
"github.com/TrueCloudLab/frostfs-node/pkg/util/logger"
|
||||
oid "github.com/TrueCloudLab/frostfs-sdk-go/object/id"
|
||||
"github.com/nats-io/nats.go"
|
||||
"github.com/nspcc-dev/neofs-node/pkg/util/logger"
|
||||
oid "github.com/nspcc-dev/neofs-sdk-go/object/id"
|
||||
"go.uber.org/zap"
|
||||
)
|
||||
|
||||
|
|
|
@ -3,8 +3,8 @@ package notificator
|
|||
import (
|
||||
"fmt"
|
||||
|
||||
"github.com/nspcc-dev/neofs-node/pkg/util/logger"
|
||||
oid "github.com/nspcc-dev/neofs-sdk-go/object/id"
|
||||
"github.com/TrueCloudLab/frostfs-node/pkg/util/logger"
|
||||
oid "github.com/TrueCloudLab/frostfs-sdk-go/object/id"
|
||||
"go.uber.org/zap"
|
||||
)
|
||||
|
||||
|
|
|
@ -6,18 +6,18 @@ import (
|
|||
"errors"
|
||||
"fmt"
|
||||
|
||||
"github.com/TrueCloudLab/frostfs-node/pkg/core/container"
|
||||
"github.com/TrueCloudLab/frostfs-node/pkg/core/netmap"
|
||||
"github.com/TrueCloudLab/frostfs-node/pkg/local_object_storage/engine"
|
||||
eaclV2 "github.com/TrueCloudLab/frostfs-node/pkg/services/object/acl/eacl/v2"
|
||||
v2 "github.com/TrueCloudLab/frostfs-node/pkg/services/object/acl/v2"
|
||||
bearerSDK "github.com/TrueCloudLab/frostfs-sdk-go/bearer"
|
||||
"github.com/TrueCloudLab/frostfs-sdk-go/client"
|
||||
"github.com/TrueCloudLab/frostfs-sdk-go/container/acl"
|
||||
frostfsecdsa "github.com/TrueCloudLab/frostfs-sdk-go/crypto/ecdsa"
|
||||
eaclSDK "github.com/TrueCloudLab/frostfs-sdk-go/eacl"
|
||||
"github.com/TrueCloudLab/frostfs-sdk-go/user"
|
||||
"github.com/nspcc-dev/neo-go/pkg/crypto/keys"
|
||||
"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"
|
||||
eaclV2 "github.com/nspcc-dev/neofs-node/pkg/services/object/acl/eacl/v2"
|
||||
v2 "github.com/nspcc-dev/neofs-node/pkg/services/object/acl/v2"
|
||||
bearerSDK "github.com/nspcc-dev/neofs-sdk-go/bearer"
|
||||
"github.com/nspcc-dev/neofs-sdk-go/client"
|
||||
"github.com/nspcc-dev/neofs-sdk-go/container/acl"
|
||||
neofsecdsa "github.com/nspcc-dev/neofs-sdk-go/crypto/ecdsa"
|
||||
eaclSDK "github.com/nspcc-dev/neofs-sdk-go/eacl"
|
||||
"github.com/nspcc-dev/neofs-sdk-go/user"
|
||||
)
|
||||
|
||||
// CheckerPrm groups parameters for Checker
|
||||
|
@ -234,12 +234,12 @@ func isValidBearer(reqInfo v2.RequestInfo, st netmap.State) error {
|
|||
|
||||
// 4. Then check if container owner signed this token.
|
||||
if !bearerSDK.ResolveIssuer(*token).Equals(ownerCnr) {
|
||||
// TODO: #767 in this case we can issue all owner keys from neofs.id and check once again
|
||||
// TODO: #767 in this case we can issue all owner keys from frostfs.id and check once again
|
||||
return errBearerNotSignedByOwner
|
||||
}
|
||||
|
||||
// 5. Then check if request sender has rights to use this token.
|
||||
var keySender neofsecdsa.PublicKey
|
||||
var keySender frostfsecdsa.PublicKey
|
||||
|
||||
err := keySender.Decode(reqInfo.SenderKey())
|
||||
if err != nil {
|
||||
|
@ -250,7 +250,7 @@ func isValidBearer(reqInfo v2.RequestInfo, st netmap.State) error {
|
|||
user.IDFromKey(&usrSender, ecdsa.PublicKey(keySender))
|
||||
|
||||
if !token.AssertUser(usrSender) {
|
||||
// TODO: #767 in this case we can issue all owner keys from neofs.id and check once again
|
||||
// TODO: #767 in this case we can issue all owner keys from frostfs.id and check once again
|
||||
return errBearerInvalidOwner
|
||||
}
|
||||
|
||||
|
|
|
@ -3,14 +3,14 @@ package acl
|
|||
import (
|
||||
"testing"
|
||||
|
||||
"github.com/nspcc-dev/neofs-node/pkg/core/container"
|
||||
"github.com/nspcc-dev/neofs-node/pkg/local_object_storage/engine"
|
||||
v2 "github.com/nspcc-dev/neofs-node/pkg/services/object/acl/v2"
|
||||
"github.com/nspcc-dev/neofs-sdk-go/container/acl"
|
||||
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/user"
|
||||
usertest "github.com/nspcc-dev/neofs-sdk-go/user/test"
|
||||
"github.com/TrueCloudLab/frostfs-node/pkg/core/container"
|
||||
"github.com/TrueCloudLab/frostfs-node/pkg/local_object_storage/engine"
|
||||
v2 "github.com/TrueCloudLab/frostfs-node/pkg/services/object/acl/v2"
|
||||
"github.com/TrueCloudLab/frostfs-sdk-go/container/acl"
|
||||
cid "github.com/TrueCloudLab/frostfs-sdk-go/container/id"
|
||||
eaclSDK "github.com/TrueCloudLab/frostfs-sdk-go/eacl"
|
||||
"github.com/TrueCloudLab/frostfs-sdk-go/user"
|
||||
usertest "github.com/TrueCloudLab/frostfs-sdk-go/user/test"
|
||||
"github.com/stretchr/testify/require"
|
||||
)
|
||||
|
||||
|
|
|
@ -5,14 +5,14 @@ import (
|
|||
"errors"
|
||||
"testing"
|
||||
|
||||
objectV2 "github.com/TrueCloudLab/frostfs-api-go/v2/object"
|
||||
"github.com/TrueCloudLab/frostfs-api-go/v2/refs"
|
||||
"github.com/TrueCloudLab/frostfs-api-go/v2/session"
|
||||
eaclSDK "github.com/TrueCloudLab/frostfs-sdk-go/eacl"
|
||||
"github.com/TrueCloudLab/frostfs-sdk-go/object"
|
||||
oid "github.com/TrueCloudLab/frostfs-sdk-go/object/id"
|
||||
oidtest "github.com/TrueCloudLab/frostfs-sdk-go/object/id/test"
|
||||
"github.com/nspcc-dev/neo-go/pkg/crypto/keys"
|
||||
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"
|
||||
eaclSDK "github.com/nspcc-dev/neofs-sdk-go/eacl"
|
||||
"github.com/nspcc-dev/neofs-sdk-go/object"
|
||||
oid "github.com/nspcc-dev/neofs-sdk-go/object/id"
|
||||
oidtest "github.com/nspcc-dev/neofs-sdk-go/object/id/test"
|
||||
"github.com/stretchr/testify/require"
|
||||
)
|
||||
|
||||
|
|
|
@ -4,15 +4,15 @@ import (
|
|||
"errors"
|
||||
"fmt"
|
||||
|
||||
"github.com/nspcc-dev/neofs-api-go/v2/acl"
|
||||
objectV2 "github.com/nspcc-dev/neofs-api-go/v2/object"
|
||||
refsV2 "github.com/nspcc-dev/neofs-api-go/v2/refs"
|
||||
"github.com/nspcc-dev/neofs-api-go/v2/session"
|
||||
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/object"
|
||||
oid "github.com/nspcc-dev/neofs-sdk-go/object/id"
|
||||
"github.com/nspcc-dev/neofs-sdk-go/user"
|
||||
"github.com/TrueCloudLab/frostfs-api-go/v2/acl"
|
||||
objectV2 "github.com/TrueCloudLab/frostfs-api-go/v2/object"
|
||||
refsV2 "github.com/TrueCloudLab/frostfs-api-go/v2/refs"
|
||||
"github.com/TrueCloudLab/frostfs-api-go/v2/session"
|
||||
cid "github.com/TrueCloudLab/frostfs-sdk-go/container/id"
|
||||
eaclSDK "github.com/TrueCloudLab/frostfs-sdk-go/eacl"
|
||||
"github.com/TrueCloudLab/frostfs-sdk-go/object"
|
||||
oid "github.com/TrueCloudLab/frostfs-sdk-go/object/id"
|
||||
"github.com/TrueCloudLab/frostfs-sdk-go/user"
|
||||
)
|
||||
|
||||
type Option func(*cfg)
|
||||
|
|
|
@ -3,9 +3,9 @@ package v2
|
|||
import (
|
||||
"io"
|
||||
|
||||
"github.com/nspcc-dev/neofs-node/pkg/local_object_storage/engine"
|
||||
objectSDK "github.com/nspcc-dev/neofs-sdk-go/object"
|
||||
oid "github.com/nspcc-dev/neofs-sdk-go/object/id"
|
||||
"github.com/TrueCloudLab/frostfs-node/pkg/local_object_storage/engine"
|
||||
objectSDK "github.com/TrueCloudLab/frostfs-sdk-go/object"
|
||||
oid "github.com/TrueCloudLab/frostfs-sdk-go/object/id"
|
||||
)
|
||||
|
||||
type localStorage struct {
|
||||
|
|
|
@ -3,11 +3,11 @@ package v2
|
|||
import (
|
||||
"strconv"
|
||||
|
||||
"github.com/nspcc-dev/neofs-api-go/v2/acl"
|
||||
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/object"
|
||||
oid "github.com/nspcc-dev/neofs-sdk-go/object/id"
|
||||
"github.com/TrueCloudLab/frostfs-api-go/v2/acl"
|
||||
cid "github.com/TrueCloudLab/frostfs-sdk-go/container/id"
|
||||
eaclSDK "github.com/TrueCloudLab/frostfs-sdk-go/eacl"
|
||||
"github.com/TrueCloudLab/frostfs-sdk-go/object"
|
||||
oid "github.com/TrueCloudLab/frostfs-sdk-go/object/id"
|
||||
)
|
||||
|
||||
type sysObjHdr struct {
|
||||
|
|
|
@ -1,9 +1,9 @@
|
|||
package v2
|
||||
|
||||
import (
|
||||
"github.com/nspcc-dev/neofs-node/pkg/local_object_storage/engine"
|
||||
cid "github.com/nspcc-dev/neofs-sdk-go/container/id"
|
||||
oid "github.com/nspcc-dev/neofs-sdk-go/object/id"
|
||||
"github.com/TrueCloudLab/frostfs-node/pkg/local_object_storage/engine"
|
||||
cid "github.com/TrueCloudLab/frostfs-sdk-go/container/id"
|
||||
oid "github.com/TrueCloudLab/frostfs-sdk-go/object/id"
|
||||
)
|
||||
|
||||
func WithObjectStorage(v ObjectStorage) Option {
|
||||
|
|
|
@ -1,8 +1,8 @@
|
|||
package v2
|
||||
|
||||
import (
|
||||
"github.com/nspcc-dev/neofs-api-go/v2/session"
|
||||
eaclSDK "github.com/nspcc-dev/neofs-sdk-go/eacl"
|
||||
"github.com/TrueCloudLab/frostfs-api-go/v2/session"
|
||||
eaclSDK "github.com/TrueCloudLab/frostfs-sdk-go/eacl"
|
||||
)
|
||||
|
||||
type xHeaderSource interface {
|
||||
|
|
|
@ -4,12 +4,12 @@ import (
|
|||
"bytes"
|
||||
"crypto/sha256"
|
||||
|
||||
core "github.com/nspcc-dev/neofs-node/pkg/core/netmap"
|
||||
"github.com/nspcc-dev/neofs-node/pkg/util/logger"
|
||||
"github.com/nspcc-dev/neofs-sdk-go/container"
|
||||
"github.com/nspcc-dev/neofs-sdk-go/container/acl"
|
||||
cid "github.com/nspcc-dev/neofs-sdk-go/container/id"
|
||||
"github.com/nspcc-dev/neofs-sdk-go/netmap"
|
||||
core "github.com/TrueCloudLab/frostfs-node/pkg/core/netmap"
|
||||
"github.com/TrueCloudLab/frostfs-node/pkg/util/logger"
|
||||
"github.com/TrueCloudLab/frostfs-sdk-go/container"
|
||||
"github.com/TrueCloudLab/frostfs-sdk-go/container/acl"
|
||||
cid "github.com/TrueCloudLab/frostfs-sdk-go/container/id"
|
||||
"github.com/TrueCloudLab/frostfs-sdk-go/netmap"
|
||||
"go.uber.org/zap"
|
||||
)
|
||||
|
||||
|
@ -35,7 +35,7 @@ func (c senderClassifier) classify(
|
|||
|
||||
ownerKeyInBytes := ownerKey.Bytes()
|
||||
|
||||
// TODO: #767 get owner from neofs.id if present
|
||||
// TODO: #767 get owner from frostfs.id if present
|
||||
|
||||
// if request owner is the same as container owner, return RoleUser
|
||||
if ownerID.Equals(cnr.Owner()) {
|
||||
|
|
|
@ -3,7 +3,7 @@ package v2
|
|||
import (
|
||||
"fmt"
|
||||
|
||||
apistatus "github.com/nspcc-dev/neofs-sdk-go/client/status"
|
||||
apistatus "github.com/TrueCloudLab/frostfs-sdk-go/client/status"
|
||||
)
|
||||
|
||||
const invalidRequestMessage = "malformed request"
|
||||
|
|
|
@ -1,10 +1,10 @@
|
|||
package v2
|
||||
|
||||
import (
|
||||
"github.com/nspcc-dev/neofs-node/pkg/core/container"
|
||||
"github.com/nspcc-dev/neofs-node/pkg/core/netmap"
|
||||
objectSvc "github.com/nspcc-dev/neofs-node/pkg/services/object"
|
||||
"github.com/nspcc-dev/neofs-node/pkg/util/logger"
|
||||
"github.com/TrueCloudLab/frostfs-node/pkg/core/container"
|
||||
"github.com/TrueCloudLab/frostfs-node/pkg/core/netmap"
|
||||
objectSvc "github.com/TrueCloudLab/frostfs-node/pkg/services/object"
|
||||
"github.com/TrueCloudLab/frostfs-node/pkg/util/logger"
|
||||
)
|
||||
|
||||
// WithLogger returns option to set logger.
|
||||
|
|
|
@ -4,14 +4,14 @@ import (
|
|||
"crypto/ecdsa"
|
||||
"fmt"
|
||||
|
||||
sessionV2 "github.com/TrueCloudLab/frostfs-api-go/v2/session"
|
||||
"github.com/TrueCloudLab/frostfs-sdk-go/bearer"
|
||||
"github.com/TrueCloudLab/frostfs-sdk-go/container/acl"
|
||||
cid "github.com/TrueCloudLab/frostfs-sdk-go/container/id"
|
||||
oid "github.com/TrueCloudLab/frostfs-sdk-go/object/id"
|
||||
sessionSDK "github.com/TrueCloudLab/frostfs-sdk-go/session"
|
||||
"github.com/TrueCloudLab/frostfs-sdk-go/user"
|
||||
"github.com/nspcc-dev/neo-go/pkg/crypto/keys"
|
||||
sessionV2 "github.com/nspcc-dev/neofs-api-go/v2/session"
|
||||
"github.com/nspcc-dev/neofs-sdk-go/bearer"
|
||||
"github.com/nspcc-dev/neofs-sdk-go/container/acl"
|
||||
cid "github.com/nspcc-dev/neofs-sdk-go/container/id"
|
||||
oid "github.com/nspcc-dev/neofs-sdk-go/object/id"
|
||||
sessionSDK "github.com/nspcc-dev/neofs-sdk-go/session"
|
||||
"github.com/nspcc-dev/neofs-sdk-go/user"
|
||||
)
|
||||
|
||||
// RequestInfo groups parsed version-independent (from SDK library)
|
||||
|
|
|
@ -5,16 +5,16 @@ import (
|
|||
"errors"
|
||||
"fmt"
|
||||
|
||||
objectV2 "github.com/nspcc-dev/neofs-api-go/v2/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/services/object"
|
||||
"github.com/nspcc-dev/neofs-node/pkg/util/logger"
|
||||
"github.com/nspcc-dev/neofs-sdk-go/container/acl"
|
||||
cid "github.com/nspcc-dev/neofs-sdk-go/container/id"
|
||||
oid "github.com/nspcc-dev/neofs-sdk-go/object/id"
|
||||
sessionSDK "github.com/nspcc-dev/neofs-sdk-go/session"
|
||||
"github.com/nspcc-dev/neofs-sdk-go/user"
|
||||
objectV2 "github.com/TrueCloudLab/frostfs-api-go/v2/object"
|
||||
"github.com/TrueCloudLab/frostfs-node/pkg/core/container"
|
||||
"github.com/TrueCloudLab/frostfs-node/pkg/core/netmap"
|
||||
"github.com/TrueCloudLab/frostfs-node/pkg/services/object"
|
||||
"github.com/TrueCloudLab/frostfs-node/pkg/util/logger"
|
||||
"github.com/TrueCloudLab/frostfs-sdk-go/container/acl"
|
||||
cid "github.com/TrueCloudLab/frostfs-sdk-go/container/id"
|
||||
oid "github.com/TrueCloudLab/frostfs-sdk-go/object/id"
|
||||
sessionSDK "github.com/TrueCloudLab/frostfs-sdk-go/session"
|
||||
"github.com/TrueCloudLab/frostfs-sdk-go/user"
|
||||
"go.uber.org/zap"
|
||||
)
|
||||
|
||||
|
|
|
@ -1,7 +1,7 @@
|
|||
package v2
|
||||
|
||||
import (
|
||||
"github.com/nspcc-dev/neofs-sdk-go/user"
|
||||
"github.com/TrueCloudLab/frostfs-sdk-go/user"
|
||||
)
|
||||
|
||||
// ACLChecker is an interface that must provide
|
||||
|
|
|
@ -6,16 +6,16 @@ import (
|
|||
"errors"
|
||||
"fmt"
|
||||
|
||||
objectV2 "github.com/TrueCloudLab/frostfs-api-go/v2/object"
|
||||
refsV2 "github.com/TrueCloudLab/frostfs-api-go/v2/refs"
|
||||
sessionV2 "github.com/TrueCloudLab/frostfs-api-go/v2/session"
|
||||
"github.com/TrueCloudLab/frostfs-sdk-go/bearer"
|
||||
"github.com/TrueCloudLab/frostfs-sdk-go/container/acl"
|
||||
cid "github.com/TrueCloudLab/frostfs-sdk-go/container/id"
|
||||
oid "github.com/TrueCloudLab/frostfs-sdk-go/object/id"
|
||||
sessionSDK "github.com/TrueCloudLab/frostfs-sdk-go/session"
|
||||
"github.com/TrueCloudLab/frostfs-sdk-go/user"
|
||||
"github.com/nspcc-dev/neo-go/pkg/crypto/keys"
|
||||
objectV2 "github.com/nspcc-dev/neofs-api-go/v2/object"
|
||||
refsV2 "github.com/nspcc-dev/neofs-api-go/v2/refs"
|
||||
sessionV2 "github.com/nspcc-dev/neofs-api-go/v2/session"
|
||||
"github.com/nspcc-dev/neofs-sdk-go/bearer"
|
||||
"github.com/nspcc-dev/neofs-sdk-go/container/acl"
|
||||
cid "github.com/nspcc-dev/neofs-sdk-go/container/id"
|
||||
oid "github.com/nspcc-dev/neofs-sdk-go/object/id"
|
||||
sessionSDK "github.com/nspcc-dev/neofs-sdk-go/session"
|
||||
"github.com/nspcc-dev/neofs-sdk-go/user"
|
||||
)
|
||||
|
||||
var errMissingContainerID = errors.New("missing container ID")
|
||||
|
@ -130,7 +130,7 @@ func ownerFromToken(token *sessionSDK.Object) (*user.ID, *keys.PublicKey, error)
|
|||
tokenIssuer := token.Issuer()
|
||||
|
||||
if !isOwnerFromKey(tokenIssuer, tokenIssuerKey) {
|
||||
// TODO: #767 in this case we can issue all owner keys from neofs.id and check once again
|
||||
// TODO: #767 in this case we can issue all owner keys from frostfs.id and check once again
|
||||
return nil, nil, errInvalidSessionOwner
|
||||
}
|
||||
|
||||
|
|
|
@ -6,14 +6,14 @@ import (
|
|||
"crypto/rand"
|
||||
"testing"
|
||||
|
||||
"github.com/nspcc-dev/neofs-api-go/v2/acl"
|
||||
"github.com/nspcc-dev/neofs-api-go/v2/session"
|
||||
bearertest "github.com/nspcc-dev/neofs-sdk-go/bearer/test"
|
||||
aclsdk "github.com/nspcc-dev/neofs-sdk-go/container/acl"
|
||||
cidtest "github.com/nspcc-dev/neofs-sdk-go/container/id/test"
|
||||
oidtest "github.com/nspcc-dev/neofs-sdk-go/object/id/test"
|
||||
sessionSDK "github.com/nspcc-dev/neofs-sdk-go/session"
|
||||
sessiontest "github.com/nspcc-dev/neofs-sdk-go/session/test"
|
||||
"github.com/TrueCloudLab/frostfs-api-go/v2/acl"
|
||||
"github.com/TrueCloudLab/frostfs-api-go/v2/session"
|
||||
bearertest "github.com/TrueCloudLab/frostfs-sdk-go/bearer/test"
|
||||
aclsdk "github.com/TrueCloudLab/frostfs-sdk-go/container/acl"
|
||||
cidtest "github.com/TrueCloudLab/frostfs-sdk-go/container/id/test"
|
||||
oidtest "github.com/TrueCloudLab/frostfs-sdk-go/object/id/test"
|
||||
sessionSDK "github.com/TrueCloudLab/frostfs-sdk-go/session"
|
||||
sessiontest "github.com/TrueCloudLab/frostfs-sdk-go/session/test"
|
||||
"github.com/stretchr/testify/require"
|
||||
)
|
||||
|
||||
|
@ -60,7 +60,7 @@ func testGenerateMetaHeader(depth uint32, b *acl.BearerToken, s *session.Token)
|
|||
}
|
||||
|
||||
func TestIsVerbCompatible(t *testing.T) {
|
||||
// Source: https://nspcc.ru/upload/neofs-spec-latest.pdf#page=28
|
||||
// Source: https://nspcc.ru/upload/frostfs-spec-latest.pdf#page=28
|
||||
table := map[aclsdk.Op][]sessionSDK.ObjectVerb{
|
||||
aclsdk.OpObjectPut: {sessionSDK.VerbObjectPut, sessionSDK.VerbObjectDelete},
|
||||
aclsdk.OpObjectDelete: {sessionSDK.VerbObjectDelete},
|
||||
|
|
|
@ -3,8 +3,8 @@ package object
|
|||
import (
|
||||
"context"
|
||||
|
||||
objectV2 "github.com/nspcc-dev/neofs-api-go/v2/object"
|
||||
apistatus "github.com/nspcc-dev/neofs-sdk-go/client/status"
|
||||
objectV2 "github.com/TrueCloudLab/frostfs-api-go/v2/object"
|
||||
apistatus "github.com/TrueCloudLab/frostfs-sdk-go/client/status"
|
||||
)
|
||||
|
||||
// NodeState is storage node state processed by Object service.
|
||||
|
|
|
@ -3,7 +3,7 @@ package deletesvc
|
|||
import (
|
||||
"context"
|
||||
|
||||
"github.com/nspcc-dev/neofs-node/pkg/services/object/util"
|
||||
"github.com/TrueCloudLab/frostfs-node/pkg/services/object/util"
|
||||
"go.uber.org/zap"
|
||||
)
|
||||
|
||||
|
|
|
@ -4,12 +4,12 @@ import (
|
|||
"context"
|
||||
"strconv"
|
||||
|
||||
objectV2 "github.com/nspcc-dev/neofs-api-go/v2/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"
|
||||
"github.com/nspcc-dev/neofs-sdk-go/object"
|
||||
oid "github.com/nspcc-dev/neofs-sdk-go/object/id"
|
||||
objectV2 "github.com/TrueCloudLab/frostfs-api-go/v2/object"
|
||||
"github.com/TrueCloudLab/frostfs-node/pkg/services/object/util"
|
||||
"github.com/TrueCloudLab/frostfs-node/pkg/util/logger"
|
||||
cid "github.com/TrueCloudLab/frostfs-sdk-go/container/id"
|
||||
"github.com/TrueCloudLab/frostfs-sdk-go/object"
|
||||
oid "github.com/TrueCloudLab/frostfs-sdk-go/object/id"
|
||||
"go.uber.org/zap"
|
||||
)
|
||||
|
||||
|
|
|
@ -1,8 +1,8 @@
|
|||
package deletesvc
|
||||
|
||||
import (
|
||||
"github.com/nspcc-dev/neofs-sdk-go/object"
|
||||
oid "github.com/nspcc-dev/neofs-sdk-go/object/id"
|
||||
"github.com/TrueCloudLab/frostfs-sdk-go/object"
|
||||
oid "github.com/TrueCloudLab/frostfs-sdk-go/object/id"
|
||||
"go.uber.org/zap"
|
||||
)
|
||||
|
||||
|
|
Some files were not shown because too many files have changed in this diff Show more
Loading…
Add table
Add a link
Reference in a new issue