diff --git a/README.md b/README.md index e6974e9..1a739eb 100644 --- a/README.md +++ b/README.md @@ -1,6 +1,6 @@ -# neofs-sdk-go +# frostfs-sdk-go Go implementation of NeoFS SDK. It contains high-level version-independent wrappers -for structures from [neofs-api-go](https://github.com/nspcc-dev/neofs-api-go) as well as +for structures from [frostfs-api-go](https://github.com/TrueCloudLab/frostfs-api-go) as well as helper functions for simplifying node/dApp implementations. ## Repository structure @@ -14,7 +14,7 @@ There is also a reference implementation of checking algorithm which is used in ### checksum Contains `Checksum` type encapsulating checksum as well as it's kind. -Currently Sha256 and [Tillich-Zemor hashsum](https://github.com/nspcc-dev/tzhash) are in use. +Currently Sha256 and [Tillich-Zemor hashsum](https://github.com/TrueCloudLab/tzhash) are in use. ### owner `owner.ID` type represents single account interacting with NeoFS. In v2 version of protocol @@ -27,7 +27,7 @@ Contains Bearer token type with several NeoFS-specific methods. ### ns In NeoFS there are 2 types of name resolution: DNS and NNS. NNS stands for Neo Name Service -is just a [contract](https://github.com/nspcc-dev/neofs-contract/) deployed on a Neo blockchain. +is just a [contract](https://github.com/TrueCloudLab/frostfs-contract) deployed on a Neo blockchain. Basically, NNS is just a DNS-on-chain which can be used for resolving container nice-names as well as any other name in dApps. See our [CoreDNS plugin](https://github.com/nspcc-dev/coredns/tree/master/plugin/nns) for the example of how NNS can be integrated in DNS. @@ -77,7 +77,7 @@ if needed and perform any desired action. In the case above we may want to repor these details to the user as well as retry an operation, possibly with different parameters. Status wire-format is extendable and each node can report any set of details it wants. The set of reserved status codes can be found in -[NeoFS API](https://github.com/nspcc-dev/neofs-api/blob/master/status/types.proto). There is also +[NeoFS API](https://github.com/TrueCloudLab/frostfs-api/blob/master/status/types.proto). There is also a `client.PrmInit.ResolveNeoFSFailures()` to seamlessly convert erroneous statuses into Go error type. ### policy @@ -102,11 +102,11 @@ outdated in some details. ```go import ( - "github.com/nspcc-dev/neofs-sdk-go/netmap" - "github.com/nspcc-dev/neofs-sdk-go/object" + "github.com/TrueCloudLab/frostfs-sdk-go/netmap" + "github.com/TrueCloudLab/frostfs-sdk-go/object" ) -func placementNodes(addr *object.Address, p *netmap.PlacementPolicy, neofsNodes []netmap.NodeInfo) { +func placementNodes(addr *object.Address, p *netmap.PlacementPolicy, frostfsNodes []netmap.NodeInfo) { // Convert list of nodes in NeoFS API format to the intermediate representation. nodes := netmap.NodesFromInfo(nodes) diff --git a/accounting/decimal.go b/accounting/decimal.go index da9281f..459bb99 100644 --- a/accounting/decimal.go +++ b/accounting/decimal.go @@ -1,10 +1,10 @@ package accounting -import "github.com/nspcc-dev/neofs-api-go/v2/accounting" +import "github.com/TrueCloudLab/frostfs-api-go/v2/accounting" // Decimal represents decimal number for accounting operations. // -// Decimal is mutually compatible with github.com/nspcc-dev/neofs-api-go/v2/accounting.Decimal +// Decimal is mutually compatible with github.com/TrueCloudLab/frostfs-api-go/v2/accounting.Decimal // message. See ReadFromV2 / WriteToV2 methods. // // Instances can be created using built-in var declaration. diff --git a/accounting/decimal_test.go b/accounting/decimal_test.go index 97a5468..9dc8fe6 100644 --- a/accounting/decimal_test.go +++ b/accounting/decimal_test.go @@ -3,8 +3,8 @@ package accounting_test import ( "testing" - v2accounting "github.com/nspcc-dev/neofs-api-go/v2/accounting" - "github.com/nspcc-dev/neofs-sdk-go/accounting" + v2accounting "github.com/TrueCloudLab/frostfs-api-go/v2/accounting" + "github.com/TrueCloudLab/frostfs-sdk-go/accounting" "github.com/stretchr/testify/require" ) diff --git a/accounting/doc.go b/accounting/doc.go index f1a3037..a235386 100644 --- a/accounting/doc.go +++ b/accounting/doc.go @@ -9,11 +9,11 @@ working with Fixed8 balance precision: dec.SetPrecision(8) Instances can be also used to process NeoFS API V2 protocol messages -(see neo.fs.v2.accounting package in https://github.com/nspcc-dev/neofs-api). +(see neo.fs.v2.accounting package in https://github.com/TrueCloudLab/frostfs-api). On client side: - import "github.com/nspcc-dev/neofs-api-go/v2/accounting" + import "github.com/TrueCloudLab/frostfs-api-go/v2/accounting" var msg accounting.Decimal dec.WriteToV2(&msg) diff --git a/accounting/test/decimal.go b/accounting/test/decimal.go index 1c8f0f0..7a7685c 100644 --- a/accounting/test/decimal.go +++ b/accounting/test/decimal.go @@ -3,7 +3,7 @@ package accountingtest import ( "math/rand" - "github.com/nspcc-dev/neofs-sdk-go/accounting" + "github.com/TrueCloudLab/frostfs-sdk-go/accounting" ) // Decimal returns random accounting.Decimal. diff --git a/accounting/test/doc.go b/accounting/test/doc.go index b2619ea..2ec4154 100644 --- a/accounting/test/doc.go +++ b/accounting/test/doc.go @@ -5,7 +5,7 @@ Note that importing the package into source files is highly discouraged. Random instance generation functions can be useful when testing expects any value, e.g.: - import accountingtest "github.com/nspcc-dev/neofs-sdk-go/accounting/test" + import accountingtest "github.com/TrueCloudLab/frostfs-sdk-go/accounting/test" dec := accountingtest.Decimal() // test the value diff --git a/audit/result.go b/audit/result.go index 1ab836b..e6d1f13 100644 --- a/audit/result.go +++ b/audit/result.go @@ -4,16 +4,16 @@ import ( "errors" "fmt" - "github.com/nspcc-dev/neofs-api-go/v2/audit" - "github.com/nspcc-dev/neofs-api-go/v2/refs" - cid "github.com/nspcc-dev/neofs-sdk-go/container/id" - oid "github.com/nspcc-dev/neofs-sdk-go/object/id" - "github.com/nspcc-dev/neofs-sdk-go/version" + "github.com/TrueCloudLab/frostfs-api-go/v2/audit" + "github.com/TrueCloudLab/frostfs-api-go/v2/refs" + cid "github.com/TrueCloudLab/frostfs-sdk-go/container/id" + oid "github.com/TrueCloudLab/frostfs-sdk-go/object/id" + "github.com/TrueCloudLab/frostfs-sdk-go/version" ) // Result represents report on the results of the data audit in NeoFS system. // -// Result is mutually binary-compatible with github.com/nspcc-dev/neofs-api-go/v2/audit.DataAuditResult +// Result is mutually binary-compatible with github.com/TrueCloudLab/frostfs-api-go/v2/audit.DataAuditResult // message. See Marshal / Unmarshal methods. // // Instances can be created using built-in var declaration. diff --git a/audit/result_test.go b/audit/result_test.go index 0f8c413..e00efaa 100644 --- a/audit/result_test.go +++ b/audit/result_test.go @@ -4,11 +4,11 @@ import ( "bytes" "testing" - "github.com/nspcc-dev/neofs-sdk-go/audit" - audittest "github.com/nspcc-dev/neofs-sdk-go/audit/test" - cidtest "github.com/nspcc-dev/neofs-sdk-go/container/id/test" - oid "github.com/nspcc-dev/neofs-sdk-go/object/id" - oidtest "github.com/nspcc-dev/neofs-sdk-go/object/id/test" + "github.com/TrueCloudLab/frostfs-sdk-go/audit" + audittest "github.com/TrueCloudLab/frostfs-sdk-go/audit/test" + cidtest "github.com/TrueCloudLab/frostfs-sdk-go/container/id/test" + oid "github.com/TrueCloudLab/frostfs-sdk-go/object/id" + oidtest "github.com/TrueCloudLab/frostfs-sdk-go/object/id/test" "github.com/stretchr/testify/require" ) diff --git a/audit/test/doc.go b/audit/test/doc.go index e999409..92cc082 100644 --- a/audit/test/doc.go +++ b/audit/test/doc.go @@ -5,7 +5,7 @@ Note that importing the package into source files is highly discouraged. Random instance generation functions can be useful when testing expects any value, e.g.: - import audittest "github.com/nspcc-dev/neofs-sdk-go/audit/test" + import audittest "github.com/TrueCloudLab/frostfs-sdk-go/audit/test" dec := audittest.Result() // test the value diff --git a/audit/test/generate.go b/audit/test/generate.go index 2e2b956..a1a4848 100644 --- a/audit/test/generate.go +++ b/audit/test/generate.go @@ -1,9 +1,9 @@ package audittest import ( - "github.com/nspcc-dev/neofs-sdk-go/audit" - cidtest "github.com/nspcc-dev/neofs-sdk-go/container/id/test" - oidtest "github.com/nspcc-dev/neofs-sdk-go/object/id/test" + "github.com/TrueCloudLab/frostfs-sdk-go/audit" + cidtest "github.com/TrueCloudLab/frostfs-sdk-go/container/id/test" + oidtest "github.com/TrueCloudLab/frostfs-sdk-go/object/id/test" ) // Result returns random audit.Result. diff --git a/bearer/bearer.go b/bearer/bearer.go index 27b266b..d157538 100644 --- a/bearer/bearer.go +++ b/bearer/bearer.go @@ -5,18 +5,18 @@ import ( "errors" "fmt" - "github.com/nspcc-dev/neofs-api-go/v2/acl" - "github.com/nspcc-dev/neofs-api-go/v2/refs" - cid "github.com/nspcc-dev/neofs-sdk-go/container/id" - neofscrypto "github.com/nspcc-dev/neofs-sdk-go/crypto" - neofsecdsa "github.com/nspcc-dev/neofs-sdk-go/crypto/ecdsa" - "github.com/nspcc-dev/neofs-sdk-go/eacl" - "github.com/nspcc-dev/neofs-sdk-go/user" + "github.com/TrueCloudLab/frostfs-api-go/v2/acl" + "github.com/TrueCloudLab/frostfs-api-go/v2/refs" + cid "github.com/TrueCloudLab/frostfs-sdk-go/container/id" + frostfscrypto "github.com/TrueCloudLab/frostfs-sdk-go/crypto" + frostfsecdsa "github.com/TrueCloudLab/frostfs-sdk-go/crypto/ecdsa" + "github.com/TrueCloudLab/frostfs-sdk-go/eacl" + "github.com/TrueCloudLab/frostfs-sdk-go/user" ) // Token represents bearer token for object service operations. // -// Token is mutually compatible with github.com/nspcc-dev/neofs-api-go/v2/acl.BearerToken +// Token is mutually compatible with github.com/TrueCloudLab/frostfs-api-go/v2/acl.BearerToken // message. See ReadFromV2 / WriteToV2 methods. // // Instances can be created using built-in var declaration. @@ -255,9 +255,9 @@ func (b Token) AssertUser(id user.ID) bool { // // See also VerifySignature, Issuer. func (b *Token) Sign(key ecdsa.PrivateKey) error { - var sig neofscrypto.Signature + var sig frostfscrypto.Signature - err := sig.Calculate(neofsecdsa.Signer(key), b.signedData()) + err := sig.Calculate(frostfsecdsa.Signer(key), b.signedData()) if err != nil { return err } @@ -278,7 +278,7 @@ func (b Token) VerifySignature() bool { return false } - var sig neofscrypto.Signature + var sig frostfscrypto.Signature // TODO: (#233) check owner<->key relation return sig.ReadFromV2(b.sig) == nil && sig.Verify(b.signedData()) @@ -359,7 +359,7 @@ func ResolveIssuer(b Token) (usr user.ID) { binKey := b.SigningKeyBytes() if len(binKey) != 0 { - var key neofsecdsa.PublicKey + var key frostfsecdsa.PublicKey if key.Decode(binKey) == nil { user.IDFromKey(&usr, ecdsa.PublicKey(key)) } diff --git a/bearer/bearer_test.go b/bearer/bearer_test.go index e820bb7..02727d5 100644 --- a/bearer/bearer_test.go +++ b/bearer/bearer_test.go @@ -5,18 +5,18 @@ import ( "math/rand" "testing" + "github.com/TrueCloudLab/frostfs-api-go/v2/acl" + "github.com/TrueCloudLab/frostfs-api-go/v2/refs" + "github.com/TrueCloudLab/frostfs-sdk-go/bearer" + bearertest "github.com/TrueCloudLab/frostfs-sdk-go/bearer/test" + cidtest "github.com/TrueCloudLab/frostfs-sdk-go/container/id/test" + frostfscrypto "github.com/TrueCloudLab/frostfs-sdk-go/crypto" + frostfsecdsa "github.com/TrueCloudLab/frostfs-sdk-go/crypto/ecdsa" + "github.com/TrueCloudLab/frostfs-sdk-go/eacl" + eacltest "github.com/TrueCloudLab/frostfs-sdk-go/eacl/test" + "github.com/TrueCloudLab/frostfs-sdk-go/user" + usertest "github.com/TrueCloudLab/frostfs-sdk-go/user/test" "github.com/nspcc-dev/neo-go/pkg/crypto/keys" - "github.com/nspcc-dev/neofs-api-go/v2/acl" - "github.com/nspcc-dev/neofs-api-go/v2/refs" - "github.com/nspcc-dev/neofs-sdk-go/bearer" - bearertest "github.com/nspcc-dev/neofs-sdk-go/bearer/test" - cidtest "github.com/nspcc-dev/neofs-sdk-go/container/id/test" - neofscrypto "github.com/nspcc-dev/neofs-sdk-go/crypto" - neofsecdsa "github.com/nspcc-dev/neofs-sdk-go/crypto/ecdsa" - "github.com/nspcc-dev/neofs-sdk-go/eacl" - eacltest "github.com/nspcc-dev/neofs-sdk-go/eacl/test" - "github.com/nspcc-dev/neofs-sdk-go/user" - usertest "github.com/nspcc-dev/neofs-sdk-go/user/test" "github.com/stretchr/testify/require" ) @@ -349,9 +349,9 @@ func TestToken_ReadFromV2(t *testing.T) { k, err := keys.NewPrivateKey() require.NoError(t, err) - signer := neofsecdsa.Signer(k.PrivateKey) + signer := frostfsecdsa.Signer(k.PrivateKey) - var s neofscrypto.Signature + var s frostfscrypto.Signature require.NoError(t, s.Calculate(signer, body.StableMarshal(nil))) diff --git a/bearer/doc.go b/bearer/doc.go index 52436eb..90ab156 100644 --- a/bearer/doc.go +++ b/bearer/doc.go @@ -22,7 +22,7 @@ Bearer token must be signed by owner of the container. Provide signed token in JSON or binary format to the request sender. Request sender can attach this bearer token to the object service requests: - import sdkClient "github.com/nspcc-dev/neofs-sdk-go/client" + import sdkClient "github.com/TrueCloudLab/frostfs-sdk-go/client" var headParams sdkClient.PrmObjectHead headParams.WithBearerToken(bearerToken) diff --git a/bearer/test/generate.go b/bearer/test/generate.go index 65148cc..6c08ef6 100644 --- a/bearer/test/generate.go +++ b/bearer/test/generate.go @@ -1,9 +1,9 @@ package bearertest import ( - "github.com/nspcc-dev/neofs-sdk-go/bearer" - eacltest "github.com/nspcc-dev/neofs-sdk-go/eacl/test" - usertest "github.com/nspcc-dev/neofs-sdk-go/user/test" + "github.com/TrueCloudLab/frostfs-sdk-go/bearer" + eacltest "github.com/TrueCloudLab/frostfs-sdk-go/eacl/test" + usertest "github.com/TrueCloudLab/frostfs-sdk-go/user/test" ) // Token returns random bearer.Token. diff --git a/checksum/checksum.go b/checksum/checksum.go index 5d69c70..01e191b 100644 --- a/checksum/checksum.go +++ b/checksum/checksum.go @@ -6,13 +6,13 @@ import ( "errors" "fmt" - "github.com/nspcc-dev/neofs-api-go/v2/refs" - "github.com/nspcc-dev/tzhash/tz" + "github.com/TrueCloudLab/frostfs-api-go/v2/refs" + "github.com/TrueCloudLab/tzhash/tz" ) // Checksum represents checksum of some digital data. // -// Checksum is mutually compatible with github.com/nspcc-dev/neofs-api-go/v2/refs.Checksum +// Checksum is mutually compatible with github.com/TrueCloudLab/frostfs-api-go/v2/refs.Checksum // message. See ReadFromV2 / WriteToV2 methods. // // Instances can be created using built-in var declaration. diff --git a/checksum/checksum_test.go b/checksum/checksum_test.go index f9d22c9..b7d0cf7 100644 --- a/checksum/checksum_test.go +++ b/checksum/checksum_test.go @@ -5,8 +5,8 @@ import ( "crypto/sha256" "testing" - "github.com/nspcc-dev/neofs-api-go/v2/refs" - "github.com/nspcc-dev/tzhash/tz" + "github.com/TrueCloudLab/frostfs-api-go/v2/refs" + "github.com/TrueCloudLab/tzhash/tz" "github.com/stretchr/testify/require" ) diff --git a/checksum/example_test.go b/checksum/example_test.go index 42239f2..c62f9e2 100644 --- a/checksum/example_test.go +++ b/checksum/example_test.go @@ -6,7 +6,7 @@ import ( "fmt" "math/rand" - "github.com/nspcc-dev/neofs-api-go/v2/refs" + "github.com/TrueCloudLab/frostfs-api-go/v2/refs" ) func ExampleCalculate() { diff --git a/checksum/test/doc.go b/checksum/test/doc.go index ad428ec..64652da 100644 --- a/checksum/test/doc.go +++ b/checksum/test/doc.go @@ -5,7 +5,7 @@ Note that importing the package into source files is highly discouraged. Random instance generation functions can be useful when testing expects any value, e.g.: - import checksumtest "github.com/nspcc-dev/neofs-sdk-go/checksum/test" + import checksumtest "github.com/TrueCloudLab/frostfs-sdk-go/checksum/test" cs := checksumtest.Checksum() // test the value diff --git a/checksum/test/generate.go b/checksum/test/generate.go index 72eeadb..5305168 100644 --- a/checksum/test/generate.go +++ b/checksum/test/generate.go @@ -4,7 +4,7 @@ import ( "crypto/sha256" "math/rand" - "github.com/nspcc-dev/neofs-sdk-go/checksum" + "github.com/TrueCloudLab/frostfs-sdk-go/checksum" ) // Checksum returns random checksum.Checksum. diff --git a/client/accounting.go b/client/accounting.go index b77d8e2..ede7d84 100644 --- a/client/accounting.go +++ b/client/accounting.go @@ -3,12 +3,12 @@ package client import ( "context" - v2accounting "github.com/nspcc-dev/neofs-api-go/v2/accounting" - "github.com/nspcc-dev/neofs-api-go/v2/refs" - rpcapi "github.com/nspcc-dev/neofs-api-go/v2/rpc" - "github.com/nspcc-dev/neofs-api-go/v2/rpc/client" - "github.com/nspcc-dev/neofs-sdk-go/accounting" - "github.com/nspcc-dev/neofs-sdk-go/user" + v2accounting "github.com/TrueCloudLab/frostfs-api-go/v2/accounting" + "github.com/TrueCloudLab/frostfs-api-go/v2/refs" + rpcapi "github.com/TrueCloudLab/frostfs-api-go/v2/rpc" + "github.com/TrueCloudLab/frostfs-api-go/v2/rpc/client" + "github.com/TrueCloudLab/frostfs-sdk-go/accounting" + "github.com/TrueCloudLab/frostfs-sdk-go/user" ) // PrmBalanceGet groups parameters of BalanceGet operation. diff --git a/client/api.go b/client/api.go index b16f757..56bd336 100644 --- a/client/api.go +++ b/client/api.go @@ -4,9 +4,9 @@ import ( "context" "fmt" - v2netmap "github.com/nspcc-dev/neofs-api-go/v2/netmap" - rpcapi "github.com/nspcc-dev/neofs-api-go/v2/rpc" - "github.com/nspcc-dev/neofs-api-go/v2/rpc/client" + v2netmap "github.com/TrueCloudLab/frostfs-api-go/v2/netmap" + rpcapi "github.com/TrueCloudLab/frostfs-api-go/v2/rpc" + "github.com/TrueCloudLab/frostfs-api-go/v2/rpc/client" ) // interface of NeoFS API server. Exists for test purposes only. diff --git a/client/client.go b/client/client.go index bea46f6..fc3d918 100644 --- a/client/client.go +++ b/client/client.go @@ -7,9 +7,9 @@ import ( "errors" "time" - v2accounting "github.com/nspcc-dev/neofs-api-go/v2/accounting" - "github.com/nspcc-dev/neofs-api-go/v2/rpc" - "github.com/nspcc-dev/neofs-api-go/v2/rpc/client" + v2accounting "github.com/TrueCloudLab/frostfs-api-go/v2/accounting" + "github.com/TrueCloudLab/frostfs-api-go/v2/rpc" + "github.com/TrueCloudLab/frostfs-api-go/v2/rpc/client" ) // Client represents virtual connection to the NeoFS network to communicate @@ -123,7 +123,7 @@ func (c *Client) Dial(prm PrmDial) error { // sets underlying provider of neoFSAPIServer. The method is used for testing as an approach // to skip Dial stage and override NeoFS API server. MUST NOT be used outside test code. -// In real applications wrapper over github.com/nspcc-dev/neofs-api-go/v2/rpc/client +// In real applications wrapper over github.com/TrueCloudLab/frostfs-api-go/v2/rpc/client // is statically used. func (c *Client) setNeoFSAPIServer(server neoFSAPIServer) { c.server = server diff --git a/client/client_test.go b/client/client_test.go index a9f1001..a78b769 100644 --- a/client/client_test.go +++ b/client/client_test.go @@ -7,7 +7,7 @@ import ( "crypto/rand" "testing" - apistatus "github.com/nspcc-dev/neofs-sdk-go/client/status" + apistatus "github.com/TrueCloudLab/frostfs-sdk-go/client/status" "github.com/stretchr/testify/require" ) diff --git a/client/common.go b/client/common.go index c47aafa..764e32c 100644 --- a/client/common.go +++ b/client/common.go @@ -4,12 +4,12 @@ import ( "crypto/ecdsa" "fmt" - "github.com/nspcc-dev/neofs-api-go/v2/refs" - "github.com/nspcc-dev/neofs-api-go/v2/rpc/client" - v2session "github.com/nspcc-dev/neofs-api-go/v2/session" - "github.com/nspcc-dev/neofs-api-go/v2/signature" - apistatus "github.com/nspcc-dev/neofs-sdk-go/client/status" - "github.com/nspcc-dev/neofs-sdk-go/version" + "github.com/TrueCloudLab/frostfs-api-go/v2/refs" + "github.com/TrueCloudLab/frostfs-api-go/v2/rpc/client" + v2session "github.com/TrueCloudLab/frostfs-api-go/v2/session" + "github.com/TrueCloudLab/frostfs-api-go/v2/signature" + apistatus "github.com/TrueCloudLab/frostfs-sdk-go/client/status" + "github.com/TrueCloudLab/frostfs-sdk-go/version" ) // common interface of resulting structures with API status. @@ -334,7 +334,7 @@ func (c *Client) initCallContext(ctx *contextCall) { ctx.netMagic = c.prm.netMagic } -// ExecRaw executes f with underlying github.com/nspcc-dev/neofs-api-go/v2/rpc/client.Client +// ExecRaw executes f with underlying github.com/TrueCloudLab/frostfs-api-go/v2/rpc/client.Client // instance. Communicate over the Protocol Buffers protocol in a more flexible way: // most often used to transmit data over a fixed version of the NeoFS protocol, as well // as to support custom services. @@ -345,7 +345,7 @@ func (c *Client) initCallContext(ctx *contextCall) { // before closing the connection. // // See also Dial and Close. -// See also github.com/nspcc-dev/neofs-api-go/v2/rpc/client package docs. +// See also github.com/TrueCloudLab/frostfs-api-go/v2/rpc/client package docs. func (c *Client) ExecRaw(f func(client *client.Client) error) error { return f(&c.c) } diff --git a/client/container.go b/client/container.go index 60676bd..2e00fa9 100644 --- a/client/container.go +++ b/client/container.go @@ -5,18 +5,18 @@ import ( "errors" "fmt" - v2container "github.com/nspcc-dev/neofs-api-go/v2/container" - "github.com/nspcc-dev/neofs-api-go/v2/refs" - rpcapi "github.com/nspcc-dev/neofs-api-go/v2/rpc" - "github.com/nspcc-dev/neofs-api-go/v2/rpc/client" - v2session "github.com/nspcc-dev/neofs-api-go/v2/session" - "github.com/nspcc-dev/neofs-sdk-go/container" - cid "github.com/nspcc-dev/neofs-sdk-go/container/id" - neofscrypto "github.com/nspcc-dev/neofs-sdk-go/crypto" - neofsecdsa "github.com/nspcc-dev/neofs-sdk-go/crypto/ecdsa" - "github.com/nspcc-dev/neofs-sdk-go/eacl" - "github.com/nspcc-dev/neofs-sdk-go/session" - "github.com/nspcc-dev/neofs-sdk-go/user" + v2container "github.com/TrueCloudLab/frostfs-api-go/v2/container" + "github.com/TrueCloudLab/frostfs-api-go/v2/refs" + rpcapi "github.com/TrueCloudLab/frostfs-api-go/v2/rpc" + "github.com/TrueCloudLab/frostfs-api-go/v2/rpc/client" + v2session "github.com/TrueCloudLab/frostfs-api-go/v2/session" + "github.com/TrueCloudLab/frostfs-sdk-go/container" + cid "github.com/TrueCloudLab/frostfs-sdk-go/container/id" + frostfscrypto "github.com/TrueCloudLab/frostfs-sdk-go/crypto" + frostfsecdsa "github.com/TrueCloudLab/frostfs-sdk-go/crypto/ecdsa" + "github.com/TrueCloudLab/frostfs-sdk-go/eacl" + "github.com/TrueCloudLab/frostfs-sdk-go/session" + "github.com/TrueCloudLab/frostfs-sdk-go/user" ) // PrmContainerPut groups parameters of ContainerPut operation. @@ -96,7 +96,7 @@ func (c *Client) ContainerPut(ctx context.Context, prm PrmContainerPut) (*ResCon var cnr v2container.Container prm.cnr.WriteToV2(&cnr) - var sig neofscrypto.Signature + var sig frostfscrypto.Signature err := container.CalculateSignature(&sig, prm.cnr, c.prm.key) if err != nil { @@ -438,9 +438,9 @@ func (c *Client) ContainerDelete(ctx context.Context, prm PrmContainerDelete) (* // don't get confused with stable marshaled protobuf container.ID structure data := cidV2.GetValue() - var sig neofscrypto.Signature + var sig frostfscrypto.Signature - err := sig.Calculate(neofsecdsa.SignerRFC6979(c.prm.key), data) + err := sig.Calculate(frostfsecdsa.SignerRFC6979(c.prm.key), data) if err != nil { return nil, fmt.Errorf("calculate signature: %w", err) } @@ -659,9 +659,9 @@ func (c *Client) ContainerSetEACL(ctx context.Context, prm PrmContainerSetEACL) // sign the eACL table eaclV2 := prm.table.ToV2() - var sig neofscrypto.Signature + var sig frostfscrypto.Signature - err := sig.Calculate(neofsecdsa.SignerRFC6979(c.prm.key), eaclV2.StableMarshal(nil)) + err := sig.Calculate(frostfsecdsa.SignerRFC6979(c.prm.key), eaclV2.StableMarshal(nil)) if err != nil { return nil, fmt.Errorf("calculate signature: %w", err) } diff --git a/client/doc.go b/client/doc.go index 35a3a07..22e28ad 100644 --- a/client/doc.go +++ b/client/doc.go @@ -47,8 +47,8 @@ Consume custom service of the server: rpc CustomRPC(CustomRPCRequest) returns (CustomRPCResponse); } - import "github.com/nspcc-dev/neofs-api-go/v2/rpc/client" - import "github.com/nspcc-dev/neofs-api-go/v2/rpc/common" + import "github.com/TrueCloudLab/frostfs-api-go/v2/rpc/client" + import "github.com/TrueCloudLab/frostfs-api-go/v2/rpc/common" req := new(CustomRPCRequest) // ... @@ -72,7 +72,7 @@ for the all operations are write-only and the results of the all operations are read-only. To be able to override client behavior (e.g. for tests), abstract it with an interface: - import "github.com/nspcc-dev/neofs-sdk-go/client" + import "github.com/TrueCloudLab/frostfs-sdk-go/client" type NeoFSClient interface { // Operations according to the application needs diff --git a/client/errors.go b/client/errors.go index 70fe57c..846bc45 100644 --- a/client/errors.go +++ b/client/errors.go @@ -4,7 +4,7 @@ import ( "errors" "fmt" - apistatus "github.com/nspcc-dev/neofs-sdk-go/client/status" + apistatus "github.com/TrueCloudLab/frostfs-sdk-go/client/status" ) // unwraps err using errors.Unwrap and returns the result. diff --git a/client/errors_test.go b/client/errors_test.go index 49f11d1..a63ee96 100644 --- a/client/errors_test.go +++ b/client/errors_test.go @@ -4,8 +4,8 @@ import ( "fmt" "testing" - "github.com/nspcc-dev/neofs-sdk-go/client" - apistatus "github.com/nspcc-dev/neofs-sdk-go/client/status" + "github.com/TrueCloudLab/frostfs-sdk-go/client" + apistatus "github.com/TrueCloudLab/frostfs-sdk-go/client/status" "github.com/stretchr/testify/require" ) diff --git a/client/netmap.go b/client/netmap.go index e8cd404..ba98dd4 100644 --- a/client/netmap.go +++ b/client/netmap.go @@ -4,14 +4,14 @@ import ( "context" "fmt" - v2netmap "github.com/nspcc-dev/neofs-api-go/v2/netmap" - rpcapi "github.com/nspcc-dev/neofs-api-go/v2/rpc" - "github.com/nspcc-dev/neofs-api-go/v2/rpc/client" - v2session "github.com/nspcc-dev/neofs-api-go/v2/session" - "github.com/nspcc-dev/neofs-api-go/v2/signature" - apistatus "github.com/nspcc-dev/neofs-sdk-go/client/status" - "github.com/nspcc-dev/neofs-sdk-go/netmap" - "github.com/nspcc-dev/neofs-sdk-go/version" + v2netmap "github.com/TrueCloudLab/frostfs-api-go/v2/netmap" + rpcapi "github.com/TrueCloudLab/frostfs-api-go/v2/rpc" + "github.com/TrueCloudLab/frostfs-api-go/v2/rpc/client" + v2session "github.com/TrueCloudLab/frostfs-api-go/v2/session" + "github.com/TrueCloudLab/frostfs-api-go/v2/signature" + apistatus "github.com/TrueCloudLab/frostfs-sdk-go/client/status" + "github.com/TrueCloudLab/frostfs-sdk-go/netmap" + "github.com/TrueCloudLab/frostfs-sdk-go/version" ) // PrmEndpointInfo groups parameters of EndpointInfo operation. diff --git a/client/netmap_test.go b/client/netmap_test.go index 8bfaaac..e2b8791 100644 --- a/client/netmap_test.go +++ b/client/netmap_test.go @@ -6,11 +6,11 @@ import ( "fmt" "testing" - v2netmap "github.com/nspcc-dev/neofs-api-go/v2/netmap" - "github.com/nspcc-dev/neofs-api-go/v2/session" - "github.com/nspcc-dev/neofs-api-go/v2/signature" - apistatus "github.com/nspcc-dev/neofs-sdk-go/client/status" - "github.com/nspcc-dev/neofs-sdk-go/netmap" + v2netmap "github.com/TrueCloudLab/frostfs-api-go/v2/netmap" + "github.com/TrueCloudLab/frostfs-api-go/v2/session" + "github.com/TrueCloudLab/frostfs-api-go/v2/signature" + apistatus "github.com/TrueCloudLab/frostfs-sdk-go/client/status" + "github.com/TrueCloudLab/frostfs-sdk-go/netmap" "github.com/stretchr/testify/require" ) diff --git a/client/object_delete.go b/client/object_delete.go index 4dbb7f6..7f55db9 100644 --- a/client/object_delete.go +++ b/client/object_delete.go @@ -5,18 +5,18 @@ import ( "crypto/ecdsa" "fmt" - "github.com/nspcc-dev/neofs-api-go/v2/acl" - v2object "github.com/nspcc-dev/neofs-api-go/v2/object" - v2refs "github.com/nspcc-dev/neofs-api-go/v2/refs" - rpcapi "github.com/nspcc-dev/neofs-api-go/v2/rpc" - "github.com/nspcc-dev/neofs-api-go/v2/rpc/client" - v2session "github.com/nspcc-dev/neofs-api-go/v2/session" - "github.com/nspcc-dev/neofs-api-go/v2/signature" - "github.com/nspcc-dev/neofs-sdk-go/bearer" - apistatus "github.com/nspcc-dev/neofs-sdk-go/client/status" - cid "github.com/nspcc-dev/neofs-sdk-go/container/id" - oid "github.com/nspcc-dev/neofs-sdk-go/object/id" - "github.com/nspcc-dev/neofs-sdk-go/session" + "github.com/TrueCloudLab/frostfs-api-go/v2/acl" + v2object "github.com/TrueCloudLab/frostfs-api-go/v2/object" + v2refs "github.com/TrueCloudLab/frostfs-api-go/v2/refs" + rpcapi "github.com/TrueCloudLab/frostfs-api-go/v2/rpc" + "github.com/TrueCloudLab/frostfs-api-go/v2/rpc/client" + v2session "github.com/TrueCloudLab/frostfs-api-go/v2/session" + "github.com/TrueCloudLab/frostfs-api-go/v2/signature" + "github.com/TrueCloudLab/frostfs-sdk-go/bearer" + apistatus "github.com/TrueCloudLab/frostfs-sdk-go/client/status" + cid "github.com/TrueCloudLab/frostfs-sdk-go/container/id" + oid "github.com/TrueCloudLab/frostfs-sdk-go/object/id" + "github.com/TrueCloudLab/frostfs-sdk-go/session" ) // PrmObjectDelete groups parameters of ObjectDelete operation. diff --git a/client/object_get.go b/client/object_get.go index 12d332c..2fa5718 100644 --- a/client/object_get.go +++ b/client/object_get.go @@ -7,19 +7,19 @@ import ( "fmt" "io" - "github.com/nspcc-dev/neofs-api-go/v2/acl" - v2object "github.com/nspcc-dev/neofs-api-go/v2/object" - v2refs "github.com/nspcc-dev/neofs-api-go/v2/refs" - rpcapi "github.com/nspcc-dev/neofs-api-go/v2/rpc" - "github.com/nspcc-dev/neofs-api-go/v2/rpc/client" - v2session "github.com/nspcc-dev/neofs-api-go/v2/session" - "github.com/nspcc-dev/neofs-api-go/v2/signature" - "github.com/nspcc-dev/neofs-sdk-go/bearer" - apistatus "github.com/nspcc-dev/neofs-sdk-go/client/status" - 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" - "github.com/nspcc-dev/neofs-sdk-go/session" + "github.com/TrueCloudLab/frostfs-api-go/v2/acl" + v2object "github.com/TrueCloudLab/frostfs-api-go/v2/object" + v2refs "github.com/TrueCloudLab/frostfs-api-go/v2/refs" + rpcapi "github.com/TrueCloudLab/frostfs-api-go/v2/rpc" + "github.com/TrueCloudLab/frostfs-api-go/v2/rpc/client" + v2session "github.com/TrueCloudLab/frostfs-api-go/v2/session" + "github.com/TrueCloudLab/frostfs-api-go/v2/signature" + "github.com/TrueCloudLab/frostfs-sdk-go/bearer" + apistatus "github.com/TrueCloudLab/frostfs-sdk-go/client/status" + 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" + "github.com/TrueCloudLab/frostfs-sdk-go/session" ) // shared parameters of GET/HEAD/RANGE. diff --git a/client/object_hash.go b/client/object_hash.go index 30ea8e3..e18755a 100644 --- a/client/object_hash.go +++ b/client/object_hash.go @@ -4,18 +4,18 @@ import ( "context" "fmt" - "github.com/nspcc-dev/neofs-api-go/v2/acl" - v2object "github.com/nspcc-dev/neofs-api-go/v2/object" - v2refs "github.com/nspcc-dev/neofs-api-go/v2/refs" - rpcapi "github.com/nspcc-dev/neofs-api-go/v2/rpc" - "github.com/nspcc-dev/neofs-api-go/v2/rpc/client" - v2session "github.com/nspcc-dev/neofs-api-go/v2/session" - "github.com/nspcc-dev/neofs-api-go/v2/signature" - "github.com/nspcc-dev/neofs-sdk-go/bearer" - apistatus "github.com/nspcc-dev/neofs-sdk-go/client/status" - cid "github.com/nspcc-dev/neofs-sdk-go/container/id" - oid "github.com/nspcc-dev/neofs-sdk-go/object/id" - "github.com/nspcc-dev/neofs-sdk-go/session" + "github.com/TrueCloudLab/frostfs-api-go/v2/acl" + v2object "github.com/TrueCloudLab/frostfs-api-go/v2/object" + v2refs "github.com/TrueCloudLab/frostfs-api-go/v2/refs" + rpcapi "github.com/TrueCloudLab/frostfs-api-go/v2/rpc" + "github.com/TrueCloudLab/frostfs-api-go/v2/rpc/client" + v2session "github.com/TrueCloudLab/frostfs-api-go/v2/session" + "github.com/TrueCloudLab/frostfs-api-go/v2/signature" + "github.com/TrueCloudLab/frostfs-sdk-go/bearer" + apistatus "github.com/TrueCloudLab/frostfs-sdk-go/client/status" + cid "github.com/TrueCloudLab/frostfs-sdk-go/container/id" + oid "github.com/TrueCloudLab/frostfs-sdk-go/object/id" + "github.com/TrueCloudLab/frostfs-sdk-go/session" ) // PrmObjectHash groups parameters of ObjectHash operation. diff --git a/client/object_put.go b/client/object_put.go index a7cb5ca..2f8432d 100644 --- a/client/object_put.go +++ b/client/object_put.go @@ -7,17 +7,17 @@ import ( "fmt" "io" - "github.com/nspcc-dev/neofs-api-go/v2/acl" - v2object "github.com/nspcc-dev/neofs-api-go/v2/object" - rpcapi "github.com/nspcc-dev/neofs-api-go/v2/rpc" - "github.com/nspcc-dev/neofs-api-go/v2/rpc/client" - v2session "github.com/nspcc-dev/neofs-api-go/v2/session" - "github.com/nspcc-dev/neofs-api-go/v2/signature" - "github.com/nspcc-dev/neofs-sdk-go/bearer" - apistatus "github.com/nspcc-dev/neofs-sdk-go/client/status" - "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/session" + "github.com/TrueCloudLab/frostfs-api-go/v2/acl" + v2object "github.com/TrueCloudLab/frostfs-api-go/v2/object" + rpcapi "github.com/TrueCloudLab/frostfs-api-go/v2/rpc" + "github.com/TrueCloudLab/frostfs-api-go/v2/rpc/client" + v2session "github.com/TrueCloudLab/frostfs-api-go/v2/session" + "github.com/TrueCloudLab/frostfs-api-go/v2/signature" + "github.com/TrueCloudLab/frostfs-sdk-go/bearer" + apistatus "github.com/TrueCloudLab/frostfs-sdk-go/client/status" + "github.com/TrueCloudLab/frostfs-sdk-go/object" + oid "github.com/TrueCloudLab/frostfs-sdk-go/object/id" + "github.com/TrueCloudLab/frostfs-sdk-go/session" ) // PrmObjectPutInit groups parameters of ObjectPutInit operation. diff --git a/client/object_search.go b/client/object_search.go index cf5f2c1..338e532 100644 --- a/client/object_search.go +++ b/client/object_search.go @@ -7,19 +7,19 @@ import ( "fmt" "io" - "github.com/nspcc-dev/neofs-api-go/v2/acl" - v2object "github.com/nspcc-dev/neofs-api-go/v2/object" - v2refs "github.com/nspcc-dev/neofs-api-go/v2/refs" - rpcapi "github.com/nspcc-dev/neofs-api-go/v2/rpc" - "github.com/nspcc-dev/neofs-api-go/v2/rpc/client" - v2session "github.com/nspcc-dev/neofs-api-go/v2/session" - "github.com/nspcc-dev/neofs-api-go/v2/signature" - "github.com/nspcc-dev/neofs-sdk-go/bearer" - apistatus "github.com/nspcc-dev/neofs-sdk-go/client/status" - 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" - "github.com/nspcc-dev/neofs-sdk-go/session" + "github.com/TrueCloudLab/frostfs-api-go/v2/acl" + v2object "github.com/TrueCloudLab/frostfs-api-go/v2/object" + v2refs "github.com/TrueCloudLab/frostfs-api-go/v2/refs" + rpcapi "github.com/TrueCloudLab/frostfs-api-go/v2/rpc" + "github.com/TrueCloudLab/frostfs-api-go/v2/rpc/client" + v2session "github.com/TrueCloudLab/frostfs-api-go/v2/session" + "github.com/TrueCloudLab/frostfs-api-go/v2/signature" + "github.com/TrueCloudLab/frostfs-sdk-go/bearer" + apistatus "github.com/TrueCloudLab/frostfs-sdk-go/client/status" + 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" + "github.com/TrueCloudLab/frostfs-sdk-go/session" ) // PrmObjectSearch groups parameters of ObjectSearch operation. diff --git a/client/object_search_test.go b/client/object_search_test.go index 862924c..2c794c4 100644 --- a/client/object_search_test.go +++ b/client/object_search_test.go @@ -7,12 +7,12 @@ import ( "io" "testing" + v2object "github.com/TrueCloudLab/frostfs-api-go/v2/object" + "github.com/TrueCloudLab/frostfs-api-go/v2/refs" + signatureV2 "github.com/TrueCloudLab/frostfs-api-go/v2/signature" + 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" - v2object "github.com/nspcc-dev/neofs-api-go/v2/object" - "github.com/nspcc-dev/neofs-api-go/v2/refs" - signatureV2 "github.com/nspcc-dev/neofs-api-go/v2/signature" - 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" ) diff --git a/client/reputation.go b/client/reputation.go index 16a4714..5ed46a2 100644 --- a/client/reputation.go +++ b/client/reputation.go @@ -3,10 +3,10 @@ package client import ( "context" - v2reputation "github.com/nspcc-dev/neofs-api-go/v2/reputation" - rpcapi "github.com/nspcc-dev/neofs-api-go/v2/rpc" - "github.com/nspcc-dev/neofs-api-go/v2/rpc/client" - "github.com/nspcc-dev/neofs-sdk-go/reputation" + v2reputation "github.com/TrueCloudLab/frostfs-api-go/v2/reputation" + rpcapi "github.com/TrueCloudLab/frostfs-api-go/v2/rpc" + "github.com/TrueCloudLab/frostfs-api-go/v2/rpc/client" + "github.com/TrueCloudLab/frostfs-sdk-go/reputation" ) // PrmAnnounceLocalTrust groups parameters of AnnounceLocalTrust operation. diff --git a/client/response.go b/client/response.go index a414ddc..a10b812 100644 --- a/client/response.go +++ b/client/response.go @@ -1,6 +1,6 @@ package client -import "github.com/nspcc-dev/neofs-api-go/v2/session" +import "github.com/TrueCloudLab/frostfs-api-go/v2/session" // ResponseMetaInfo groups meta information about any NeoFS API response. type ResponseMetaInfo struct { diff --git a/client/session.go b/client/session.go index 66875a2..b676ce0 100644 --- a/client/session.go +++ b/client/session.go @@ -4,11 +4,11 @@ import ( "context" "crypto/ecdsa" - "github.com/nspcc-dev/neofs-api-go/v2/refs" - rpcapi "github.com/nspcc-dev/neofs-api-go/v2/rpc" - "github.com/nspcc-dev/neofs-api-go/v2/rpc/client" - v2session "github.com/nspcc-dev/neofs-api-go/v2/session" - "github.com/nspcc-dev/neofs-sdk-go/user" + "github.com/TrueCloudLab/frostfs-api-go/v2/refs" + rpcapi "github.com/TrueCloudLab/frostfs-api-go/v2/rpc" + "github.com/TrueCloudLab/frostfs-api-go/v2/rpc/client" + v2session "github.com/TrueCloudLab/frostfs-api-go/v2/session" + "github.com/TrueCloudLab/frostfs-sdk-go/user" ) // PrmSessionCreate groups parameters of SessionCreate operation. diff --git a/client/status/common.go b/client/status/common.go index 3093e9b..f8b82b2 100644 --- a/client/status/common.go +++ b/client/status/common.go @@ -3,7 +3,7 @@ package apistatus import ( "encoding/binary" - "github.com/nspcc-dev/neofs-api-go/v2/status" + "github.com/TrueCloudLab/frostfs-api-go/v2/status" ) // ServerInternal describes failure statuses related to internal server errors. diff --git a/client/status/common_test.go b/client/status/common_test.go index 032263a..47ec732 100644 --- a/client/status/common_test.go +++ b/client/status/common_test.go @@ -3,8 +3,8 @@ package apistatus_test import ( "testing" - "github.com/nspcc-dev/neofs-api-go/v2/status" - apistatus "github.com/nspcc-dev/neofs-sdk-go/client/status" + "github.com/TrueCloudLab/frostfs-api-go/v2/status" + apistatus "github.com/TrueCloudLab/frostfs-sdk-go/client/status" "github.com/stretchr/testify/require" ) diff --git a/client/status/container.go b/client/status/container.go index f638b3f..57e60c9 100644 --- a/client/status/container.go +++ b/client/status/container.go @@ -1,8 +1,8 @@ package apistatus import ( - "github.com/nspcc-dev/neofs-api-go/v2/container" - "github.com/nspcc-dev/neofs-api-go/v2/status" + "github.com/TrueCloudLab/frostfs-api-go/v2/container" + "github.com/TrueCloudLab/frostfs-api-go/v2/status" ) // ContainerNotFound describes status of the failure because of the missing container. diff --git a/client/status/object.go b/client/status/object.go index 5adfc85..a71b4da 100644 --- a/client/status/object.go +++ b/client/status/object.go @@ -1,8 +1,8 @@ package apistatus import ( - "github.com/nspcc-dev/neofs-api-go/v2/object" - "github.com/nspcc-dev/neofs-api-go/v2/status" + "github.com/TrueCloudLab/frostfs-api-go/v2/object" + "github.com/TrueCloudLab/frostfs-api-go/v2/status" ) // ObjectLocked describes status of the failure because of the locked object. diff --git a/client/status/object_test.go b/client/status/object_test.go index 2e34ecf..5a5a39b 100644 --- a/client/status/object_test.go +++ b/client/status/object_test.go @@ -3,7 +3,7 @@ package apistatus_test import ( "testing" - apistatus "github.com/nspcc-dev/neofs-sdk-go/client/status" + apistatus "github.com/TrueCloudLab/frostfs-sdk-go/client/status" "github.com/stretchr/testify/require" ) diff --git a/client/status/session.go b/client/status/session.go index 5928daf..5bec922 100644 --- a/client/status/session.go +++ b/client/status/session.go @@ -1,8 +1,8 @@ package apistatus import ( - "github.com/nspcc-dev/neofs-api-go/v2/session" - "github.com/nspcc-dev/neofs-api-go/v2/status" + "github.com/TrueCloudLab/frostfs-api-go/v2/session" + "github.com/TrueCloudLab/frostfs-api-go/v2/status" ) // SessionTokenNotFound describes status of the failure because of the missing session token. diff --git a/client/status/status_test.go b/client/status/status_test.go index 7b8d15f..54460ac 100644 --- a/client/status/status_test.go +++ b/client/status/status_test.go @@ -4,7 +4,7 @@ import ( "errors" "testing" - apistatus "github.com/nspcc-dev/neofs-sdk-go/client/status" + apistatus "github.com/TrueCloudLab/frostfs-sdk-go/client/status" "github.com/stretchr/testify/require" ) diff --git a/client/status/success.go b/client/status/success.go index bd9ee82..8fe2a91 100644 --- a/client/status/success.go +++ b/client/status/success.go @@ -1,7 +1,7 @@ package apistatus import ( - "github.com/nspcc-dev/neofs-api-go/v2/status" + "github.com/TrueCloudLab/frostfs-api-go/v2/status" ) // SuccessDefaultV2 represents Status instance of default success. Implements StatusV2. diff --git a/client/status/unrecognized.go b/client/status/unrecognized.go index 2d6c8e6..65f9819 100644 --- a/client/status/unrecognized.go +++ b/client/status/unrecognized.go @@ -1,7 +1,7 @@ package apistatus import ( - "github.com/nspcc-dev/neofs-api-go/v2/status" + "github.com/TrueCloudLab/frostfs-api-go/v2/status" ) type unrecognizedStatusV2 struct { diff --git a/client/status/v2.go b/client/status/v2.go index 5978efe..520a94c 100644 --- a/client/status/v2.go +++ b/client/status/v2.go @@ -3,10 +3,10 @@ package apistatus import ( "fmt" - "github.com/nspcc-dev/neofs-api-go/v2/container" - "github.com/nspcc-dev/neofs-api-go/v2/object" - "github.com/nspcc-dev/neofs-api-go/v2/session" - "github.com/nspcc-dev/neofs-api-go/v2/status" + "github.com/TrueCloudLab/frostfs-api-go/v2/container" + "github.com/TrueCloudLab/frostfs-api-go/v2/object" + "github.com/TrueCloudLab/frostfs-api-go/v2/session" + "github.com/TrueCloudLab/frostfs-api-go/v2/status" ) // StatusV2 defines a variety of Status instances compatible with NeoFS API V2 protocol. @@ -15,7 +15,7 @@ import ( type StatusV2 interface { Status - // ToStatusV2 returns the status as github.com/nspcc-dev/neofs-api-go/v2/status.Status message structure. + // ToStatusV2 returns the status as github.com/TrueCloudLab/frostfs-api-go/v2/status.Status message structure. ToStatusV2() *status.Status } diff --git a/client/status/v2_test.go b/client/status/v2_test.go index 8615bb9..01d7298 100644 --- a/client/status/v2_test.go +++ b/client/status/v2_test.go @@ -4,7 +4,7 @@ import ( "errors" "testing" - apistatus "github.com/nspcc-dev/neofs-sdk-go/client/status" + apistatus "github.com/TrueCloudLab/frostfs-sdk-go/client/status" "github.com/stretchr/testify/require" ) diff --git a/container/container.go b/container/container.go index 4de1b0f..acb9154 100644 --- a/container/container.go +++ b/container/container.go @@ -8,18 +8,18 @@ import ( "strconv" "time" + "github.com/TrueCloudLab/frostfs-api-go/v2/container" + v2netmap "github.com/TrueCloudLab/frostfs-api-go/v2/netmap" + "github.com/TrueCloudLab/frostfs-api-go/v2/refs" + "github.com/TrueCloudLab/frostfs-sdk-go/container/acl" + cid "github.com/TrueCloudLab/frostfs-sdk-go/container/id" + frostfscrypto "github.com/TrueCloudLab/frostfs-sdk-go/crypto" + frostfsecdsa "github.com/TrueCloudLab/frostfs-sdk-go/crypto/ecdsa" + "github.com/TrueCloudLab/frostfs-sdk-go/netmap" + subnetid "github.com/TrueCloudLab/frostfs-sdk-go/subnet/id" + "github.com/TrueCloudLab/frostfs-sdk-go/user" + "github.com/TrueCloudLab/frostfs-sdk-go/version" "github.com/google/uuid" - "github.com/nspcc-dev/neofs-api-go/v2/container" - v2netmap "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/container/acl" - cid "github.com/nspcc-dev/neofs-sdk-go/container/id" - neofscrypto "github.com/nspcc-dev/neofs-sdk-go/crypto" - neofsecdsa "github.com/nspcc-dev/neofs-sdk-go/crypto/ecdsa" - "github.com/nspcc-dev/neofs-sdk-go/netmap" - subnetid "github.com/nspcc-dev/neofs-sdk-go/subnet/id" - "github.com/nspcc-dev/neofs-sdk-go/user" - "github.com/nspcc-dev/neofs-sdk-go/version" ) // Container represents descriptor of the NeoFS container. Container logically @@ -37,7 +37,7 @@ import ( // Instances for existing containers can be initialized using decoding methods // (e.g Unmarshal). // -// Container is mutually compatible with github.com/nspcc-dev/neofs-api-go/v2/container.Container +// Container is mutually compatible with github.com/TrueCloudLab/frostfs-api-go/v2/container.Container // message. See ReadFromV2 / WriteToV2 methods. type Container struct { v2 container.Container @@ -481,13 +481,13 @@ func ReadDomain(cnr Container) (res Domain) { // will most likely break the signature. // // See also VerifySignature. -func CalculateSignature(dst *neofscrypto.Signature, cnr Container, signer ecdsa.PrivateKey) error { - return dst.Calculate(neofsecdsa.SignerRFC6979(signer), cnr.Marshal()) +func CalculateSignature(dst *frostfscrypto.Signature, cnr Container, signer ecdsa.PrivateKey) error { + return dst.Calculate(frostfsecdsa.SignerRFC6979(signer), cnr.Marshal()) } // VerifySignature verifies Container signature calculated using CalculateSignature. // Result means signature correctness. -func VerifySignature(sig neofscrypto.Signature, cnr Container) bool { +func VerifySignature(sig frostfscrypto.Signature, cnr Container) bool { return sig.Verify(cnr.Marshal()) } diff --git a/container/container_test.go b/container/container_test.go index 06b8f7e..d83a6a2 100644 --- a/container/container_test.go +++ b/container/container_test.go @@ -6,21 +6,21 @@ import ( "testing" "time" + v2container "github.com/TrueCloudLab/frostfs-api-go/v2/container" + v2netmap "github.com/TrueCloudLab/frostfs-api-go/v2/netmap" + "github.com/TrueCloudLab/frostfs-api-go/v2/refs" + "github.com/TrueCloudLab/frostfs-sdk-go/container" + 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" + netmaptest "github.com/TrueCloudLab/frostfs-sdk-go/netmap/test" + subnetid "github.com/TrueCloudLab/frostfs-sdk-go/subnet/id" + subnetidtest "github.com/TrueCloudLab/frostfs-sdk-go/subnet/id/test" + usertest "github.com/TrueCloudLab/frostfs-sdk-go/user/test" + "github.com/TrueCloudLab/frostfs-sdk-go/version" "github.com/google/uuid" "github.com/nspcc-dev/neo-go/pkg/crypto/keys" - v2container "github.com/nspcc-dev/neofs-api-go/v2/container" - v2netmap "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/container" - 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" - netmaptest "github.com/nspcc-dev/neofs-sdk-go/netmap/test" - subnetid "github.com/nspcc-dev/neofs-sdk-go/subnet/id" - subnetidtest "github.com/nspcc-dev/neofs-sdk-go/subnet/id/test" - usertest "github.com/nspcc-dev/neofs-sdk-go/user/test" - "github.com/nspcc-dev/neofs-sdk-go/version" "github.com/stretchr/testify/require" ) @@ -337,14 +337,14 @@ func TestCalculateSignature(t *testing.T) { val := containertest.Container() - var sig neofscrypto.Signature + var sig frostfscrypto.Signature require.NoError(t, container.CalculateSignature(&sig, val, key.PrivateKey)) var msg refs.Signature sig.WriteToV2(&msg) - var sig2 neofscrypto.Signature + var sig2 frostfscrypto.Signature require.NoError(t, sig2.ReadFromV2(msg)) require.True(t, container.VerifySignature(sig2, val)) diff --git a/container/doc.go b/container/doc.go index e333d48..ceadd95 100644 --- a/container/doc.go +++ b/container/doc.go @@ -23,11 +23,11 @@ it using the instance of Container types // process the container data Instances can be also used to process NeoFS API V2 protocol messages -(see neo.fs.v2.container package in https://github.com/nspcc-dev/neofs-api). +(see neo.fs.v2.container package in https://github.com/TrueCloudLab/frostfs-api). On client side: - import "github.com/nspcc-dev/neofs-api-go/v2/container" + import "github.com/TrueCloudLab/frostfs-api-go/v2/container" var msg container.Container cnr.WriteToV2(&msg) diff --git a/container/id/id.go b/container/id/id.go index bf39511..ea6a7d8 100644 --- a/container/id/id.go +++ b/container/id/id.go @@ -4,13 +4,13 @@ import ( "crypto/sha256" "fmt" + "github.com/TrueCloudLab/frostfs-api-go/v2/refs" "github.com/mr-tron/base58" - "github.com/nspcc-dev/neofs-api-go/v2/refs" ) // ID represents NeoFS container identifier. // -// ID is mutually compatible with github.com/nspcc-dev/neofs-api-go/v2/refs.ContainerID +// ID is mutually compatible with github.com/TrueCloudLab/frostfs-api-go/v2/refs.ContainerID // message. See ReadFromV2 / WriteToV2 methods. // // Instances can be created using built-in var declaration. diff --git a/container/id/id_test.go b/container/id/id_test.go index 8c6afa3..2cac2f2 100644 --- a/container/id/id_test.go +++ b/container/id/id_test.go @@ -5,10 +5,10 @@ import ( "math/rand" "testing" + "github.com/TrueCloudLab/frostfs-api-go/v2/refs" + cid "github.com/TrueCloudLab/frostfs-sdk-go/container/id" + cidtest "github.com/TrueCloudLab/frostfs-sdk-go/container/id/test" "github.com/mr-tron/base58" - "github.com/nspcc-dev/neofs-api-go/v2/refs" - 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" ) diff --git a/container/id/test/doc.go b/container/id/test/doc.go index 14857d0..b3f7ddb 100644 --- a/container/id/test/doc.go +++ b/container/id/test/doc.go @@ -5,7 +5,7 @@ Note that importing the package into source files is highly discouraged. Random instance generation functions can be useful when testing expects any value, e.g.: - import cidtest "github.com/nspcc-dev/neofs-sdk-go/container/id/test" + import cidtest "github.com/TrueCloudLab/frostfs-sdk-go/container/id/test" cid := cidtest.ID() // test the value diff --git a/container/id/test/id.go b/container/id/test/id.go index c8e7deb..4b0b3b5 100644 --- a/container/id/test/id.go +++ b/container/id/test/id.go @@ -4,7 +4,7 @@ import ( "crypto/sha256" "math/rand" - cid "github.com/nspcc-dev/neofs-sdk-go/container/id" + cid "github.com/TrueCloudLab/frostfs-sdk-go/container/id" ) // ID returns random cid.ID. diff --git a/container/network.go b/container/network.go index 68d1b32..a030235 100644 --- a/container/network.go +++ b/container/network.go @@ -1,7 +1,7 @@ package container import ( - "github.com/nspcc-dev/neofs-sdk-go/netmap" + "github.com/TrueCloudLab/frostfs-sdk-go/netmap" ) // ApplyNetworkConfig applies network configuration to the diff --git a/container/network_test.go b/container/network_test.go index 6391851..f3c887c 100644 --- a/container/network_test.go +++ b/container/network_test.go @@ -3,9 +3,9 @@ package container_test import ( "testing" - "github.com/nspcc-dev/neofs-sdk-go/container" - containertest "github.com/nspcc-dev/neofs-sdk-go/container/test" - netmaptest "github.com/nspcc-dev/neofs-sdk-go/netmap/test" + "github.com/TrueCloudLab/frostfs-sdk-go/container" + containertest "github.com/TrueCloudLab/frostfs-sdk-go/container/test" + netmaptest "github.com/TrueCloudLab/frostfs-sdk-go/netmap/test" "github.com/stretchr/testify/require" ) diff --git a/container/size.go b/container/size.go index 2402a5f..ec1221a 100644 --- a/container/size.go +++ b/container/size.go @@ -4,15 +4,15 @@ import ( "errors" "fmt" - "github.com/nspcc-dev/neofs-api-go/v2/container" - "github.com/nspcc-dev/neofs-api-go/v2/refs" - cid "github.com/nspcc-dev/neofs-sdk-go/container/id" + "github.com/TrueCloudLab/frostfs-api-go/v2/container" + "github.com/TrueCloudLab/frostfs-api-go/v2/refs" + cid "github.com/TrueCloudLab/frostfs-sdk-go/container/id" ) // SizeEstimation groups information about estimation of the size of the data // stored in the NeoFS container. // -// SizeEstimation is mutually compatible with github.com/nspcc-dev/neofs-api-go/v2/container.UsedSpaceAnnouncement +// SizeEstimation is mutually compatible with github.com/TrueCloudLab/frostfs-api-go/v2/container.UsedSpaceAnnouncement // message. See ReadFromV2 / WriteToV2 methods. type SizeEstimation struct { m container.UsedSpaceAnnouncement diff --git a/container/size_test.go b/container/size_test.go index 97cf49d..822785e 100644 --- a/container/size_test.go +++ b/container/size_test.go @@ -4,11 +4,11 @@ import ( "crypto/sha256" "testing" - v2container "github.com/nspcc-dev/neofs-api-go/v2/container" - "github.com/nspcc-dev/neofs-api-go/v2/refs" - "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" + v2container "github.com/TrueCloudLab/frostfs-api-go/v2/container" + "github.com/TrueCloudLab/frostfs-api-go/v2/refs" + "github.com/TrueCloudLab/frostfs-sdk-go/container" + cid "github.com/TrueCloudLab/frostfs-sdk-go/container/id" + cidtest "github.com/TrueCloudLab/frostfs-sdk-go/container/id/test" "github.com/stretchr/testify/require" ) diff --git a/container/test/generate.go b/container/test/generate.go index aa68dfc..2b26f30 100644 --- a/container/test/generate.go +++ b/container/test/generate.go @@ -3,11 +3,11 @@ package containertest import ( "math/rand" - "github.com/nspcc-dev/neofs-sdk-go/container" - "github.com/nspcc-dev/neofs-sdk-go/container/acl" - cidtest "github.com/nspcc-dev/neofs-sdk-go/container/id/test" - netmaptest "github.com/nspcc-dev/neofs-sdk-go/netmap/test" - usertest "github.com/nspcc-dev/neofs-sdk-go/user/test" + "github.com/TrueCloudLab/frostfs-sdk-go/container" + "github.com/TrueCloudLab/frostfs-sdk-go/container/acl" + cidtest "github.com/TrueCloudLab/frostfs-sdk-go/container/id/test" + netmaptest "github.com/TrueCloudLab/frostfs-sdk-go/netmap/test" + usertest "github.com/TrueCloudLab/frostfs-sdk-go/user/test" ) // Container returns random container.Container. diff --git a/crypto/crypto_test.go b/crypto/crypto_test.go index 90b36bf..4bf6752 100644 --- a/crypto/crypto_test.go +++ b/crypto/crypto_test.go @@ -1,13 +1,13 @@ -package neofscrypto_test +package frostfscrypto_test import ( "math/rand" "testing" + "github.com/TrueCloudLab/frostfs-api-go/v2/refs" + frostfscrypto "github.com/TrueCloudLab/frostfs-sdk-go/crypto" + frostfsecdsa "github.com/TrueCloudLab/frostfs-sdk-go/crypto/ecdsa" "github.com/nspcc-dev/neo-go/pkg/crypto/keys" - "github.com/nspcc-dev/neofs-api-go/v2/refs" - neofscrypto "github.com/nspcc-dev/neofs-sdk-go/crypto" - neofsecdsa "github.com/nspcc-dev/neofs-sdk-go/crypto/ecdsa" "github.com/stretchr/testify/require" ) @@ -18,18 +18,18 @@ func TestSignature(t *testing.T) { k, err := keys.NewPrivateKey() require.NoError(t, err) - var s neofscrypto.Signature + var s frostfscrypto.Signature var m refs.Signature - for _, f := range []func() neofscrypto.Signer{ - func() neofscrypto.Signer { - return neofsecdsa.Signer(k.PrivateKey) + for _, f := range []func() frostfscrypto.Signer{ + func() frostfscrypto.Signer { + return frostfsecdsa.Signer(k.PrivateKey) }, - func() neofscrypto.Signer { - return neofsecdsa.SignerRFC6979(k.PrivateKey) + func() frostfscrypto.Signer { + return frostfsecdsa.SignerRFC6979(k.PrivateKey) }, - func() neofscrypto.Signer { - return neofsecdsa.SignerWalletConnect(k.PrivateKey) + func() frostfscrypto.Signer { + return frostfsecdsa.SignerWalletConnect(k.PrivateKey) }, } { signer := f() diff --git a/crypto/doc.go b/crypto/doc.go index fe97a31..b249c3e 100644 --- a/crypto/doc.go +++ b/crypto/doc.go @@ -1,5 +1,5 @@ /* -Package neofscrypto collects NeoFS cryptographic primitives. +Package frostfscrypto collects NeoFS cryptographic primitives. Signer type unifies entities for signing NeoFS data. @@ -25,11 +25,11 @@ PublicKey allows to verify signatures. // ... Signature can be also used to process NeoFS API V2 protocol messages -(see neo.fs.v2.refs package in https://github.com/nspcc-dev/neofs-api). +(see neo.fs.v2.refs package in https://github.com/TrueCloudLab/frostfs-api). On client side: - import "github.com/nspcc-dev/neofs-api-go/v2/refs" + import "github.com/TrueCloudLab/frostfs-api-go/v2/refs" var msg refs.Signature sig.WriteToV2(&msg) @@ -40,7 +40,7 @@ On server side: // recv msg - var sig neofscrypto.Signature + var sig frostfscrypto.Signature sig.ReadFromV2(msg) // process sig @@ -48,4 +48,4 @@ On server side: Using package types in an application is recommended to potentially work with different protocol versions with which these types are compatible. */ -package neofscrypto +package frostfscrypto diff --git a/crypto/ecdsa/doc.go b/crypto/ecdsa/doc.go index 09d03ee..b5c9611 100644 --- a/crypto/ecdsa/doc.go +++ b/crypto/ecdsa/doc.go @@ -1,12 +1,12 @@ /* -Package neofsecdsa collects ECDSA primitives for NeoFS cryptography. +Package frostfsecdsa collects ECDSA primitives for NeoFS cryptography. Signer and PublicKey support ECDSA signature algorithm with SHA-512 hashing. SignerRFC6979 and PublicKeyRFC6979 implement signature algorithm described in RFC 6979. -All these types provide corresponding interfaces from neofscrypto package. +All these types provide corresponding interfaces from frostfscrypto package. -Package import causes registration of next signature schemes via neofscrypto.RegisterScheme: - - neofscrypto.ECDSA_SHA512 - - neofscrypto.ECDSA_DETERMINISTIC_SHA256 +Package import causes registration of next signature schemes via frostfscrypto.RegisterScheme: + - frostfscrypto.ECDSA_SHA512 + - frostfscrypto.ECDSA_DETERMINISTIC_SHA256 */ -package neofsecdsa +package frostfsecdsa diff --git a/crypto/ecdsa/init.go b/crypto/ecdsa/init.go index f0e5c25..e64c89d 100644 --- a/crypto/ecdsa/init.go +++ b/crypto/ecdsa/init.go @@ -1,17 +1,17 @@ -package neofsecdsa +package frostfsecdsa -import neofscrypto "github.com/nspcc-dev/neofs-sdk-go/crypto" +import frostfscrypto "github.com/TrueCloudLab/frostfs-sdk-go/crypto" func init() { - neofscrypto.RegisterScheme(neofscrypto.ECDSA_SHA512, func() neofscrypto.PublicKey { + frostfscrypto.RegisterScheme(frostfscrypto.ECDSA_SHA512, func() frostfscrypto.PublicKey { return new(PublicKey) }) - neofscrypto.RegisterScheme(neofscrypto.ECDSA_DETERMINISTIC_SHA256, func() neofscrypto.PublicKey { + frostfscrypto.RegisterScheme(frostfscrypto.ECDSA_DETERMINISTIC_SHA256, func() frostfscrypto.PublicKey { return new(PublicKeyRFC6979) }) - neofscrypto.RegisterScheme(neofscrypto.ECDSA_WALLETCONNECT, func() neofscrypto.PublicKey { + frostfscrypto.RegisterScheme(frostfscrypto.ECDSA_WALLETCONNECT, func() frostfscrypto.PublicKey { return new(PublicKeyWalletConnect) }) } diff --git a/crypto/ecdsa/public.go b/crypto/ecdsa/public.go index 7c2dfa3..8c5ebc8 100644 --- a/crypto/ecdsa/public.go +++ b/crypto/ecdsa/public.go @@ -1,4 +1,4 @@ -package neofsecdsa +package frostfsecdsa import ( "crypto/ecdsa" @@ -12,7 +12,7 @@ import ( ) // PublicKey is a wrapper over ecdsa.PublicKey used for NeoFS needs. -// Provides neofscrypto.PublicKey interface. +// Provides frostfscrypto.PublicKey interface. // // Instances MUST be initialized from ecdsa.PublicKey using type conversion. type PublicKey ecdsa.PublicKey @@ -78,7 +78,7 @@ func (x PublicKey) Verify(data, signature []byte) bool { } // PublicKeyRFC6979 is a wrapper over ecdsa.PublicKey used for NeoFS needs. -// Provides neofscrypto.PublicKey interface. +// Provides frostfscrypto.PublicKey interface. // // Instances MUST be initialized from ecdsa.PublicKey using type conversion. type PublicKeyRFC6979 ecdsa.PublicKey diff --git a/crypto/ecdsa/signer.go b/crypto/ecdsa/signer.go index adba59b..fd890fa 100644 --- a/crypto/ecdsa/signer.go +++ b/crypto/ecdsa/signer.go @@ -1,4 +1,4 @@ -package neofsecdsa +package frostfsecdsa import ( "crypto/ecdsa" @@ -6,24 +6,24 @@ import ( "crypto/rand" "crypto/sha512" + frostfscrypto "github.com/TrueCloudLab/frostfs-sdk-go/crypto" "github.com/nspcc-dev/neo-go/pkg/crypto/keys" - neofscrypto "github.com/nspcc-dev/neofs-sdk-go/crypto" ) // Signer wraps ecdsa.PrivateKey and represents signer based on ECDSA with -// SHA-512 hashing. Provides neofscrypto.Signer interface. +// SHA-512 hashing. Provides frostfscrypto.Signer interface. // // Instances MUST be initialized from ecdsa.PrivateKey using type conversion. type Signer ecdsa.PrivateKey -// Scheme returns neofscrypto.ECDSA_SHA512. -// Implements neofscrypto.Signer. -func (x Signer) Scheme() neofscrypto.Scheme { - return neofscrypto.ECDSA_SHA512 +// Scheme returns frostfscrypto.ECDSA_SHA512. +// Implements frostfscrypto.Signer. +func (x Signer) Scheme() frostfscrypto.Scheme { + return frostfscrypto.ECDSA_SHA512 } // Sign signs data using ECDSA algorithm with SHA-512 hashing. -// Implements neofscrypto.Signer. +// Implements frostfscrypto.Signer. func (x Signer) Sign(data []byte) ([]byte, error) { h := sha512.Sum512(data) r, s, err := ecdsa.Sign(rand.Reader, (*ecdsa.PrivateKey)(&x), h[:]) @@ -43,26 +43,26 @@ func (x Signer) Sign(data []byte) ([]byte, error) { return buf, nil } -// Public initializes PublicKey and returns it as neofscrypto.PublicKey. -// Implements neofscrypto.Signer. -func (x Signer) Public() neofscrypto.PublicKey { +// Public initializes PublicKey and returns it as frostfscrypto.PublicKey. +// Implements frostfscrypto.Signer. +func (x Signer) Public() frostfscrypto.PublicKey { return (*PublicKey)(&x.PublicKey) } // SignerRFC6979 wraps ecdsa.PrivateKey and represents signer based on deterministic -// ECDSA with SHA-256 hashing (RFC 6979). Provides neofscrypto.Signer interface. +// ECDSA with SHA-256 hashing (RFC 6979). Provides frostfscrypto.Signer interface. // // Instances SHOULD be initialized from ecdsa.PrivateKey using type conversion. type SignerRFC6979 ecdsa.PrivateKey -// Scheme returns neofscrypto.ECDSA_DETERMINISTIC_SHA256. -// Implements neofscrypto.Signer. -func (x SignerRFC6979) Scheme() neofscrypto.Scheme { - return neofscrypto.ECDSA_DETERMINISTIC_SHA256 +// Scheme returns frostfscrypto.ECDSA_DETERMINISTIC_SHA256. +// Implements frostfscrypto.Signer. +func (x SignerRFC6979) Scheme() frostfscrypto.Scheme { + return frostfscrypto.ECDSA_DETERMINISTIC_SHA256 } // Sign signs data using deterministic ECDSA algorithm with SHA-256 hashing. -// Implements neofscrypto.Signer. +// Implements frostfscrypto.Signer. // // See also RFC 6979. func (x SignerRFC6979) Sign(data []byte) ([]byte, error) { @@ -70,8 +70,8 @@ func (x SignerRFC6979) Sign(data []byte) ([]byte, error) { return p.Sign(data), nil } -// Public initializes PublicKeyRFC6979 and returns it as neofscrypto.PublicKey. -// Implements neofscrypto.Signer. -func (x SignerRFC6979) Public() neofscrypto.PublicKey { +// Public initializes PublicKeyRFC6979 and returns it as frostfscrypto.PublicKey. +// Implements frostfscrypto.Signer. +func (x SignerRFC6979) Public() frostfscrypto.PublicKey { return (*PublicKeyRFC6979)(&x.PublicKey) } diff --git a/crypto/ecdsa/wallet_connect.go b/crypto/ecdsa/wallet_connect.go index 5c46f69..7207f5a 100644 --- a/crypto/ecdsa/wallet_connect.go +++ b/crypto/ecdsa/wallet_connect.go @@ -1,4 +1,4 @@ -package neofsecdsa +package frostfsecdsa import ( "crypto/ecdsa" @@ -6,9 +6,9 @@ import ( "encoding/base64" "fmt" + "github.com/TrueCloudLab/frostfs-api-go/v2/util/signature/walletconnect" + frostfscrypto "github.com/TrueCloudLab/frostfs-sdk-go/crypto" "github.com/nspcc-dev/neo-go/pkg/crypto/keys" - "github.com/nspcc-dev/neofs-api-go/v2/util/signature/walletconnect" - neofscrypto "github.com/nspcc-dev/neofs-sdk-go/crypto" ) // SignerWalletConnect is similar to SignerRFC6979 with 2 changes: @@ -18,28 +18,28 @@ import ( // Instances MUST be initialized from ecdsa.PrivateKey using type conversion. type SignerWalletConnect ecdsa.PrivateKey -// Scheme returns neofscrypto.ECDSA_WALLETCONNECT. -// Implements neofscrypto.Signer. -func (x SignerWalletConnect) Scheme() neofscrypto.Scheme { - return neofscrypto.ECDSA_WALLETCONNECT +// Scheme returns frostfscrypto.ECDSA_WALLETCONNECT. +// Implements frostfscrypto.Signer. +func (x SignerWalletConnect) Scheme() frostfscrypto.Scheme { + return frostfscrypto.ECDSA_WALLETCONNECT } // Sign signs data using ECDSA algorithm with SHA-512 hashing. -// Implements neofscrypto.Signer. +// Implements frostfscrypto.Signer. func (x SignerWalletConnect) Sign(data []byte) ([]byte, error) { b64 := make([]byte, base64.StdEncoding.EncodedLen(len(data))) base64.StdEncoding.Encode(b64, data) return walletconnect.Sign((*ecdsa.PrivateKey)(&x), b64) } -// Public initializes PublicKey and returns it as neofscrypto.PublicKey. -// Implements neofscrypto.Signer. -func (x SignerWalletConnect) Public() neofscrypto.PublicKey { +// Public initializes PublicKey and returns it as frostfscrypto.PublicKey. +// Implements frostfscrypto.Signer. +func (x SignerWalletConnect) Public() frostfscrypto.PublicKey { return (*PublicKeyWalletConnect)(&x.PublicKey) } // PublicKeyWalletConnect is a wrapper over ecdsa.PublicKey used for NeoFS needs. -// Provides neofscrypto.PublicKey interface. +// Provides frostfscrypto.PublicKey interface. // // Instances MUST be initialized from ecdsa.PublicKey using type conversion. type PublicKeyWalletConnect ecdsa.PublicKey diff --git a/crypto/signature.go b/crypto/signature.go index af5a769..5dfff1d 100644 --- a/crypto/signature.go +++ b/crypto/signature.go @@ -1,16 +1,16 @@ -package neofscrypto +package frostfscrypto import ( "errors" "fmt" - "github.com/nspcc-dev/neofs-api-go/v2/refs" + "github.com/TrueCloudLab/frostfs-api-go/v2/refs" ) // Signature represents a confirmation of data integrity received by the // digital signature mechanism. // -// Signature is mutually compatible with github.com/nspcc-dev/neofs-api-go/v2/refs.Signature +// Signature is mutually compatible with github.com/TrueCloudLab/frostfs-api-go/v2/refs.Signature // message. See ReadFromV2 / WriteToV2 methods. // // Note that direct typecast is not safe and may result in loss of compatibility: diff --git a/crypto/signer.go b/crypto/signer.go index b1e5388..f92e769 100644 --- a/crypto/signer.go +++ b/crypto/signer.go @@ -1,9 +1,9 @@ -package neofscrypto +package frostfscrypto import ( "fmt" - "github.com/nspcc-dev/neofs-api-go/v2/refs" + "github.com/TrueCloudLab/frostfs-api-go/v2/refs" ) // Scheme represents digital signature algorithm with fixed cryptographic hash function. diff --git a/crypto/util.go b/crypto/util.go index e6f87a3..2da236a 100644 --- a/crypto/util.go +++ b/crypto/util.go @@ -1,4 +1,4 @@ -package neofscrypto +package frostfscrypto import "encoding/hex" diff --git a/eacl/enums.go b/eacl/enums.go index 17c9623..fc8cc60 100644 --- a/eacl/enums.go +++ b/eacl/enums.go @@ -1,7 +1,7 @@ package eacl import ( - v2acl "github.com/nspcc-dev/neofs-api-go/v2/acl" + v2acl "github.com/TrueCloudLab/frostfs-api-go/v2/acl" ) // Action taken if ContainerEACL record matched request. diff --git a/eacl/enums_test.go b/eacl/enums_test.go index 44e6488..82a0258 100644 --- a/eacl/enums_test.go +++ b/eacl/enums_test.go @@ -3,8 +3,8 @@ package eacl_test import ( "testing" - v2acl "github.com/nspcc-dev/neofs-api-go/v2/acl" - "github.com/nspcc-dev/neofs-sdk-go/eacl" + v2acl "github.com/TrueCloudLab/frostfs-api-go/v2/acl" + "github.com/TrueCloudLab/frostfs-sdk-go/eacl" "github.com/stretchr/testify/require" ) diff --git a/eacl/filter.go b/eacl/filter.go index 778b042..32b5ce1 100644 --- a/eacl/filter.go +++ b/eacl/filter.go @@ -3,7 +3,7 @@ package eacl import ( "strconv" - v2acl "github.com/nspcc-dev/neofs-api-go/v2/acl" + v2acl "github.com/TrueCloudLab/frostfs-api-go/v2/acl" ) // Filter defines check conditions if request header is matched or not. Matched diff --git a/eacl/filter_test.go b/eacl/filter_test.go index 7af8d68..b3d1753 100644 --- a/eacl/filter_test.go +++ b/eacl/filter_test.go @@ -4,8 +4,8 @@ import ( "strconv" "testing" - "github.com/nspcc-dev/neofs-api-go/v2/acl" - v2acl "github.com/nspcc-dev/neofs-api-go/v2/acl" + "github.com/TrueCloudLab/frostfs-api-go/v2/acl" + v2acl "github.com/TrueCloudLab/frostfs-api-go/v2/acl" "github.com/stretchr/testify/require" ) diff --git a/eacl/record.go b/eacl/record.go index 806c79d..590d769 100644 --- a/eacl/record.go +++ b/eacl/record.go @@ -3,13 +3,13 @@ package eacl import ( "crypto/ecdsa" - v2acl "github.com/nspcc-dev/neofs-api-go/v2/acl" - "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" - oid "github.com/nspcc-dev/neofs-sdk-go/object/id" - "github.com/nspcc-dev/neofs-sdk-go/user" - "github.com/nspcc-dev/neofs-sdk-go/version" + v2acl "github.com/TrueCloudLab/frostfs-api-go/v2/acl" + "github.com/TrueCloudLab/frostfs-sdk-go/checksum" + 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" + "github.com/TrueCloudLab/frostfs-sdk-go/user" + "github.com/TrueCloudLab/frostfs-sdk-go/version" ) // Record of the ContainerEACL rule, that defines ContainerEACL action, targets for this action, diff --git a/eacl/record_test.go b/eacl/record_test.go index 5b42b91..30c78de 100644 --- a/eacl/record_test.go +++ b/eacl/record_test.go @@ -5,14 +5,14 @@ import ( "fmt" "testing" + v2acl "github.com/TrueCloudLab/frostfs-api-go/v2/acl" + checksumtest "github.com/TrueCloudLab/frostfs-sdk-go/checksum/test" + cidtest "github.com/TrueCloudLab/frostfs-sdk-go/container/id/test" + "github.com/TrueCloudLab/frostfs-sdk-go/object" + oidtest "github.com/TrueCloudLab/frostfs-sdk-go/object/id/test" + usertest "github.com/TrueCloudLab/frostfs-sdk-go/user/test" + versiontest "github.com/TrueCloudLab/frostfs-sdk-go/version/test" "github.com/nspcc-dev/neo-go/pkg/crypto/keys" - v2acl "github.com/nspcc-dev/neofs-api-go/v2/acl" - checksumtest "github.com/nspcc-dev/neofs-sdk-go/checksum/test" - cidtest "github.com/nspcc-dev/neofs-sdk-go/container/id/test" - "github.com/nspcc-dev/neofs-sdk-go/object" - oidtest "github.com/nspcc-dev/neofs-sdk-go/object/id/test" - usertest "github.com/nspcc-dev/neofs-sdk-go/user/test" - versiontest "github.com/nspcc-dev/neofs-sdk-go/version/test" "github.com/stretchr/testify/require" ) diff --git a/eacl/table.go b/eacl/table.go index 68eda7a..0c892c7 100644 --- a/eacl/table.go +++ b/eacl/table.go @@ -4,10 +4,10 @@ import ( "crypto/sha256" "fmt" - v2acl "github.com/nspcc-dev/neofs-api-go/v2/acl" - "github.com/nspcc-dev/neofs-api-go/v2/refs" - cid "github.com/nspcc-dev/neofs-sdk-go/container/id" - "github.com/nspcc-dev/neofs-sdk-go/version" + v2acl "github.com/TrueCloudLab/frostfs-api-go/v2/acl" + "github.com/TrueCloudLab/frostfs-api-go/v2/refs" + cid "github.com/TrueCloudLab/frostfs-sdk-go/container/id" + "github.com/TrueCloudLab/frostfs-sdk-go/version" ) // Table is a group of ContainerEACL records for single container. diff --git a/eacl/table_test.go b/eacl/table_test.go index bed135c..79ff818 100644 --- a/eacl/table_test.go +++ b/eacl/table_test.go @@ -4,11 +4,11 @@ import ( "crypto/sha256" "testing" - "github.com/nspcc-dev/neofs-api-go/v2/refs" - cidtest "github.com/nspcc-dev/neofs-sdk-go/container/id/test" - "github.com/nspcc-dev/neofs-sdk-go/eacl" - eacltest "github.com/nspcc-dev/neofs-sdk-go/eacl/test" - "github.com/nspcc-dev/neofs-sdk-go/version" + "github.com/TrueCloudLab/frostfs-api-go/v2/refs" + cidtest "github.com/TrueCloudLab/frostfs-sdk-go/container/id/test" + "github.com/TrueCloudLab/frostfs-sdk-go/eacl" + eacltest "github.com/TrueCloudLab/frostfs-sdk-go/eacl/test" + "github.com/TrueCloudLab/frostfs-sdk-go/version" "github.com/stretchr/testify/require" ) diff --git a/eacl/target.go b/eacl/target.go index 537e33a..5083f0c 100644 --- a/eacl/target.go +++ b/eacl/target.go @@ -4,8 +4,8 @@ import ( "bytes" "crypto/ecdsa" + v2acl "github.com/TrueCloudLab/frostfs-api-go/v2/acl" "github.com/nspcc-dev/neo-go/pkg/crypto/keys" - v2acl "github.com/nspcc-dev/neofs-api-go/v2/acl" ) // Target is a group of request senders to match ContainerEACL. Defined by role enum diff --git a/eacl/target_test.go b/eacl/target_test.go index 2afd6f9..50f2a77 100644 --- a/eacl/target_test.go +++ b/eacl/target_test.go @@ -4,9 +4,9 @@ import ( "crypto/ecdsa" "testing" + "github.com/TrueCloudLab/frostfs-api-go/v2/acl" + v2acl "github.com/TrueCloudLab/frostfs-api-go/v2/acl" "github.com/nspcc-dev/neo-go/pkg/crypto/keys" - "github.com/nspcc-dev/neofs-api-go/v2/acl" - v2acl "github.com/nspcc-dev/neofs-api-go/v2/acl" "github.com/stretchr/testify/require" ) diff --git a/eacl/test/benchmark_test.go b/eacl/test/benchmark_test.go index 95072cd..3442d44 100644 --- a/eacl/test/benchmark_test.go +++ b/eacl/test/benchmark_test.go @@ -5,9 +5,9 @@ import ( "math/rand" "testing" - cidtest "github.com/nspcc-dev/neofs-sdk-go/container/id/test" - "github.com/nspcc-dev/neofs-sdk-go/eacl" - versiontest "github.com/nspcc-dev/neofs-sdk-go/version/test" + cidtest "github.com/TrueCloudLab/frostfs-sdk-go/container/id/test" + "github.com/TrueCloudLab/frostfs-sdk-go/eacl" + versiontest "github.com/TrueCloudLab/frostfs-sdk-go/version/test" "github.com/stretchr/testify/require" ) diff --git a/eacl/test/generate.go b/eacl/test/generate.go index 8b9c88b..50fc8f3 100644 --- a/eacl/test/generate.go +++ b/eacl/test/generate.go @@ -1,10 +1,10 @@ package eacltest import ( - cidtest "github.com/nspcc-dev/neofs-sdk-go/container/id/test" - "github.com/nspcc-dev/neofs-sdk-go/eacl" - usertest "github.com/nspcc-dev/neofs-sdk-go/user/test" - versiontest "github.com/nspcc-dev/neofs-sdk-go/version/test" + cidtest "github.com/TrueCloudLab/frostfs-sdk-go/container/id/test" + "github.com/TrueCloudLab/frostfs-sdk-go/eacl" + usertest "github.com/TrueCloudLab/frostfs-sdk-go/user/test" + versiontest "github.com/TrueCloudLab/frostfs-sdk-go/version/test" ) // Target returns random eacl.Target. diff --git a/eacl/types.go b/eacl/types.go index 2655413..8fcdd27 100644 --- a/eacl/types.go +++ b/eacl/types.go @@ -1,7 +1,7 @@ package eacl import ( - cid "github.com/nspcc-dev/neofs-sdk-go/container/id" + cid "github.com/TrueCloudLab/frostfs-sdk-go/container/id" ) // Header is an interface of string key-value header. diff --git a/go.mod b/go.mod index 4ab50bd..82cd18f 100644 --- a/go.mod +++ b/go.mod @@ -1,23 +1,25 @@ -module github.com/nspcc-dev/neofs-sdk-go +module github.com/TrueCloudLab/frostfs-sdk-go go 1.17 require ( + github.com/TrueCloudLab/frostfs-api-go/v2 v2.0.0-20221212144048-1351b6656d68 + github.com/TrueCloudLab/frostfs-contract v0.0.0-20221213081248-6c805c1b4e42 + github.com/TrueCloudLab/hrw v1.1.0 + github.com/TrueCloudLab/tzhash v1.7.0 github.com/antlr/antlr4/runtime/Go/antlr v1.4.10 github.com/google/uuid v1.3.0 github.com/hashicorp/golang-lru v0.5.4 github.com/mr-tron/base58 v1.2.0 - github.com/nspcc-dev/hrw v1.0.9 github.com/nspcc-dev/neo-go v0.99.4 - github.com/nspcc-dev/neofs-api-go/v2 v2.14.0 - github.com/nspcc-dev/neofs-contract v0.16.0 - github.com/nspcc-dev/tzhash v1.6.1 github.com/stretchr/testify v1.8.0 go.uber.org/atomic v1.10.0 go.uber.org/zap v1.23.0 ) require ( + github.com/TrueCloudLab/frostfs-crypto v0.5.0 // indirect + github.com/TrueCloudLab/rfc6979 v0.3.0 // indirect github.com/btcsuite/btcd v0.22.0-beta // indirect github.com/coreos/go-semver v0.3.0 // indirect github.com/davecgh/go-spew v1.1.1 // indirect @@ -25,7 +27,6 @@ require ( github.com/gorilla/websocket v1.4.2 // indirect github.com/nspcc-dev/go-ordered-json v0.0.0-20220111165707-25110be27d22 // indirect github.com/nspcc-dev/neo-go/pkg/interop v0.0.0-20220927123257-24c107e3a262 // indirect - github.com/nspcc-dev/neofs-crypto v0.4.0 // indirect github.com/nspcc-dev/rfc6979 v0.2.0 // indirect github.com/pmezard/go-difflib v1.0.0 // indirect github.com/spaolacci/murmur3 v1.1.0 // indirect diff --git a/go.sum b/go.sum index ee624cb..c8ee084 100644 Binary files a/go.sum and b/go.sum differ diff --git a/netmap/context.go b/netmap/context.go index fc3b91c..2697d6e 100644 --- a/netmap/context.go +++ b/netmap/context.go @@ -3,8 +3,8 @@ package netmap import ( "errors" - "github.com/nspcc-dev/hrw" - "github.com/nspcc-dev/neofs-api-go/v2/netmap" + "github.com/TrueCloudLab/frostfs-api-go/v2/netmap" + "github.com/TrueCloudLab/hrw" ) // context of a placement build process. diff --git a/netmap/doc.go b/netmap/doc.go index 931e874..4bac236 100644 --- a/netmap/doc.go +++ b/netmap/doc.go @@ -15,11 +15,11 @@ NetworkInfo type is dedicated to descriptive characterization of network state and settings. Instances can be also used to process NeoFS API V2 protocol messages -(see neo.fs.v2.netmap package in https://github.com/nspcc-dev/neofs-api). +(see neo.fs.v2.netmap package in https://github.com/TrueCloudLab/frostfs-api). On client side: - import "github.com/nspcc-dev/neofs-api-go/v2/netmap" + import "github.com/TrueCloudLab/frostfs-api-go/v2/netmap" var msg netmap.NodeInfo info.WriteToV2(&msg) diff --git a/netmap/filter.go b/netmap/filter.go index bd229ca..17fcfce 100644 --- a/netmap/filter.go +++ b/netmap/filter.go @@ -4,7 +4,7 @@ import ( "fmt" "strconv" - "github.com/nspcc-dev/neofs-api-go/v2/netmap" + "github.com/TrueCloudLab/frostfs-api-go/v2/netmap" ) // mainFilterName is a name of the filter diff --git a/netmap/filter_test.go b/netmap/filter_test.go index fc30073..6e98905 100644 --- a/netmap/filter_test.go +++ b/netmap/filter_test.go @@ -4,7 +4,7 @@ import ( "errors" "testing" - "github.com/nspcc-dev/neofs-api-go/v2/netmap" + "github.com/TrueCloudLab/frostfs-api-go/v2/netmap" "github.com/stretchr/testify/require" ) diff --git a/netmap/helper_test.go b/netmap/helper_test.go index c283f47..d11a3ca 100644 --- a/netmap/helper_test.go +++ b/netmap/helper_test.go @@ -1,7 +1,7 @@ package netmap import ( - "github.com/nspcc-dev/neofs-api-go/v2/netmap" + "github.com/TrueCloudLab/frostfs-api-go/v2/netmap" ) func newFilter(name string, k, v string, op netmap.Operation, fs ...Filter) (f Filter) { diff --git a/netmap/netmap.go b/netmap/netmap.go index 3d312db..7fb3e44 100644 --- a/netmap/netmap.go +++ b/netmap/netmap.go @@ -3,14 +3,14 @@ package netmap import ( "fmt" - "github.com/nspcc-dev/hrw" - "github.com/nspcc-dev/neofs-api-go/v2/netmap" + "github.com/TrueCloudLab/frostfs-api-go/v2/netmap" + "github.com/TrueCloudLab/hrw" ) // NetMap represents NeoFS network map. It includes information about all // storage nodes registered in NeoFS the network. // -// NetMap is mutually compatible with github.com/nspcc-dev/neofs-api-go/v2/netmap.NetMap +// NetMap is mutually compatible with github.com/TrueCloudLab/frostfs-api-go/v2/netmap.NetMap // message. See ReadFromV2 / WriteToV2 methods. // // Instances can be created using built-in var declaration. diff --git a/netmap/netmap_test.go b/netmap/netmap_test.go index 67af033..82e606f 100644 --- a/netmap/netmap_test.go +++ b/netmap/netmap_test.go @@ -3,9 +3,9 @@ package netmap_test import ( "testing" - v2netmap "github.com/nspcc-dev/neofs-api-go/v2/netmap" - "github.com/nspcc-dev/neofs-sdk-go/netmap" - netmaptest "github.com/nspcc-dev/neofs-sdk-go/netmap/test" + v2netmap "github.com/TrueCloudLab/frostfs-api-go/v2/netmap" + "github.com/TrueCloudLab/frostfs-sdk-go/netmap" + netmaptest "github.com/TrueCloudLab/frostfs-sdk-go/netmap/test" "github.com/stretchr/testify/require" ) diff --git a/netmap/network_info.go b/netmap/network_info.go index f582621..af1fb88 100644 --- a/netmap/network_info.go +++ b/netmap/network_info.go @@ -7,14 +7,14 @@ import ( "fmt" "math" + "github.com/TrueCloudLab/frostfs-api-go/v2/netmap" "github.com/nspcc-dev/neo-go/pkg/vm/stackitem" - "github.com/nspcc-dev/neofs-api-go/v2/netmap" ) // NetworkInfo groups information about the NeoFS network state. Mainly used to // describe the current state of the network. // -// NetworkInfo is mutually compatible with github.com/nspcc-dev/neofs-api-go/v2/netmap.NetworkInfo +// NetworkInfo is mutually compatible with github.com/TrueCloudLab/frostfs-api-go/v2/netmap.NetworkInfo // message. See ReadFromV2 / WriteToV2 methods. // // Instances can be created using built-in var declaration. diff --git a/netmap/network_info_test.go b/netmap/network_info_test.go index 710e39a..3e358ff 100644 --- a/netmap/network_info_test.go +++ b/netmap/network_info_test.go @@ -5,8 +5,8 @@ import ( "math" "testing" - "github.com/nspcc-dev/neofs-api-go/v2/netmap" - . "github.com/nspcc-dev/neofs-sdk-go/netmap" + "github.com/TrueCloudLab/frostfs-api-go/v2/netmap" + . "github.com/TrueCloudLab/frostfs-sdk-go/netmap" "github.com/stretchr/testify/require" ) diff --git a/netmap/node_info.go b/netmap/node_info.go index 91a3c32..466b0ed 100644 --- a/netmap/node_info.go +++ b/netmap/node_info.go @@ -7,11 +7,11 @@ import ( "strconv" "strings" - "github.com/nspcc-dev/hrw" - "github.com/nspcc-dev/neofs-api-go/v2/netmap" - "github.com/nspcc-dev/neofs-api-go/v2/refs" - neofscrypto "github.com/nspcc-dev/neofs-sdk-go/crypto" - subnetid "github.com/nspcc-dev/neofs-sdk-go/subnet/id" + "github.com/TrueCloudLab/frostfs-api-go/v2/netmap" + "github.com/TrueCloudLab/frostfs-api-go/v2/refs" + frostfscrypto "github.com/TrueCloudLab/frostfs-sdk-go/crypto" + subnetid "github.com/TrueCloudLab/frostfs-sdk-go/subnet/id" + "github.com/TrueCloudLab/hrw" ) // NodeInfo groups information about NeoFS storage node which is reflected @@ -20,7 +20,7 @@ import ( // about the nodes is available to all network participants to work with the network // map (mainly to comply with container storage policies). // -// NodeInfo is mutually compatible with github.com/nspcc-dev/neofs-api-go/v2/netmap.NodeInfo +// NodeInfo is mutually compatible with github.com/TrueCloudLab/frostfs-api-go/v2/netmap.NodeInfo // message. See ReadFromV2 / WriteToV2 methods. // // Instances can be created using built-in var declaration. @@ -181,7 +181,7 @@ func (x NodeInfo) PublicKey() []byte { // StringifyPublicKey returns HEX representation of PublicKey. func StringifyPublicKey(node NodeInfo) string { - return neofscrypto.StringifyKeyBinary(node.PublicKey()) + return frostfscrypto.StringifyKeyBinary(node.PublicKey()) } // SetNetworkEndpoints sets list to the announced node's network endpoints. diff --git a/netmap/policy.go b/netmap/policy.go index 2884c3f..e72541a 100644 --- a/netmap/policy.go +++ b/netmap/policy.go @@ -7,18 +7,18 @@ import ( "strconv" "strings" + "github.com/TrueCloudLab/frostfs-api-go/v2/netmap" + "github.com/TrueCloudLab/frostfs-api-go/v2/refs" + "github.com/TrueCloudLab/frostfs-sdk-go/netmap/parser" + subnetid "github.com/TrueCloudLab/frostfs-sdk-go/subnet/id" "github.com/antlr/antlr4/runtime/Go/antlr" - "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/netmap/parser" - subnetid "github.com/nspcc-dev/neofs-sdk-go/subnet/id" ) // PlacementPolicy declares policy to store objects in the NeoFS container. // Within itself, PlacementPolicy represents a set of rules to select a subset // of nodes from NeoFS network map - node-candidates for object storage. // -// PlacementPolicy is mutually compatible with github.com/nspcc-dev/neofs-api-go/v2/netmap.PlacementPolicy +// PlacementPolicy is mutually compatible with github.com/TrueCloudLab/frostfs-api-go/v2/netmap.PlacementPolicy // message. See ReadFromV2 / WriteToV2 methods. // // Instances can be created using built-in var declaration. diff --git a/netmap/policy_test.go b/netmap/policy_test.go index 91161c9..85be238 100644 --- a/netmap/policy_test.go +++ b/netmap/policy_test.go @@ -4,8 +4,8 @@ import ( "strings" "testing" - . "github.com/nspcc-dev/neofs-sdk-go/netmap" - netmaptest "github.com/nspcc-dev/neofs-sdk-go/netmap/test" + . "github.com/TrueCloudLab/frostfs-sdk-go/netmap" + netmaptest "github.com/TrueCloudLab/frostfs-sdk-go/netmap/test" "github.com/stretchr/testify/require" ) diff --git a/netmap/selector.go b/netmap/selector.go index 2e66b9f..370cf10 100644 --- a/netmap/selector.go +++ b/netmap/selector.go @@ -4,9 +4,9 @@ import ( "fmt" "sort" - "github.com/nspcc-dev/hrw" - "github.com/nspcc-dev/neofs-api-go/v2/netmap" - subnetid "github.com/nspcc-dev/neofs-sdk-go/subnet/id" + "github.com/TrueCloudLab/frostfs-api-go/v2/netmap" + subnetid "github.com/TrueCloudLab/frostfs-sdk-go/subnet/id" + "github.com/TrueCloudLab/hrw" ) // processSelectors processes selectors and returns error is any of them is invalid. diff --git a/netmap/selector_test.go b/netmap/selector_test.go index 7f31e49..96d9b21 100644 --- a/netmap/selector_test.go +++ b/netmap/selector_test.go @@ -7,8 +7,8 @@ import ( "strconv" "testing" - "github.com/nspcc-dev/hrw" - "github.com/nspcc-dev/neofs-api-go/v2/netmap" + "github.com/TrueCloudLab/frostfs-api-go/v2/netmap" + "github.com/TrueCloudLab/hrw" "github.com/stretchr/testify/require" ) diff --git a/netmap/subnet_test.go b/netmap/subnet_test.go index 11dac77..23f5d9e 100644 --- a/netmap/subnet_test.go +++ b/netmap/subnet_test.go @@ -3,8 +3,8 @@ package netmap_test import ( "testing" - "github.com/nspcc-dev/neofs-sdk-go/netmap" - subnetid "github.com/nspcc-dev/neofs-sdk-go/subnet/id" + "github.com/TrueCloudLab/frostfs-sdk-go/netmap" + subnetid "github.com/TrueCloudLab/frostfs-sdk-go/subnet/id" "github.com/stretchr/testify/require" ) diff --git a/netmap/test/generate.go b/netmap/test/generate.go index 45ab0e1..4553cb0 100644 --- a/netmap/test/generate.go +++ b/netmap/test/generate.go @@ -3,8 +3,8 @@ package netmaptest import ( "math/rand" - "github.com/nspcc-dev/neofs-sdk-go/netmap" - subnetidtest "github.com/nspcc-dev/neofs-sdk-go/subnet/id/test" + "github.com/TrueCloudLab/frostfs-sdk-go/netmap" + subnetidtest "github.com/TrueCloudLab/frostfs-sdk-go/subnet/id/test" ) func filter(withInner bool) (x netmap.Filter) { diff --git a/ns/dns.go b/ns/dns.go index 065eef9..f06c5bf 100644 --- a/ns/dns.go +++ b/ns/dns.go @@ -3,7 +3,7 @@ package ns import ( "net" - cid "github.com/nspcc-dev/neofs-sdk-go/container/id" + cid "github.com/TrueCloudLab/frostfs-sdk-go/container/id" ) // DNS looks up NeoFS names using system DNS. diff --git a/ns/nns.go b/ns/nns.go index 95109f3..cdcc580 100644 --- a/ns/nns.go +++ b/ns/nns.go @@ -6,6 +6,9 @@ import ( "fmt" "net/url" + "github.com/TrueCloudLab/frostfs-contract/nns" + "github.com/TrueCloudLab/frostfs-sdk-go/container" + cid "github.com/TrueCloudLab/frostfs-sdk-go/container/id" "github.com/nspcc-dev/neo-go/pkg/core/state" "github.com/nspcc-dev/neo-go/pkg/neorpc/result" "github.com/nspcc-dev/neo-go/pkg/rpcclient" @@ -13,9 +16,6 @@ import ( "github.com/nspcc-dev/neo-go/pkg/rpcclient/unwrap" "github.com/nspcc-dev/neo-go/pkg/util" "github.com/nspcc-dev/neo-go/pkg/vm/stackitem" - "github.com/nspcc-dev/neofs-contract/nns" - "github.com/nspcc-dev/neofs-sdk-go/container" - cid "github.com/nspcc-dev/neofs-sdk-go/container/id" ) // NNS looks up NeoFS names using Neo Name Service. diff --git a/ns/nns_test.go b/ns/nns_test.go index 32e35f4..5300626 100644 --- a/ns/nns_test.go +++ b/ns/nns_test.go @@ -8,12 +8,12 @@ import ( "strings" "testing" + "github.com/TrueCloudLab/frostfs-sdk-go/container" + cidtest "github.com/TrueCloudLab/frostfs-sdk-go/container/id/test" "github.com/nspcc-dev/neo-go/pkg/neorpc/result" "github.com/nspcc-dev/neo-go/pkg/util" "github.com/nspcc-dev/neo-go/pkg/vm/stackitem" "github.com/nspcc-dev/neo-go/pkg/vm/vmstate" - "github.com/nspcc-dev/neofs-sdk-go/container" - cidtest "github.com/nspcc-dev/neofs-sdk-go/container/id/test" "github.com/stretchr/testify/require" ) diff --git a/object/attribute.go b/object/attribute.go index 7c74cb9..5af2975 100644 --- a/object/attribute.go +++ b/object/attribute.go @@ -1,7 +1,7 @@ package object import ( - "github.com/nspcc-dev/neofs-api-go/v2/object" + "github.com/TrueCloudLab/frostfs-api-go/v2/object" ) // Attribute represents v2-compatible object attribute. diff --git a/object/attribute_test.go b/object/attribute_test.go index d5f1b3f..7a2593c 100644 --- a/object/attribute_test.go +++ b/object/attribute_test.go @@ -3,7 +3,7 @@ package object import ( "testing" - "github.com/nspcc-dev/neofs-api-go/v2/object" + "github.com/TrueCloudLab/frostfs-api-go/v2/object" "github.com/stretchr/testify/require" ) diff --git a/object/error_test.go b/object/error_test.go index 22189a8..27a7e34 100644 --- a/object/error_test.go +++ b/object/error_test.go @@ -4,7 +4,7 @@ import ( "errors" "testing" - "github.com/nspcc-dev/neofs-sdk-go/object" + "github.com/TrueCloudLab/frostfs-sdk-go/object" "github.com/stretchr/testify/require" ) diff --git a/object/fmt.go b/object/fmt.go index 6d99ec6..372e4a3 100644 --- a/object/fmt.go +++ b/object/fmt.go @@ -7,10 +7,10 @@ import ( "errors" "fmt" - "github.com/nspcc-dev/neofs-api-go/v2/object" - "github.com/nspcc-dev/neofs-sdk-go/checksum" - neofscrypto "github.com/nspcc-dev/neofs-sdk-go/crypto" - oid "github.com/nspcc-dev/neofs-sdk-go/object/id" + "github.com/TrueCloudLab/frostfs-api-go/v2/object" + "github.com/TrueCloudLab/frostfs-sdk-go/checksum" + frostfscrypto "github.com/TrueCloudLab/frostfs-sdk-go/crypto" + oid "github.com/TrueCloudLab/frostfs-sdk-go/object/id" ) var ( @@ -126,7 +126,7 @@ func (o *Object) VerifyIDSignature() bool { return false } - var sig neofscrypto.Signature + var sig frostfscrypto.Signature return sig.ReadFromV2(*sigV2) == nil && sig.Verify(idV2.StableMarshal(nil)) } diff --git a/object/id/address.go b/object/id/address.go index 3d34d1c..daca0f3 100644 --- a/object/id/address.go +++ b/object/id/address.go @@ -5,14 +5,14 @@ import ( "fmt" "strings" - "github.com/nspcc-dev/neofs-api-go/v2/refs" - cid "github.com/nspcc-dev/neofs-sdk-go/container/id" + "github.com/TrueCloudLab/frostfs-api-go/v2/refs" + cid "github.com/TrueCloudLab/frostfs-sdk-go/container/id" ) // Address represents global object identifier in NeoFS network. Each object // belongs to exactly one container and is uniquely addressed within the container. // -// Address is mutually compatible with github.com/nspcc-dev/neofs-api-go/v2/refs.Address +// Address is mutually compatible with github.com/TrueCloudLab/frostfs-api-go/v2/refs.Address // message. See ReadFromV2 / WriteToV2 methods. // // Instances can be created using built-in var declaration. diff --git a/object/id/address_test.go b/object/id/address_test.go index 3c47cdb..f7f4e94 100644 --- a/object/id/address_test.go +++ b/object/id/address_test.go @@ -3,10 +3,10 @@ package oid_test import ( "testing" - "github.com/nspcc-dev/neofs-api-go/v2/refs" - cidtest "github.com/nspcc-dev/neofs-sdk-go/container/id/test" - oid "github.com/nspcc-dev/neofs-sdk-go/object/id" - oidtest "github.com/nspcc-dev/neofs-sdk-go/object/id/test" + "github.com/TrueCloudLab/frostfs-api-go/v2/refs" + cidtest "github.com/TrueCloudLab/frostfs-sdk-go/container/id/test" + oid "github.com/TrueCloudLab/frostfs-sdk-go/object/id" + oidtest "github.com/TrueCloudLab/frostfs-sdk-go/object/id/test" "github.com/stretchr/testify/require" ) diff --git a/object/id/id.go b/object/id/id.go index a7edb8c..e254000 100644 --- a/object/id/id.go +++ b/object/id/id.go @@ -5,15 +5,15 @@ import ( "crypto/sha256" "fmt" + "github.com/TrueCloudLab/frostfs-api-go/v2/refs" + frostfscrypto "github.com/TrueCloudLab/frostfs-sdk-go/crypto" + frostfsecdsa "github.com/TrueCloudLab/frostfs-sdk-go/crypto/ecdsa" "github.com/mr-tron/base58" - "github.com/nspcc-dev/neofs-api-go/v2/refs" - neofscrypto "github.com/nspcc-dev/neofs-sdk-go/crypto" - neofsecdsa "github.com/nspcc-dev/neofs-sdk-go/crypto/ecdsa" ) // ID represents NeoFS object identifier in a container. // -// ID is mutually compatible with github.com/nspcc-dev/neofs-api-go/v2/refs.ObjectID +// ID is mutually compatible with github.com/TrueCloudLab/frostfs-api-go/v2/refs.ObjectID // message. See ReadFromV2 / WriteToV2 methods. // // Instances can be created using built-in var declaration. @@ -117,15 +117,15 @@ func (id ID) String() string { } // CalculateIDSignature signs object id with provided key. -func (id ID) CalculateIDSignature(key ecdsa.PrivateKey) (neofscrypto.Signature, error) { +func (id ID) CalculateIDSignature(key ecdsa.PrivateKey) (frostfscrypto.Signature, error) { data, err := id.Marshal() if err != nil { - return neofscrypto.Signature{}, fmt.Errorf("marshal ID: %w", err) + return frostfscrypto.Signature{}, fmt.Errorf("marshal ID: %w", err) } - var sig neofscrypto.Signature + var sig frostfscrypto.Signature - return sig, sig.Calculate(neofsecdsa.Signer(key), data) + return sig, sig.Calculate(frostfsecdsa.Signer(key), data) } // Marshal marshals ID into a protobuf binary form. diff --git a/object/id/id_test.go b/object/id/id_test.go index baa1b22..5d33238 100644 --- a/object/id/id_test.go +++ b/object/id/id_test.go @@ -6,8 +6,8 @@ import ( "strconv" "testing" + "github.com/TrueCloudLab/frostfs-api-go/v2/refs" "github.com/mr-tron/base58" - "github.com/nspcc-dev/neofs-api-go/v2/refs" "github.com/stretchr/testify/require" ) diff --git a/object/id/test/doc.go b/object/id/test/doc.go index 1b7c40e..3104a7d 100644 --- a/object/id/test/doc.go +++ b/object/id/test/doc.go @@ -5,7 +5,7 @@ Note that importing the package into source files is highly discouraged. Random instance generation functions can be useful when testing expects any value, e.g.: - import oidtest "github.com/nspcc-dev/neofs-sdk-go/object/id/test" + import oidtest "github.com/TrueCloudLab/frostfs-sdk-go/object/id/test" value := oidtest.ID() // test the value diff --git a/object/id/test/generate.go b/object/id/test/generate.go index 2757584..66b7cbf 100644 --- a/object/id/test/generate.go +++ b/object/id/test/generate.go @@ -4,8 +4,8 @@ import ( "crypto/sha256" "math/rand" - cidtest "github.com/nspcc-dev/neofs-sdk-go/container/id/test" - oid "github.com/nspcc-dev/neofs-sdk-go/object/id" + cidtest "github.com/TrueCloudLab/frostfs-sdk-go/container/id/test" + oid "github.com/TrueCloudLab/frostfs-sdk-go/object/id" ) // ID returns random oid.ID. diff --git a/object/lock.go b/object/lock.go index ad93fa3..acf7227 100644 --- a/object/lock.go +++ b/object/lock.go @@ -1,9 +1,9 @@ package object import ( - v2object "github.com/nspcc-dev/neofs-api-go/v2/object" - "github.com/nspcc-dev/neofs-api-go/v2/refs" - oid "github.com/nspcc-dev/neofs-sdk-go/object/id" + v2object "github.com/TrueCloudLab/frostfs-api-go/v2/object" + "github.com/TrueCloudLab/frostfs-api-go/v2/refs" + oid "github.com/TrueCloudLab/frostfs-sdk-go/object/id" ) // Lock represents record with locked objects. It is compatible with diff --git a/object/lock_test.go b/object/lock_test.go index ee680fb..be8759c 100644 --- a/object/lock_test.go +++ b/object/lock_test.go @@ -3,8 +3,8 @@ package object_test import ( "testing" - "github.com/nspcc-dev/neofs-sdk-go/object" - objecttest "github.com/nspcc-dev/neofs-sdk-go/object/test" + "github.com/TrueCloudLab/frostfs-sdk-go/object" + objecttest "github.com/TrueCloudLab/frostfs-sdk-go/object/test" "github.com/stretchr/testify/require" ) diff --git a/object/object.go b/object/object.go index b57afdc..2e08844 100644 --- a/object/object.go +++ b/object/object.go @@ -4,16 +4,16 @@ import ( "errors" "fmt" - "github.com/nspcc-dev/neofs-api-go/v2/object" - "github.com/nspcc-dev/neofs-api-go/v2/refs" - v2session "github.com/nspcc-dev/neofs-api-go/v2/session" - "github.com/nspcc-dev/neofs-sdk-go/checksum" - cid "github.com/nspcc-dev/neofs-sdk-go/container/id" - neofscrypto "github.com/nspcc-dev/neofs-sdk-go/crypto" - oid "github.com/nspcc-dev/neofs-sdk-go/object/id" - "github.com/nspcc-dev/neofs-sdk-go/session" - "github.com/nspcc-dev/neofs-sdk-go/user" - "github.com/nspcc-dev/neofs-sdk-go/version" + "github.com/TrueCloudLab/frostfs-api-go/v2/object" + "github.com/TrueCloudLab/frostfs-api-go/v2/refs" + v2session "github.com/TrueCloudLab/frostfs-api-go/v2/session" + "github.com/TrueCloudLab/frostfs-sdk-go/checksum" + cid "github.com/TrueCloudLab/frostfs-sdk-go/container/id" + frostfscrypto "github.com/TrueCloudLab/frostfs-sdk-go/crypto" + oid "github.com/TrueCloudLab/frostfs-sdk-go/object/id" + "github.com/TrueCloudLab/frostfs-sdk-go/session" + "github.com/TrueCloudLab/frostfs-sdk-go/user" + "github.com/TrueCloudLab/frostfs-sdk-go/version" ) // Object represents in-memory structure of the NeoFS object. @@ -110,20 +110,20 @@ func (o *Object) SetID(v oid.ID) { } // Signature returns signature of the object identifier. -func (o *Object) Signature() *neofscrypto.Signature { +func (o *Object) Signature() *frostfscrypto.Signature { sigv2 := (*object.Object)(o).GetSignature() if sigv2 == nil { return nil } - var sig neofscrypto.Signature + var sig frostfscrypto.Signature sig.ReadFromV2(*sigv2) // FIXME(@cthulhu-rider): #226 handle error return &sig } // SetSignature sets signature of the object identifier. -func (o *Object) SetSignature(v *neofscrypto.Signature) { +func (o *Object) SetSignature(v *frostfscrypto.Signature) { var sigv2 *refs.Signature if v != nil { diff --git a/object/object_test.go b/object/object_test.go index 6e7cfc9..a3f2c77 100644 --- a/object/object_test.go +++ b/object/object_test.go @@ -3,9 +3,9 @@ package object_test import ( "testing" - cidtest "github.com/nspcc-dev/neofs-sdk-go/container/id/test" - "github.com/nspcc-dev/neofs-sdk-go/object" - usertest "github.com/nspcc-dev/neofs-sdk-go/user/test" + cidtest "github.com/TrueCloudLab/frostfs-sdk-go/container/id/test" + "github.com/TrueCloudLab/frostfs-sdk-go/object" + usertest "github.com/TrueCloudLab/frostfs-sdk-go/user/test" "github.com/stretchr/testify/require" ) diff --git a/object/range.go b/object/range.go index ea2238b..e46ccfa 100644 --- a/object/range.go +++ b/object/range.go @@ -1,7 +1,7 @@ package object import ( - "github.com/nspcc-dev/neofs-api-go/v2/object" + "github.com/TrueCloudLab/frostfs-api-go/v2/object" ) // Range represents v2-compatible object payload range. diff --git a/object/range_test.go b/object/range_test.go index e14d360..1541f80 100644 --- a/object/range_test.go +++ b/object/range_test.go @@ -3,7 +3,7 @@ package object import ( "testing" - "github.com/nspcc-dev/neofs-api-go/v2/object" + "github.com/TrueCloudLab/frostfs-api-go/v2/object" "github.com/stretchr/testify/require" ) diff --git a/object/raw.go b/object/raw.go index fd776bd..dd49526 100644 --- a/object/raw.go +++ b/object/raw.go @@ -1,7 +1,7 @@ package object import ( - "github.com/nspcc-dev/neofs-api-go/v2/object" + "github.com/TrueCloudLab/frostfs-api-go/v2/object" ) // RawObject represents v2-compatible NeoFS object that provides diff --git a/object/raw_test.go b/object/raw_test.go index 5f38822..818a39c 100644 --- a/object/raw_test.go +++ b/object/raw_test.go @@ -5,13 +5,13 @@ import ( "crypto/sha256" "testing" - "github.com/nspcc-dev/neofs-api-go/v2/object" - "github.com/nspcc-dev/neofs-sdk-go/checksum" - cidtest "github.com/nspcc-dev/neofs-sdk-go/container/id/test" - oid "github.com/nspcc-dev/neofs-sdk-go/object/id" - sessiontest "github.com/nspcc-dev/neofs-sdk-go/session/test" - usertest "github.com/nspcc-dev/neofs-sdk-go/user/test" - "github.com/nspcc-dev/neofs-sdk-go/version" + "github.com/TrueCloudLab/frostfs-api-go/v2/object" + "github.com/TrueCloudLab/frostfs-sdk-go/checksum" + cidtest "github.com/TrueCloudLab/frostfs-sdk-go/container/id/test" + oid "github.com/TrueCloudLab/frostfs-sdk-go/object/id" + sessiontest "github.com/TrueCloudLab/frostfs-sdk-go/session/test" + usertest "github.com/TrueCloudLab/frostfs-sdk-go/user/test" + "github.com/TrueCloudLab/frostfs-sdk-go/version" "github.com/stretchr/testify/require" ) diff --git a/object/relations/relations.go b/object/relations/relations.go index 9be4527..c1de85c 100644 --- a/object/relations/relations.go +++ b/object/relations/relations.go @@ -5,11 +5,11 @@ import ( "errors" "fmt" - "github.com/nspcc-dev/neofs-sdk-go/bearer" - 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" - "github.com/nspcc-dev/neofs-sdk-go/session" + "github.com/TrueCloudLab/frostfs-sdk-go/bearer" + 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" + "github.com/TrueCloudLab/frostfs-sdk-go/session" ) // Tokens contains different tokens to perform requests in Relations implementations. diff --git a/object/search.go b/object/search.go index 2174a29..96262e9 100644 --- a/object/search.go +++ b/object/search.go @@ -4,11 +4,11 @@ import ( "encoding/json" "strconv" - v2object "github.com/nspcc-dev/neofs-api-go/v2/object" - cid "github.com/nspcc-dev/neofs-sdk-go/container/id" - oid "github.com/nspcc-dev/neofs-sdk-go/object/id" - "github.com/nspcc-dev/neofs-sdk-go/user" - "github.com/nspcc-dev/neofs-sdk-go/version" + v2object "github.com/TrueCloudLab/frostfs-api-go/v2/object" + cid "github.com/TrueCloudLab/frostfs-sdk-go/container/id" + oid "github.com/TrueCloudLab/frostfs-sdk-go/object/id" + "github.com/TrueCloudLab/frostfs-sdk-go/user" + "github.com/TrueCloudLab/frostfs-sdk-go/version" ) // SearchMatchType indicates match operation on specified header. diff --git a/object/search_test.go b/object/search_test.go index 26faaf6..794805b 100644 --- a/object/search_test.go +++ b/object/search_test.go @@ -5,9 +5,9 @@ import ( "math/rand" "testing" - v2object "github.com/nspcc-dev/neofs-api-go/v2/object" - "github.com/nspcc-dev/neofs-sdk-go/object" - oid "github.com/nspcc-dev/neofs-sdk-go/object/id" + v2object "github.com/TrueCloudLab/frostfs-api-go/v2/object" + "github.com/TrueCloudLab/frostfs-sdk-go/object" + oid "github.com/TrueCloudLab/frostfs-sdk-go/object/id" "github.com/stretchr/testify/require" ) diff --git a/object/splitid.go b/object/splitid.go index 45b4a47..6b75daf 100644 --- a/object/splitid.go +++ b/object/splitid.go @@ -66,7 +66,7 @@ func (id *SplitID) SetUUID(v uuid.UUID) { } } -// ToV2 converts SplitID to a representation of SplitID in neofs-api v2. +// ToV2 converts SplitID to a representation of SplitID in frostfs-api v2. // // Nil SplitID converts to nil. func (id *SplitID) ToV2() []byte { diff --git a/object/splitid_test.go b/object/splitid_test.go index 6a15ac3..5741969 100644 --- a/object/splitid_test.go +++ b/object/splitid_test.go @@ -3,8 +3,8 @@ package object_test import ( "testing" + "github.com/TrueCloudLab/frostfs-sdk-go/object" "github.com/google/uuid" - "github.com/nspcc-dev/neofs-sdk-go/object" "github.com/stretchr/testify/require" ) diff --git a/object/splitinfo.go b/object/splitinfo.go index e15cee5..bb6eac6 100644 --- a/object/splitinfo.go +++ b/object/splitinfo.go @@ -4,9 +4,9 @@ import ( "errors" "fmt" - "github.com/nspcc-dev/neofs-api-go/v2/object" - "github.com/nspcc-dev/neofs-api-go/v2/refs" - oid "github.com/nspcc-dev/neofs-sdk-go/object/id" + "github.com/TrueCloudLab/frostfs-api-go/v2/object" + "github.com/TrueCloudLab/frostfs-api-go/v2/refs" + oid "github.com/TrueCloudLab/frostfs-sdk-go/object/id" ) type SplitInfo object.SplitInfo diff --git a/object/splitinfo_test.go b/object/splitinfo_test.go index 7c13f2c..765db37 100644 --- a/object/splitinfo_test.go +++ b/object/splitinfo_test.go @@ -5,9 +5,9 @@ import ( "encoding/json" "testing" - objv2 "github.com/nspcc-dev/neofs-api-go/v2/object" - "github.com/nspcc-dev/neofs-sdk-go/object" - oid "github.com/nspcc-dev/neofs-sdk-go/object/id" + objv2 "github.com/TrueCloudLab/frostfs-api-go/v2/object" + "github.com/TrueCloudLab/frostfs-sdk-go/object" + oid "github.com/TrueCloudLab/frostfs-sdk-go/object/id" "github.com/stretchr/testify/require" ) diff --git a/object/test/generate.go b/object/test/generate.go index f582b24..e6f83ab 100644 --- a/object/test/generate.go +++ b/object/test/generate.go @@ -1,15 +1,15 @@ package objecttest import ( + checksumtest "github.com/TrueCloudLab/frostfs-sdk-go/checksum/test" + cidtest "github.com/TrueCloudLab/frostfs-sdk-go/container/id/test" + "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" + sessiontest "github.com/TrueCloudLab/frostfs-sdk-go/session/test" + usertest "github.com/TrueCloudLab/frostfs-sdk-go/user/test" + "github.com/TrueCloudLab/frostfs-sdk-go/version" "github.com/google/uuid" - checksumtest "github.com/nspcc-dev/neofs-sdk-go/checksum/test" - cidtest "github.com/nspcc-dev/neofs-sdk-go/container/id/test" - "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" - sessiontest "github.com/nspcc-dev/neofs-sdk-go/session/test" - usertest "github.com/nspcc-dev/neofs-sdk-go/user/test" - "github.com/nspcc-dev/neofs-sdk-go/version" ) // Range returns random object.Range. diff --git a/object/tombstone.go b/object/tombstone.go index 0614910..502d214 100644 --- a/object/tombstone.go +++ b/object/tombstone.go @@ -1,9 +1,9 @@ package object import ( - "github.com/nspcc-dev/neofs-api-go/v2/refs" - "github.com/nspcc-dev/neofs-api-go/v2/tombstone" - oid "github.com/nspcc-dev/neofs-sdk-go/object/id" + "github.com/TrueCloudLab/frostfs-api-go/v2/refs" + "github.com/TrueCloudLab/frostfs-api-go/v2/tombstone" + oid "github.com/TrueCloudLab/frostfs-sdk-go/object/id" ) // Tombstone represents v2-compatible tombstone structure. diff --git a/object/tombstone_test.go b/object/tombstone_test.go index 62d5050..e423a6b 100644 --- a/object/tombstone_test.go +++ b/object/tombstone_test.go @@ -5,8 +5,8 @@ import ( "math/rand" "testing" - "github.com/nspcc-dev/neofs-api-go/v2/tombstone" - oid "github.com/nspcc-dev/neofs-sdk-go/object/id" + "github.com/TrueCloudLab/frostfs-api-go/v2/tombstone" + oid "github.com/TrueCloudLab/frostfs-sdk-go/object/id" "github.com/stretchr/testify/require" ) diff --git a/object/type.go b/object/type.go index f87d108..5f32afa 100644 --- a/object/type.go +++ b/object/type.go @@ -1,7 +1,7 @@ package object import ( - "github.com/nspcc-dev/neofs-api-go/v2/object" + "github.com/TrueCloudLab/frostfs-api-go/v2/object" ) type Type object.Type diff --git a/object/type_test.go b/object/type_test.go index d95a41e..4c4ed25 100644 --- a/object/type_test.go +++ b/object/type_test.go @@ -3,8 +3,8 @@ package object_test import ( "testing" - v2object "github.com/nspcc-dev/neofs-api-go/v2/object" - "github.com/nspcc-dev/neofs-sdk-go/object" + v2object "github.com/TrueCloudLab/frostfs-api-go/v2/object" + "github.com/TrueCloudLab/frostfs-sdk-go/object" "github.com/stretchr/testify/require" ) diff --git a/pool/cache.go b/pool/cache.go index c90fa47..b051e5f 100644 --- a/pool/cache.go +++ b/pool/cache.go @@ -4,8 +4,8 @@ import ( "strings" "sync/atomic" + "github.com/TrueCloudLab/frostfs-sdk-go/session" lru "github.com/hashicorp/golang-lru" - "github.com/nspcc-dev/neofs-sdk-go/session" ) type sessionCache struct { diff --git a/pool/cache_test.go b/pool/cache_test.go index 1d425c6..cf2649c 100644 --- a/pool/cache_test.go +++ b/pool/cache_test.go @@ -3,9 +3,9 @@ package pool import ( "testing" + "github.com/TrueCloudLab/frostfs-sdk-go/session" + sessiontest "github.com/TrueCloudLab/frostfs-sdk-go/session/test" "github.com/nspcc-dev/neo-go/pkg/crypto/keys" - "github.com/nspcc-dev/neofs-sdk-go/session" - sessiontest "github.com/nspcc-dev/neofs-sdk-go/session/test" "github.com/stretchr/testify/require" ) diff --git a/pool/mock_test.go b/pool/mock_test.go index 69cf050..da55a97 100644 --- a/pool/mock_test.go +++ b/pool/mock_test.go @@ -5,18 +5,18 @@ import ( "crypto/ecdsa" "errors" + sessionv2 "github.com/TrueCloudLab/frostfs-api-go/v2/session" + "github.com/TrueCloudLab/frostfs-sdk-go/accounting" + apistatus "github.com/TrueCloudLab/frostfs-sdk-go/client/status" + "github.com/TrueCloudLab/frostfs-sdk-go/container" + cid "github.com/TrueCloudLab/frostfs-sdk-go/container/id" + frostfsecdsa "github.com/TrueCloudLab/frostfs-sdk-go/crypto/ecdsa" + "github.com/TrueCloudLab/frostfs-sdk-go/eacl" + "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/frostfs-sdk-go/session" "github.com/google/uuid" - sessionv2 "github.com/nspcc-dev/neofs-api-go/v2/session" - "github.com/nspcc-dev/neofs-sdk-go/accounting" - apistatus "github.com/nspcc-dev/neofs-sdk-go/client/status" - "github.com/nspcc-dev/neofs-sdk-go/container" - cid "github.com/nspcc-dev/neofs-sdk-go/container/id" - neofsecdsa "github.com/nspcc-dev/neofs-sdk-go/crypto/ecdsa" - "github.com/nspcc-dev/neofs-sdk-go/eacl" - "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/neofs-sdk-go/session" ) type mockClient struct { @@ -67,7 +67,7 @@ func (m *mockClient) statusOnGetObject(st apistatus.Status) { func newToken(key ecdsa.PrivateKey) *session.Object { var tok session.Object tok.SetID(uuid.New()) - pk := neofsecdsa.PublicKey(key.PublicKey) + pk := frostfsecdsa.PublicKey(key.PublicKey) tok.SetAuthKey(&pk) return &tok diff --git a/pool/pool.go b/pool/pool.go index 13d09eb..50801a5 100644 --- a/pool/pool.go +++ b/pool/pool.go @@ -13,22 +13,22 @@ import ( "sync" "time" + "github.com/TrueCloudLab/frostfs-sdk-go/accounting" + "github.com/TrueCloudLab/frostfs-sdk-go/bearer" + sdkClient "github.com/TrueCloudLab/frostfs-sdk-go/client" + apistatus "github.com/TrueCloudLab/frostfs-sdk-go/client/status" + "github.com/TrueCloudLab/frostfs-sdk-go/container" + cid "github.com/TrueCloudLab/frostfs-sdk-go/container/id" + frostfsecdsa "github.com/TrueCloudLab/frostfs-sdk-go/crypto/ecdsa" + "github.com/TrueCloudLab/frostfs-sdk-go/eacl" + "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/frostfs-sdk-go/object/relations" + "github.com/TrueCloudLab/frostfs-sdk-go/session" + "github.com/TrueCloudLab/frostfs-sdk-go/user" "github.com/google/uuid" "github.com/nspcc-dev/neo-go/pkg/crypto/keys" - "github.com/nspcc-dev/neofs-sdk-go/accounting" - "github.com/nspcc-dev/neofs-sdk-go/bearer" - sdkClient "github.com/nspcc-dev/neofs-sdk-go/client" - apistatus "github.com/nspcc-dev/neofs-sdk-go/client/status" - "github.com/nspcc-dev/neofs-sdk-go/container" - cid "github.com/nspcc-dev/neofs-sdk-go/container/id" - neofsecdsa "github.com/nspcc-dev/neofs-sdk-go/crypto/ecdsa" - "github.com/nspcc-dev/neofs-sdk-go/eacl" - "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/neofs-sdk-go/object/relations" - "github.com/nspcc-dev/neofs-sdk-go/session" - "github.com/nspcc-dev/neofs-sdk-go/user" "go.uber.org/atomic" "go.uber.org/zap" ) @@ -1315,7 +1315,7 @@ type PrmContainerPut struct { // SetContainer container structure to be used as a parameter of the base // client's operation. // -// See github.com/nspcc-dev/neofs-sdk-go/client.PrmContainerPut.SetContainer. +// See github.com/TrueCloudLab/frostfs-sdk-go/client.PrmContainerPut.SetContainer. func (x *PrmContainerPut) SetContainer(cnr container.Container) { x.prmClient.SetContainer(cnr) } @@ -1323,7 +1323,7 @@ func (x *PrmContainerPut) SetContainer(cnr container.Container) { // WithinSession specifies session to be used as a parameter of the base // client's operation. // -// See github.com/nspcc-dev/neofs-sdk-go/client.PrmContainerPut.WithinSession. +// See github.com/TrueCloudLab/frostfs-sdk-go/client.PrmContainerPut.WithinSession. func (x *PrmContainerPut) WithinSession(s session.Container) { x.prmClient.WithinSession(s) } @@ -1412,7 +1412,7 @@ type PrmContainerSetEACL struct { // SetTable sets structure of container's extended ACL to be used as a // parameter of the base client's operation. // -// See github.com/nspcc-dev/neofs-sdk-go/client.PrmContainerSetEACL.SetTable. +// See github.com/TrueCloudLab/frostfs-sdk-go/client.PrmContainerSetEACL.SetTable. func (x *PrmContainerSetEACL) SetTable(table eacl.Table) { x.table = table } @@ -1420,7 +1420,7 @@ func (x *PrmContainerSetEACL) SetTable(table eacl.Table) { // WithinSession specifies session to be used as a parameter of the base // client's operation. // -// See github.com/nspcc-dev/neofs-sdk-go/client.PrmContainerSetEACL.WithinSession. +// See github.com/TrueCloudLab/frostfs-sdk-go/client.PrmContainerSetEACL.WithinSession. func (x *PrmContainerSetEACL) WithinSession(s session.Container) { x.session = s x.sessionSet = true @@ -1587,7 +1587,7 @@ func (p *Pool) Dial(ctx context.Context) error { if err != nil { clients[j].setUnhealthy() if p.logger != nil { - p.logger.Warn("failed to create neofs session token for client", + p.logger.Warn("failed to create frostfs session token for client", zap.String("address", addr), zap.Error(err)) } continue @@ -1860,7 +1860,7 @@ func initSessionForDuration(ctx context.Context, dst *session.Object, c client, return fmt.Errorf("invalid session token ID: %w", err) } - var key neofsecdsa.PublicKey + var key frostfsecdsa.PublicKey err = key.Decode(res.sessionKey) if err != nil { diff --git a/pool/pool_test.go b/pool/pool_test.go index aedd614..0ec94e8 100644 --- a/pool/pool_test.go +++ b/pool/pool_test.go @@ -8,14 +8,14 @@ import ( "testing" "time" + apistatus "github.com/TrueCloudLab/frostfs-sdk-go/client/status" + cid "github.com/TrueCloudLab/frostfs-sdk-go/container/id" + frostfsecdsa "github.com/TrueCloudLab/frostfs-sdk-go/crypto/ecdsa" + "github.com/TrueCloudLab/frostfs-sdk-go/object" + oid "github.com/TrueCloudLab/frostfs-sdk-go/object/id" + "github.com/TrueCloudLab/frostfs-sdk-go/session" + "github.com/TrueCloudLab/frostfs-sdk-go/user" "github.com/nspcc-dev/neo-go/pkg/crypto/keys" - apistatus "github.com/nspcc-dev/neofs-sdk-go/client/status" - cid "github.com/nspcc-dev/neofs-sdk-go/container/id" - neofsecdsa "github.com/nspcc-dev/neofs-sdk-go/crypto/ecdsa" - "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/session" - "github.com/nspcc-dev/neofs-sdk-go/user" "github.com/stretchr/testify/require" "go.uber.org/zap" ) @@ -100,7 +100,7 @@ func TestBuildPoolOneNodeFailed(t *testing.T) { require.NoError(t, err) t.Cleanup(clientPool.Close) - expectedAuthKey := neofsecdsa.PublicKey(clientKeys[1].PublicKey) + expectedAuthKey := frostfsecdsa.PublicKey(clientKeys[1].PublicKey) condition := func() bool { cp, err := clientPool.connection() if err != nil { @@ -142,7 +142,7 @@ func TestOneNode(t *testing.T) { cp, err := pool.connection() require.NoError(t, err) st, _ := pool.cache.Get(formCacheKey(cp.address(), pool.key)) - expectedAuthKey := neofsecdsa.PublicKey(key1.PublicKey) + expectedAuthKey := frostfsecdsa.PublicKey(key1.PublicKey) require.True(t, st.AssertAuthKey(&expectedAuthKey)) } @@ -177,7 +177,7 @@ func TestTwoNodes(t *testing.T) { func assertAuthKeyForAny(st session.Object, clientKeys []*ecdsa.PrivateKey) bool { for _, key := range clientKeys { - expectedAuthKey := neofsecdsa.PublicKey(key.PublicKey) + expectedAuthKey := frostfsecdsa.PublicKey(key.PublicKey) if st.AssertAuthKey(&expectedAuthKey) { return true } @@ -267,7 +267,7 @@ func TestTwoFailed(t *testing.T) { func TestSessionCache(t *testing.T) { key := newPrivateKey(t) - expectedAuthKey := neofsecdsa.PublicKey(key.PublicKey) + expectedAuthKey := frostfsecdsa.PublicKey(key.PublicKey) mockClientBuilder := func(addr string) client { mockCli := newMockClient(addr, *key) @@ -361,7 +361,7 @@ func TestPriority(t *testing.T) { require.NoError(t, err) t.Cleanup(pool.Close) - expectedAuthKey1 := neofsecdsa.PublicKey(clientKeys[0].PublicKey) + expectedAuthKey1 := frostfsecdsa.PublicKey(clientKeys[0].PublicKey) firstNode := func() bool { cp, err := pool.connection() require.NoError(t, err) @@ -369,7 +369,7 @@ func TestPriority(t *testing.T) { return st.AssertAuthKey(&expectedAuthKey1) } - expectedAuthKey2 := neofsecdsa.PublicKey(clientKeys[1].PublicKey) + expectedAuthKey2 := frostfsecdsa.PublicKey(clientKeys[1].PublicKey) secondNode := func() bool { cp, err := pool.connection() require.NoError(t, err) @@ -384,7 +384,7 @@ func TestPriority(t *testing.T) { func TestSessionCacheWithKey(t *testing.T) { key := newPrivateKey(t) - expectedAuthKey := neofsecdsa.PublicKey(key.PublicKey) + expectedAuthKey := frostfsecdsa.PublicKey(key.PublicKey) mockClientBuilder := func(addr string) client { return newMockClient(addr, *key) diff --git a/reputation/doc.go b/reputation/doc.go index 7e59ace..2dc31a6 100644 --- a/reputation/doc.go +++ b/reputation/doc.go @@ -9,11 +9,11 @@ is designed as a global measure of trust in a network member. See the docs for each type for details. Instances can be also used to process NeoFS API V2 protocol messages -(see neo.fs.v2.reputation package in https://github.com/nspcc-dev/neofs-api). +(see neo.fs.v2.reputation package in https://github.com/TrueCloudLab/frostfs-api). On client side: - import "github.com/nspcc-dev/neofs-api-go/v2/reputation" + import "github.com/TrueCloudLab/frostfs-api-go/v2/reputation" var msg reputation.GlobalTrust trust.WriteToV2(&msg) diff --git a/reputation/peer.go b/reputation/peer.go index 8d704fe..204a539 100644 --- a/reputation/peer.go +++ b/reputation/peer.go @@ -5,14 +5,14 @@ import ( "errors" "fmt" + "github.com/TrueCloudLab/frostfs-api-go/v2/reputation" "github.com/mr-tron/base58" - "github.com/nspcc-dev/neofs-api-go/v2/reputation" ) // PeerID represents unique identifier of the peer participating in the NeoFS // reputation system. // -// ID is mutually compatible with github.com/nspcc-dev/neofs-api-go/v2/reputation.PeerID +// ID is mutually compatible with github.com/TrueCloudLab/frostfs-api-go/v2/reputation.PeerID // message. See ReadFromV2 / WriteToV2 methods. // // Instances can be created using built-in var declaration. diff --git a/reputation/peer_test.go b/reputation/peer_test.go index bfee237..9cdca17 100644 --- a/reputation/peer_test.go +++ b/reputation/peer_test.go @@ -3,9 +3,9 @@ package reputation_test import ( "testing" - v2reputation "github.com/nspcc-dev/neofs-api-go/v2/reputation" - "github.com/nspcc-dev/neofs-sdk-go/reputation" - reputationtest "github.com/nspcc-dev/neofs-sdk-go/reputation/test" + v2reputation "github.com/TrueCloudLab/frostfs-api-go/v2/reputation" + "github.com/TrueCloudLab/frostfs-sdk-go/reputation" + reputationtest "github.com/TrueCloudLab/frostfs-sdk-go/reputation/test" "github.com/stretchr/testify/require" ) diff --git a/reputation/test/generate.go b/reputation/test/generate.go index cdde407..1d8fb5f 100644 --- a/reputation/test/generate.go +++ b/reputation/test/generate.go @@ -3,9 +3,9 @@ package reputationtest import ( "fmt" + frostfsecdsa "github.com/TrueCloudLab/frostfs-sdk-go/crypto/ecdsa" + "github.com/TrueCloudLab/frostfs-sdk-go/reputation" "github.com/nspcc-dev/neo-go/pkg/crypto/keys" - neofsecdsa "github.com/nspcc-dev/neofs-sdk-go/crypto/ecdsa" - "github.com/nspcc-dev/neofs-sdk-go/reputation" ) func PeerID() (v reputation.PeerID) { @@ -49,7 +49,7 @@ func SignedGlobalTrust() reputation.GlobalTrust { panic(fmt.Sprintf("unexpected error from key creator: %v", err)) } - err = gt.Sign(neofsecdsa.Signer(p.PrivateKey)) + err = gt.Sign(frostfsecdsa.Signer(p.PrivateKey)) if err != nil { panic(fmt.Sprintf("unexpected error from GlobalTrust.Sign: %v", err)) } diff --git a/reputation/trust.go b/reputation/trust.go index 09c045e..9d5cd76 100644 --- a/reputation/trust.go +++ b/reputation/trust.go @@ -4,16 +4,16 @@ import ( "errors" "fmt" - "github.com/nspcc-dev/neofs-api-go/v2/refs" - "github.com/nspcc-dev/neofs-api-go/v2/reputation" - neofscrypto "github.com/nspcc-dev/neofs-sdk-go/crypto" - "github.com/nspcc-dev/neofs-sdk-go/version" + "github.com/TrueCloudLab/frostfs-api-go/v2/refs" + "github.com/TrueCloudLab/frostfs-api-go/v2/reputation" + frostfscrypto "github.com/TrueCloudLab/frostfs-sdk-go/crypto" + "github.com/TrueCloudLab/frostfs-sdk-go/version" ) // Trust represents quantitative assessment of the trust of a participant in the // NeoFS reputation system. // -// Trust is mutually compatible with github.com/nspcc-dev/neofs-api-go/v2/reputation.Trust +// Trust is mutually compatible with github.com/TrueCloudLab/frostfs-api-go/v2/reputation.Trust // message. See ReadFromV2 / WriteToV2 methods. // // Instances can be created using built-in var declaration. @@ -103,7 +103,7 @@ func (x Trust) Value() float64 { // PeerToPeerTrust represents trust of one participant of the NeoFS reputation // system to another one. // -// Trust is mutually compatible with github.com/nspcc-dev/neofs-api-go/v2/reputation.PeerToPeerTrust +// Trust is mutually compatible with github.com/TrueCloudLab/frostfs-api-go/v2/reputation.PeerToPeerTrust // message. See ReadFromV2 / WriteToV2 methods. // // Instances can be created using built-in var declaration. @@ -211,7 +211,7 @@ func (x PeerToPeerTrust) Trust() (res Trust) { // GlobalTrust represents the final assessment of trust in the participant of // the NeoFS reputation system obtained taking into account all other participants. // -// GlobalTrust is mutually compatible with github.com/nspcc-dev/neofs-api-go/v2/reputation.GlobalTrust +// GlobalTrust is mutually compatible with github.com/TrueCloudLab/frostfs-api-go/v2/reputation.GlobalTrust // message. See ReadFromV2 / WriteToV2 methods. // // To submit GlobalTrust value in NeoFS zero instance SHOULD be declared, @@ -366,8 +366,8 @@ func (x GlobalTrust) Trust() (res Trust) { // expected to be calculated as a final stage of GlobalTrust formation. // // See also VerifySignature. -func (x *GlobalTrust) Sign(signer neofscrypto.Signer) error { - var sig neofscrypto.Signature +func (x *GlobalTrust) Sign(signer frostfscrypto.Signer) error { + var sig frostfscrypto.Signature err := sig.Calculate(signer, x.m.GetBody().StableMarshal(nil)) if err != nil { @@ -393,7 +393,7 @@ func (x GlobalTrust) VerifySignature() bool { return false } - var sig neofscrypto.Signature + var sig frostfscrypto.Signature return sig.ReadFromV2(*sigV2) == nil && sig.Verify(x.m.GetBody().StableMarshal(nil)) } diff --git a/reputation/trust_test.go b/reputation/trust_test.go index b0b106c..e6041c3 100644 --- a/reputation/trust_test.go +++ b/reputation/trust_test.go @@ -3,13 +3,13 @@ package reputation_test import ( "testing" + "github.com/TrueCloudLab/frostfs-api-go/v2/refs" + v2reputation "github.com/TrueCloudLab/frostfs-api-go/v2/reputation" + frostfsecdsa "github.com/TrueCloudLab/frostfs-sdk-go/crypto/ecdsa" + "github.com/TrueCloudLab/frostfs-sdk-go/reputation" + reputationtest "github.com/TrueCloudLab/frostfs-sdk-go/reputation/test" + "github.com/TrueCloudLab/frostfs-sdk-go/version" "github.com/nspcc-dev/neo-go/pkg/crypto/keys" - "github.com/nspcc-dev/neofs-api-go/v2/refs" - v2reputation "github.com/nspcc-dev/neofs-api-go/v2/reputation" - neofsecdsa "github.com/nspcc-dev/neofs-sdk-go/crypto/ecdsa" - "github.com/nspcc-dev/neofs-sdk-go/reputation" - reputationtest "github.com/nspcc-dev/neofs-sdk-go/reputation/test" - "github.com/nspcc-dev/neofs-sdk-go/version" "github.com/stretchr/testify/require" ) @@ -181,7 +181,7 @@ func TestGlobalTrust_Sign(t *testing.T) { require.False(t, val.VerifySignature()) - require.NoError(t, val.Sign(neofsecdsa.Signer(k.PrivateKey))) + require.NoError(t, val.Sign(frostfsecdsa.Signer(k.PrivateKey))) var valV2 v2reputation.GlobalTrust val.WriteToV2(&valV2) diff --git a/session/common.go b/session/common.go index 7346cd0..186f205 100644 --- a/session/common.go +++ b/session/common.go @@ -6,12 +6,12 @@ import ( "errors" "fmt" + "github.com/TrueCloudLab/frostfs-api-go/v2/refs" + "github.com/TrueCloudLab/frostfs-api-go/v2/session" + frostfscrypto "github.com/TrueCloudLab/frostfs-sdk-go/crypto" + frostfsecdsa "github.com/TrueCloudLab/frostfs-sdk-go/crypto/ecdsa" + "github.com/TrueCloudLab/frostfs-sdk-go/user" "github.com/google/uuid" - "github.com/nspcc-dev/neofs-api-go/v2/refs" - "github.com/nspcc-dev/neofs-api-go/v2/session" - neofscrypto "github.com/nspcc-dev/neofs-sdk-go/crypto" - neofsecdsa "github.com/nspcc-dev/neofs-sdk-go/crypto/ecdsa" - "github.com/nspcc-dev/neofs-sdk-go/user" ) type commonData struct { @@ -159,9 +159,9 @@ func (x *commonData) sign(key ecdsa.PrivateKey, w contextWriter) error { user.IDFromKey(&x.issuer, key.PublicKey) x.issuerSet = true - var sig neofscrypto.Signature + var sig frostfscrypto.Signature - err := sig.Calculate(neofsecdsa.Signer(key), x.signedData(w)) + err := sig.Calculate(frostfsecdsa.Signer(key), x.signedData(w)) if err != nil { return err } @@ -177,7 +177,7 @@ func (x commonData) verifySignature(w contextWriter) bool { return false } - var sig neofscrypto.Signature + var sig frostfscrypto.Signature // TODO: (#233) check owner<->key relation return sig.ReadFromV2(x.sig) == nil && sig.Verify(x.signedData(w)) @@ -301,7 +301,7 @@ func (x commonData) ID() uuid.UUID { // SetAuthKey public key corresponding to the private key bound to the session. // // See also AssertAuthKey. -func (x *commonData) SetAuthKey(key neofscrypto.PublicKey) { +func (x *commonData) SetAuthKey(key frostfscrypto.PublicKey) { x.authKey = make([]byte, key.MaxEncodedSize()) x.authKey = x.authKey[:key.Encode(x.authKey)] } @@ -311,7 +311,7 @@ func (x *commonData) SetAuthKey(key neofscrypto.PublicKey) { // Zero session fails the check. // // See also SetAuthKey. -func (x commonData) AssertAuthKey(key neofscrypto.PublicKey) bool { +func (x commonData) AssertAuthKey(key frostfscrypto.PublicKey) bool { bKey := make([]byte, key.MaxEncodedSize()) bKey = bKey[:key.Encode(bKey)] diff --git a/session/container.go b/session/container.go index 29773a7..ec311d0 100644 --- a/session/container.go +++ b/session/container.go @@ -5,11 +5,11 @@ import ( "errors" "fmt" - "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" - neofscrypto "github.com/nspcc-dev/neofs-sdk-go/crypto" - "github.com/nspcc-dev/neofs-sdk-go/user" + "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" + frostfscrypto "github.com/TrueCloudLab/frostfs-sdk-go/crypto" + "github.com/TrueCloudLab/frostfs-sdk-go/user" ) // Container represents token of the NeoFS Container session. A session is opened @@ -18,7 +18,7 @@ import ( // limited validity period, and applies to a strictly defined set of operations. // See methods for details. // -// Container is mutually compatible with github.com/nspcc-dev/neofs-api-go/v2/session.Token +// Container is mutually compatible with github.com/TrueCloudLab/frostfs-api-go/v2/session.Token // message. See ReadFromV2 / WriteToV2 methods. // // Instances can be created using built-in var declaration. @@ -209,7 +209,7 @@ func (x Container) VerifySessionDataSignature(data, signature []byte) bool { sigV2.SetScheme(refs.ECDSA_RFC6979_SHA256) sigV2.SetSign(signature) - var sig neofscrypto.Signature + var sig frostfscrypto.Signature return sig.ReadFromV2(sigV2) == nil && sig.Verify(data) } diff --git a/session/container_test.go b/session/container_test.go index 95e15f0..11f745d 100644 --- a/session/container_test.go +++ b/session/container_test.go @@ -6,17 +6,17 @@ import ( "math/rand" "testing" + "github.com/TrueCloudLab/frostfs-api-go/v2/refs" + v2session "github.com/TrueCloudLab/frostfs-api-go/v2/session" + cidtest "github.com/TrueCloudLab/frostfs-sdk-go/container/id/test" + frostfscrypto "github.com/TrueCloudLab/frostfs-sdk-go/crypto" + frostfsecdsa "github.com/TrueCloudLab/frostfs-sdk-go/crypto/ecdsa" + "github.com/TrueCloudLab/frostfs-sdk-go/session" + sessiontest "github.com/TrueCloudLab/frostfs-sdk-go/session/test" + "github.com/TrueCloudLab/frostfs-sdk-go/user" + usertest "github.com/TrueCloudLab/frostfs-sdk-go/user/test" "github.com/google/uuid" "github.com/nspcc-dev/neo-go/pkg/util/slice" - "github.com/nspcc-dev/neofs-api-go/v2/refs" - v2session "github.com/nspcc-dev/neofs-api-go/v2/session" - cidtest "github.com/nspcc-dev/neofs-sdk-go/container/id/test" - neofscrypto "github.com/nspcc-dev/neofs-sdk-go/crypto" - neofsecdsa "github.com/nspcc-dev/neofs-sdk-go/crypto/ecdsa" - "github.com/nspcc-dev/neofs-sdk-go/session" - sessiontest "github.com/nspcc-dev/neofs-sdk-go/session/test" - "github.com/nspcc-dev/neofs-sdk-go/user" - usertest "github.com/nspcc-dev/neofs-sdk-go/user/test" "github.com/stretchr/testify/require" ) @@ -56,7 +56,7 @@ func TestContainerProtocolV2(t *testing.T) { // Session key signer := randSigner() - authKey := neofsecdsa.PublicKey(signer.PublicKey) + authKey := frostfsecdsa.PublicKey(signer.PublicKey) binAuthKey := make([]byte, authKey.MaxEncodedSize()) binAuthKey = binAuthKey[:authKey.Encode(binAuthKey)] restoreAuthKey := func() { @@ -553,15 +553,15 @@ func TestContainer_VerifyDataSignature(t *testing.T) { data := make([]byte, 100) rand.Read(data) - var sig neofscrypto.Signature - require.NoError(t, sig.Calculate(neofsecdsa.SignerRFC6979(signer), data)) + var sig frostfscrypto.Signature + require.NoError(t, sig.Calculate(frostfsecdsa.SignerRFC6979(signer), data)) var sigV2 refs.Signature sig.WriteToV2(&sigV2) require.False(t, tok.VerifySessionDataSignature(data, sigV2.GetSign())) - tok.SetAuthKey((*neofsecdsa.PublicKeyRFC6979)(&signer.PublicKey)) + tok.SetAuthKey((*frostfsecdsa.PublicKeyRFC6979)(&signer.PublicKey)) require.True(t, tok.VerifySessionDataSignature(data, sigV2.GetSign())) require.False(t, tok.VerifySessionDataSignature(append(data, 1), sigV2.GetSign())) require.False(t, tok.VerifySessionDataSignature(data, append(sigV2.GetSign(), 1))) diff --git a/session/doc.go b/session/doc.go index 29b8420..3e2c21e 100644 --- a/session/doc.go +++ b/session/doc.go @@ -24,11 +24,11 @@ signing the public part of the secret (public session key). The trusted member can perform operations on behalf of the trustee. Instances can be also used to process NeoFS API V2 protocol messages -(see neo.fs.v2.accounting package in https://github.com/nspcc-dev/neofs-api). +(see neo.fs.v2.accounting package in https://github.com/TrueCloudLab/frostfs-api). On client side: - import "github.com/nspcc-dev/neofs-api-go/v2/session" + import "github.com/TrueCloudLab/frostfs-api-go/v2/session" var msg session.Token tok.WriteToV2(&msg) diff --git a/session/object.go b/session/object.go index 8856951..bce62c5 100644 --- a/session/object.go +++ b/session/object.go @@ -5,10 +5,10 @@ import ( "errors" "fmt" - "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" - oid "github.com/nspcc-dev/neofs-sdk-go/object/id" + "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" + oid "github.com/TrueCloudLab/frostfs-sdk-go/object/id" ) // Object represents token of the NeoFS Object session. A session is opened @@ -17,7 +17,7 @@ import ( // limited validity period, and applies to a strictly defined set of operations. // See methods for details. // -// Object is mutually compatible with github.com/nspcc-dev/neofs-api-go/v2/session.Token +// Object is mutually compatible with github.com/TrueCloudLab/frostfs-api-go/v2/session.Token // message. See ReadFromV2 / WriteToV2 methods. // // Instances can be created using built-in var declaration. diff --git a/session/object_test.go b/session/object_test.go index 0b35f37..856aa3b 100644 --- a/session/object_test.go +++ b/session/object_test.go @@ -7,19 +7,19 @@ import ( "math/rand" "testing" + "github.com/TrueCloudLab/frostfs-api-go/v2/refs" + v2session "github.com/TrueCloudLab/frostfs-api-go/v2/session" + cidtest "github.com/TrueCloudLab/frostfs-sdk-go/container/id/test" + frostfscrypto "github.com/TrueCloudLab/frostfs-sdk-go/crypto" + frostfsecdsa "github.com/TrueCloudLab/frostfs-sdk-go/crypto/ecdsa" + oidtest "github.com/TrueCloudLab/frostfs-sdk-go/object/id/test" + "github.com/TrueCloudLab/frostfs-sdk-go/session" + sessiontest "github.com/TrueCloudLab/frostfs-sdk-go/session/test" + "github.com/TrueCloudLab/frostfs-sdk-go/user" + usertest "github.com/TrueCloudLab/frostfs-sdk-go/user/test" "github.com/google/uuid" "github.com/nspcc-dev/neo-go/pkg/crypto/keys" "github.com/nspcc-dev/neo-go/pkg/util/slice" - "github.com/nspcc-dev/neofs-api-go/v2/refs" - v2session "github.com/nspcc-dev/neofs-api-go/v2/session" - cidtest "github.com/nspcc-dev/neofs-sdk-go/container/id/test" - neofscrypto "github.com/nspcc-dev/neofs-sdk-go/crypto" - neofsecdsa "github.com/nspcc-dev/neofs-sdk-go/crypto/ecdsa" - oidtest "github.com/nspcc-dev/neofs-sdk-go/object/id/test" - "github.com/nspcc-dev/neofs-sdk-go/session" - sessiontest "github.com/nspcc-dev/neofs-sdk-go/session/test" - "github.com/nspcc-dev/neofs-sdk-go/user" - usertest "github.com/nspcc-dev/neofs-sdk-go/user/test" "github.com/stretchr/testify/require" ) @@ -32,9 +32,9 @@ func randSigner() ecdsa.PrivateKey { return k.PrivateKey } -func randPublicKey() neofscrypto.PublicKey { +func randPublicKey() frostfscrypto.PublicKey { k := randSigner().PublicKey - return (*neofsecdsa.PublicKey)(&k) + return (*frostfsecdsa.PublicKey)(&k) } func TestObjectProtocolV2(t *testing.T) { @@ -73,7 +73,7 @@ func TestObjectProtocolV2(t *testing.T) { // Session key signer := randSigner() - authKey := neofsecdsa.PublicKey(signer.PublicKey) + authKey := frostfsecdsa.PublicKey(signer.PublicKey) binAuthKey := make([]byte, authKey.MaxEncodedSize()) binAuthKey = binAuthKey[:authKey.Encode(binAuthKey)] restoreAuthKey := func() { diff --git a/session/test/doc.go b/session/test/doc.go index 4279ff3..d9264cb 100644 --- a/session/test/doc.go +++ b/session/test/doc.go @@ -5,7 +5,7 @@ Note that importing the package into source files is highly discouraged. Random instance generation functions can be useful when testing expects any value, e.g.: - import sessiontest "github.com/nspcc-dev/neofs-sdk-go/session/test" + import sessiontest "github.com/TrueCloudLab/frostfs-sdk-go/session/test" val := sessiontest.Container() // test the value diff --git a/session/test/session.go b/session/test/session.go index 95c5d80..2f9dbea 100644 --- a/session/test/session.go +++ b/session/test/session.go @@ -5,12 +5,12 @@ import ( "crypto/elliptic" "crypto/rand" + cidtest "github.com/TrueCloudLab/frostfs-sdk-go/container/id/test" + frostfsecdsa "github.com/TrueCloudLab/frostfs-sdk-go/crypto/ecdsa" + oidtest "github.com/TrueCloudLab/frostfs-sdk-go/object/id/test" + "github.com/TrueCloudLab/frostfs-sdk-go/session" "github.com/google/uuid" "github.com/nspcc-dev/neo-go/pkg/crypto/keys" - cidtest "github.com/nspcc-dev/neofs-sdk-go/container/id/test" - neofsecdsa "github.com/nspcc-dev/neofs-sdk-go/crypto/ecdsa" - oidtest "github.com/nspcc-dev/neofs-sdk-go/object/id/test" - "github.com/nspcc-dev/neofs-sdk-go/session" ) var p ecdsa.PrivateKey @@ -38,7 +38,7 @@ func Container() *session.Container { tok.ForVerb(session.VerbContainerPut) tok.ApplyOnlyTo(cidtest.ID()) tok.SetID(uuid.New()) - tok.SetAuthKey((*neofsecdsa.PublicKey)(&priv.PublicKey)) + tok.SetAuthKey((*frostfsecdsa.PublicKey)(&priv.PublicKey)) tok.SetExp(11) tok.SetNbf(22) tok.SetIat(33) @@ -75,7 +75,7 @@ func Object() *session.Object { tok.BindContainer(cidtest.ID()) tok.LimitByObjects(oidtest.ID(), oidtest.ID()) tok.SetID(uuid.New()) - tok.SetAuthKey((*neofsecdsa.PublicKey)(&priv.PublicKey)) + tok.SetAuthKey((*frostfsecdsa.PublicKey)(&priv.PublicKey)) tok.SetExp(11) tok.SetNbf(22) tok.SetIat(33) diff --git a/storagegroup/doc.go b/storagegroup/doc.go index cf478b8..c119d32 100644 --- a/storagegroup/doc.go +++ b/storagegroup/doc.go @@ -12,11 +12,11 @@ StorageGroup type groups verification values for Data Audit sessions: sg.ValidationDataSize() // total objects' payload size Instances can be also used to process NeoFS API V2 protocol messages -(see neo.fs.v2.storagegroup package in https://github.com/nspcc-dev/neofs-api). +(see neo.fs.v2.storagegroup package in https://github.com/TrueCloudLab/frostfs-api). On client side: - import "github.com/nspcc-dev/neofs-api-go/v2/storagegroup" + import "github.com/TrueCloudLab/frostfs-api-go/v2/storagegroup" var msg storagegroup.StorageGroup sg.WriteToV2(&msg) diff --git a/storagegroup/storagegroup.go b/storagegroup/storagegroup.go index 94bc2f7..a08de20 100644 --- a/storagegroup/storagegroup.go +++ b/storagegroup/storagegroup.go @@ -5,17 +5,17 @@ import ( "fmt" "strconv" - 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/storagegroup" - "github.com/nspcc-dev/neofs-sdk-go/checksum" - objectSDK "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-api-go/v2/refs" + "github.com/TrueCloudLab/frostfs-api-go/v2/storagegroup" + "github.com/TrueCloudLab/frostfs-sdk-go/checksum" + objectSDK "github.com/TrueCloudLab/frostfs-sdk-go/object" + oid "github.com/TrueCloudLab/frostfs-sdk-go/object/id" ) // StorageGroup represents storage group of the NeoFS objects. // -// StorageGroup is mutually compatible with github.com/nspcc-dev/neofs-api-go/v2/storagegroup.StorageGroup +// StorageGroup is mutually compatible with github.com/TrueCloudLab/frostfs-api-go/v2/storagegroup.StorageGroup // message. See ReadFromMessageV2 / WriteToMessageV2 methods. // // Instances can be created using built-in var declaration. diff --git a/storagegroup/storagegroup_test.go b/storagegroup/storagegroup_test.go index 8e65718..f9ff7c5 100644 --- a/storagegroup/storagegroup_test.go +++ b/storagegroup/storagegroup_test.go @@ -5,17 +5,17 @@ import ( "strconv" "testing" - objectV2 "github.com/nspcc-dev/neofs-api-go/v2/object" - "github.com/nspcc-dev/neofs-api-go/v2/refs" - storagegroupV2 "github.com/nspcc-dev/neofs-api-go/v2/storagegroup" - storagegroupV2test "github.com/nspcc-dev/neofs-api-go/v2/storagegroup/test" - "github.com/nspcc-dev/neofs-sdk-go/checksum" - checksumtest "github.com/nspcc-dev/neofs-sdk-go/checksum/test" - objectSDK "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/nspcc-dev/neofs-sdk-go/storagegroup" - storagegrouptest "github.com/nspcc-dev/neofs-sdk-go/storagegroup/test" + objectV2 "github.com/TrueCloudLab/frostfs-api-go/v2/object" + "github.com/TrueCloudLab/frostfs-api-go/v2/refs" + storagegroupV2 "github.com/TrueCloudLab/frostfs-api-go/v2/storagegroup" + storagegroupV2test "github.com/TrueCloudLab/frostfs-api-go/v2/storagegroup/test" + "github.com/TrueCloudLab/frostfs-sdk-go/checksum" + checksumtest "github.com/TrueCloudLab/frostfs-sdk-go/checksum/test" + objectSDK "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/TrueCloudLab/frostfs-sdk-go/storagegroup" + storagegrouptest "github.com/TrueCloudLab/frostfs-sdk-go/storagegroup/test" "github.com/stretchr/testify/require" ) diff --git a/storagegroup/test/doc.go b/storagegroup/test/doc.go index 9d3d015..7a479c7 100644 --- a/storagegroup/test/doc.go +++ b/storagegroup/test/doc.go @@ -5,7 +5,7 @@ Note that importing the package into source files is highly discouraged. Random instance generation functions can be useful when testing expects any value, e.g.: - import storagegrouptest "github.com/nspcc-dev/neofs-sdk-go/storagegroup/test" + import storagegrouptest "github.com/TrueCloudLab/frostfs-sdk-go/storagegroup/test" val := storagegrouptest.StorageGroup() // test the value diff --git a/storagegroup/test/generate.go b/storagegroup/test/generate.go index ef11955..c9d52de 100644 --- a/storagegroup/test/generate.go +++ b/storagegroup/test/generate.go @@ -1,10 +1,10 @@ package storagegrouptest import ( - checksumtest "github.com/nspcc-dev/neofs-sdk-go/checksum/test" - oid "github.com/nspcc-dev/neofs-sdk-go/object/id" - oidtest "github.com/nspcc-dev/neofs-sdk-go/object/id/test" - "github.com/nspcc-dev/neofs-sdk-go/storagegroup" + checksumtest "github.com/TrueCloudLab/frostfs-sdk-go/checksum/test" + oid "github.com/TrueCloudLab/frostfs-sdk-go/object/id" + oidtest "github.com/TrueCloudLab/frostfs-sdk-go/object/id/test" + "github.com/TrueCloudLab/frostfs-sdk-go/storagegroup" ) // StorageGroup returns random storagegroup.StorageGroup. diff --git a/subnet/id/id.go b/subnet/id/id.go index 8cfa4fa..49b8e6d 100644 --- a/subnet/id/id.go +++ b/subnet/id/id.go @@ -4,12 +4,12 @@ import ( "fmt" "strconv" - "github.com/nspcc-dev/neofs-api-go/v2/refs" + "github.com/TrueCloudLab/frostfs-api-go/v2/refs" ) // ID represents unique identifier of the subnet in the NeoFS network. // -// ID is mutually compatible with github.com/nspcc-dev/neofs-api-go/v2/refs.SubnetID +// ID is mutually compatible with github.com/TrueCloudLab/frostfs-api-go/v2/refs.SubnetID // message. See ReadFromV2 / WriteToV2 methods. // // Instances can be created using built-in var declaration. Zero value is diff --git a/subnet/id/id_test.go b/subnet/id/id_test.go index 3515bbf..9b38187 100644 --- a/subnet/id/id_test.go +++ b/subnet/id/id_test.go @@ -3,9 +3,9 @@ package subnetid_test import ( "testing" - "github.com/nspcc-dev/neofs-api-go/v2/refs" - subnetid "github.com/nspcc-dev/neofs-sdk-go/subnet/id" - subnetidtest "github.com/nspcc-dev/neofs-sdk-go/subnet/id/test" + "github.com/TrueCloudLab/frostfs-api-go/v2/refs" + subnetid "github.com/TrueCloudLab/frostfs-sdk-go/subnet/id" + subnetidtest "github.com/TrueCloudLab/frostfs-sdk-go/subnet/id/test" "github.com/stretchr/testify/require" ) diff --git a/subnet/id/test/doc.go b/subnet/id/test/doc.go index 72dd20c..1486d8f 100644 --- a/subnet/id/test/doc.go +++ b/subnet/id/test/doc.go @@ -5,7 +5,7 @@ Note that importing the package into source files is highly discouraged. Random instance generation functions can be useful when testing expects any value, e.g.: - import subnetidtest "github.com/nspcc-dev/neofs-sdk-go/suibnet/id/test" + import subnetidtest "github.com/TrueCloudLab/frostfs-sdk-go/suibnet/id/test" value := subnetidtest.ID() // test the value diff --git a/subnet/id/test/id.go b/subnet/id/test/id.go index 00245d3..e03d62f 100644 --- a/subnet/id/test/id.go +++ b/subnet/id/test/id.go @@ -3,7 +3,7 @@ package subnetidtest import ( "math/rand" - subnetid "github.com/nspcc-dev/neofs-sdk-go/subnet/id" + subnetid "github.com/TrueCloudLab/frostfs-sdk-go/subnet/id" ) // ID generates and returns random subnetid.ID. diff --git a/subnet/subnet.go b/subnet/subnet.go index f47d554..4c98fa4 100644 --- a/subnet/subnet.go +++ b/subnet/subnet.go @@ -3,10 +3,10 @@ package subnet import ( "fmt" - "github.com/nspcc-dev/neofs-api-go/v2/refs" - "github.com/nspcc-dev/neofs-api-go/v2/subnet" - subnetid "github.com/nspcc-dev/neofs-sdk-go/subnet/id" - "github.com/nspcc-dev/neofs-sdk-go/user" + "github.com/TrueCloudLab/frostfs-api-go/v2/refs" + "github.com/TrueCloudLab/frostfs-api-go/v2/subnet" + subnetid "github.com/TrueCloudLab/frostfs-sdk-go/subnet/id" + "github.com/TrueCloudLab/frostfs-sdk-go/user" ) // Info represents information about NeoFS subnet. diff --git a/subnet/subnet_test.go b/subnet/subnet_test.go index ce4466a..9a22a6f 100644 --- a/subnet/subnet_test.go +++ b/subnet/subnet_test.go @@ -3,11 +3,11 @@ package subnet_test import ( "testing" - . "github.com/nspcc-dev/neofs-sdk-go/subnet" - subnetid "github.com/nspcc-dev/neofs-sdk-go/subnet/id" - subnetidtest "github.com/nspcc-dev/neofs-sdk-go/subnet/id/test" - subnettest "github.com/nspcc-dev/neofs-sdk-go/subnet/test" - usertest "github.com/nspcc-dev/neofs-sdk-go/user/test" + . "github.com/TrueCloudLab/frostfs-sdk-go/subnet" + subnetid "github.com/TrueCloudLab/frostfs-sdk-go/subnet/id" + subnetidtest "github.com/TrueCloudLab/frostfs-sdk-go/subnet/id/test" + subnettest "github.com/TrueCloudLab/frostfs-sdk-go/subnet/test" + usertest "github.com/TrueCloudLab/frostfs-sdk-go/user/test" "github.com/stretchr/testify/require" ) diff --git a/subnet/test/doc.go b/subnet/test/doc.go index 4315696..dcaac63 100644 --- a/subnet/test/doc.go +++ b/subnet/test/doc.go @@ -5,7 +5,7 @@ Note that importing the package into source files is highly discouraged. Random instance generation functions can be useful when testing expects any value, e.g.: - import subnettest "github.com/nspcc-dev/neofs-sdk-go/suibnet/test" + import subnettest "github.com/TrueCloudLab/frostfs-sdk-go/suibnet/test" value := subnettest.Info() // test the value diff --git a/subnet/test/subnet.go b/subnet/test/subnet.go index 7884f5a..3acd9b5 100644 --- a/subnet/test/subnet.go +++ b/subnet/test/subnet.go @@ -1,9 +1,9 @@ package subnettest import ( - "github.com/nspcc-dev/neofs-sdk-go/subnet" - subnetidtest "github.com/nspcc-dev/neofs-sdk-go/subnet/id/test" - usertest "github.com/nspcc-dev/neofs-sdk-go/user/test" + "github.com/TrueCloudLab/frostfs-sdk-go/subnet" + subnetidtest "github.com/TrueCloudLab/frostfs-sdk-go/subnet/id/test" + usertest "github.com/TrueCloudLab/frostfs-sdk-go/user/test" ) // Info generates and returns random subnet.Info. diff --git a/user/doc.go b/user/doc.go index dab0121..bd52188 100644 --- a/user/doc.go +++ b/user/doc.go @@ -35,11 +35,11 @@ Encoding/decoding mechanisms are used to transfer identifiers: err = id.DecodeString(s) // on receiver Instances can be also used to process NeoFS API protocol messages -(see neo.fs.v2.refs package in https://github.com/nspcc-dev/neofs-api). +(see neo.fs.v2.refs package in https://github.com/TrueCloudLab/frostfs-api). On client side: - import "github.com/nspcc-dev/neofs-api-go/v2/refs" + import "github.com/TrueCloudLab/frostfs-api-go/v2/refs" var msg refs.OwnerID id.WriteToV2(&msg) diff --git a/user/id.go b/user/id.go index 08d851a..b6e35a1 100644 --- a/user/id.go +++ b/user/id.go @@ -5,16 +5,16 @@ import ( "errors" "fmt" + "github.com/TrueCloudLab/frostfs-api-go/v2/refs" "github.com/mr-tron/base58" "github.com/nspcc-dev/neo-go/pkg/crypto/hash" "github.com/nspcc-dev/neo-go/pkg/encoding/address" "github.com/nspcc-dev/neo-go/pkg/util" - "github.com/nspcc-dev/neofs-api-go/v2/refs" ) // ID identifies users of the NeoFS system. // -// ID is mutually compatible with github.com/nspcc-dev/neofs-api-go/v2/refs.OwnerID +// ID is mutually compatible with github.com/TrueCloudLab/frostfs-api-go/v2/refs.OwnerID // message. See ReadFromV2 / WriteToV2 methods. // // Instances can be created using built-in var declaration. Zero ID is not valid, diff --git a/user/id_test.go b/user/id_test.go index 2d47d1a..4fc90d9 100644 --- a/user/id_test.go +++ b/user/id_test.go @@ -4,12 +4,12 @@ import ( "math/rand" "testing" + "github.com/TrueCloudLab/frostfs-api-go/v2/refs" + . "github.com/TrueCloudLab/frostfs-sdk-go/user" + usertest "github.com/TrueCloudLab/frostfs-sdk-go/user/test" "github.com/mr-tron/base58" "github.com/nspcc-dev/neo-go/pkg/util" "github.com/nspcc-dev/neo-go/pkg/util/slice" - "github.com/nspcc-dev/neofs-api-go/v2/refs" - . "github.com/nspcc-dev/neofs-sdk-go/user" - usertest "github.com/nspcc-dev/neofs-sdk-go/user/test" "github.com/stretchr/testify/require" ) diff --git a/user/test/doc.go b/user/test/doc.go index 367264a..da99b48 100644 --- a/user/test/doc.go +++ b/user/test/doc.go @@ -5,7 +5,7 @@ Note that importing the package into source files is highly discouraged. Random instance generation functions can be useful when testing expects any value, e.g.: - import usertest "github.com/nspcc-dev/neofs-sdk-go/user/test" + import usertest "github.com/TrueCloudLab/frostfs-sdk-go/user/test" id := usertest.ID() // test the value diff --git a/user/test/id.go b/user/test/id.go index adf9d0c..4d90b28 100644 --- a/user/test/id.go +++ b/user/test/id.go @@ -1,8 +1,8 @@ package usertest import ( + "github.com/TrueCloudLab/frostfs-sdk-go/user" "github.com/nspcc-dev/neo-go/pkg/crypto/keys" - "github.com/nspcc-dev/neofs-sdk-go/user" ) // ID returns random user.ID. diff --git a/user/util_test.go b/user/util_test.go index 437d449..80db4c5 100644 --- a/user/util_test.go +++ b/user/util_test.go @@ -6,7 +6,7 @@ import ( "encoding/hex" "testing" - "github.com/nspcc-dev/neofs-sdk-go/user" + "github.com/TrueCloudLab/frostfs-sdk-go/user" "github.com/stretchr/testify/require" ) diff --git a/version/test/generate.go b/version/test/generate.go index b4ea64f..6fc8fa6 100644 --- a/version/test/generate.go +++ b/version/test/generate.go @@ -3,7 +3,7 @@ package versiontest import ( "math/rand" - "github.com/nspcc-dev/neofs-sdk-go/version" + "github.com/TrueCloudLab/frostfs-sdk-go/version" ) // Version returns random version.Version. diff --git a/version/version.go b/version/version.go index 0a05fcc..608225f 100644 --- a/version/version.go +++ b/version/version.go @@ -3,12 +3,12 @@ package version import ( "fmt" - "github.com/nspcc-dev/neofs-api-go/v2/refs" + "github.com/TrueCloudLab/frostfs-api-go/v2/refs" ) // Version represents revision number in SemVer scheme. // -// Version is mutually compatible with github.com/nspcc-dev/neofs-api-go/v2/refs.Version +// Version is mutually compatible with github.com/TrueCloudLab/frostfs-api-go/v2/refs.Version // message. See ReadFromV2 / WriteToV2 methods. // // Instances can be created using built-in var declaration. diff --git a/version/version_test.go b/version/version_test.go index 0d1aa0a..19f0747 100644 --- a/version/version_test.go +++ b/version/version_test.go @@ -3,7 +3,7 @@ package version import ( "testing" - "github.com/nspcc-dev/neofs-api-go/v2/refs" + "github.com/TrueCloudLab/frostfs-api-go/v2/refs" "github.com/stretchr/testify/require" )