diff --git a/README.md b/README.md index e6974e95..1a739eb1 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 da9281f0..459bb992 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 97a54689..9dc8fe66 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 f1a30373..a2353866 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 1c8f0f0d..7a7685c8 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 b2619eac..2ec41547 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 1ab836b2..e6d1f13c 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 0f8c4130..e00efaa4 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 e999409e..92cc082a 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 2e2b9565..a1a48488 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 27b266bb..d1575388 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 e820bb7d..02727d52 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 52436eb1..90ab1564 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 65148cc9..6c08ef69 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 5d69c709..01e191bf 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 f9d22c95..b7d0cf79 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 42239f21..c62f9e2c 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 ad428ec9..64652daa 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 72eeadbf..53051687 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 b77d8e22..ede7d84c 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 b16f7575..56bd3362 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 bea46f6d..fc3d9183 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 a9f10018..a78b769a 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 c47aafae..764e32cb 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 60676bd2..2e00fa94 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 35a3a075..22e28ad1 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 70fe57c8..846bc45a 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 49f11d11..a63ee961 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 e8cd4048..ba98dd41 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 8bfaaac6..e2b87914 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 4dbb7f66..7f55db92 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 12d332c3..2fa5718d 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 30ea8e37..e18755a2 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 a7cb5ca4..2f8432d6 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 cf5f2c1e..338e5329 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 862924c4..2c794c48 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 16a4714e..5ed46a21 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 a414ddc9..a10b812c 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 66875a21..b676ce01 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 3093e9b2..f8b82b2a 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 032263a1..47ec7321 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 f638b3fd..57e60c9d 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 5adfc85c..a71b4da7 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 2e34ecfa..5a5a39ba 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 5928dafc..5bec9222 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 7b8d15fd..54460acb 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 bd9ee827..8fe2a913 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 2d6c8e67..65f98195 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 5978efe8..520a94c3 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 8615bb99..01d72988 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 4de1b0f6..acb9154e 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 06b8f7e9..d83a6a28 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 e333d48c..ceadd950 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 bf395115..ea6a7d8c 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 8c6afa3e..2cac2f2a 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 14857d00..b3f7ddbf 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 c8e7deb5..4b0b3b5a 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 68d1b325..a0302353 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 6391851d..f3c887cc 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 2402a5f9..ec1221a9 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 97cf49dc..822785e7 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 aa68dfc5..2b26f308 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 90b36bff..4bf67524 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 fe97a31b..b249c3ed 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 09d03ee0..b5c9611a 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 f0e5c252..e64c89d3 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 7c2dfa38..8c5ebc8c 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 adba59bd..fd890fa5 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 5c46f69a..7207f5aa 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 af5a7695..5dfff1db 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 b1e5388a..f92e769a 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 e6f87a31..2da236ac 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 17c9623c..fc8cc60d 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 44e64889..82a0258b 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 778b042a..32b5ce1d 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 7af8d687..b3d17534 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 806c79d1..590d7691 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 5b42b917..30c78dea 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 68eda7ab..0c892c7e 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 bed135c2..79ff8181 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 537e33aa..5083f0c7 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 2afd6f93..50f2a774 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 95072cd8..3442d445 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 8b9c88b2..50fc8f38 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 26554131..8fcdd272 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 4ab50bd0..82cd18f8 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 ee624cbe..c8ee084c 100644 --- a/go.sum +++ b/go.sum @@ -37,6 +37,18 @@ github.com/CityOfZion/neo-go v0.62.1-pre.0.20191114145240-e740fbe708f8/go.mod h1 github.com/CityOfZion/neo-go v0.70.1-pre.0.20191209120015-fccb0085941e/go.mod h1:0enZl0az8xA6PVkwzEOwPWVJGqlt/GO4hA4kmQ5Xzig= github.com/CityOfZion/neo-go v0.70.1-pre.0.20191212173117-32ac01130d4c/go.mod h1:JtlHfeqLywZLswKIKFnAp+yzezY4Dji9qlfQKB2OD/I= github.com/CityOfZion/neo-go v0.71.1-pre.0.20200129171427-f773ec69fb84/go.mod h1:FLI526IrRWHmcsO+mHsCbj64pJZhwQFTLJZu+A4PGOA= +github.com/TrueCloudLab/frostfs-api-go/v2 v2.0.0-20221212144048-1351b6656d68 h1:mwZr15qCuIcWojIOmH6LILPohbWIkknZe9vhBRapmfQ= +github.com/TrueCloudLab/frostfs-api-go/v2 v2.0.0-20221212144048-1351b6656d68/go.mod h1:u3P6aL/NpAIY5IFRsJhmV+61Q3pJ3BkLENqySkf5zZQ= +github.com/TrueCloudLab/frostfs-contract v0.0.0-20221213081248-6c805c1b4e42 h1:P/gisZxTzJ9R3tuYDaQWe0tY6m1Zea3gzdPpNYK+NP4= +github.com/TrueCloudLab/frostfs-contract v0.0.0-20221213081248-6c805c1b4e42/go.mod h1:qmf648elr+FWBZH3hqND8KVrXMnqu/e0z48k+sX8C2s= +github.com/TrueCloudLab/frostfs-crypto v0.5.0 h1:ZoLjixSkQv3j1EwZ1WJzMEJY2NR+9nO4Pd8WSyM/RRI= +github.com/TrueCloudLab/frostfs-crypto v0.5.0/go.mod h1:775MUewpH8AWpXrimAG2NYWOXB6lpKOI5kqgu+eI5zs= +github.com/TrueCloudLab/hrw v1.1.0 h1:2U69PpUX1UtMWgh/RAg6D8mQW+/WsxbLNE+19EUhLhY= +github.com/TrueCloudLab/hrw v1.1.0/go.mod h1:Pzi8Hy3qx12cew+ajVxgbtDVM4sRG9/gJnJLcL/yRyY= +github.com/TrueCloudLab/rfc6979 v0.3.0 h1:0SYMAfQWh/TjnofqYQHy+s3rmQ5gi0fvOaDbqd60/Ic= +github.com/TrueCloudLab/rfc6979 v0.3.0/go.mod h1:qylxFXFQ/sMvpZC/8JyWp+mfzk5Zj/KDT5FAbekhobc= +github.com/TrueCloudLab/tzhash v1.7.0 h1:btGORepc7Dg+n4MxgJxv73c9eYhwSBI5HqsqUBRmJiw= +github.com/TrueCloudLab/tzhash v1.7.0/go.mod h1:gDQxqjhTqhR58Qfx0gxGtuyGAkixOukwbFGX9O6UGg4= github.com/Workiva/go-datastructures v1.0.50/go.mod h1:Z+F2Rca0qCsVYDS8z7bAGm8f3UkzuWYS/oBZz5a7VVA= github.com/abiosoft/ishell v2.0.0+incompatible/go.mod h1:HQR9AqF2R3P4XXpMpI0NAzgHf/aS6+zVXRj14cVk9qg= github.com/abiosoft/ishell/v2 v2.0.2/go.mod h1:E4oTCXfo6QjoCart0QYa5m9w4S+deXs/P/9jA77A9Bs= @@ -248,39 +260,28 @@ github.com/nspcc-dev/dbft v0.0.0-20191209120240-0d6b7568d9ae/go.mod h1:3FjXOoHmA github.com/nspcc-dev/dbft v0.0.0-20200117124306-478e5cfbf03a/go.mod h1:/YFK+XOxxg0Bfm6P92lY5eDSLYfp06XOdL8KAVgXjVk= github.com/nspcc-dev/dbft v0.0.0-20200219114139-199d286ed6c1/go.mod h1:O0qtn62prQSqizzoagHmuuKoz8QMkU3SzBoKdEvm3aQ= github.com/nspcc-dev/dbft v0.0.0-20210721160347-1b03241391ac/go.mod h1:U8MSnEShH+o5hexfWJdze6uMFJteP0ko7J2frO7Yu1Y= -github.com/nspcc-dev/dbft v0.0.0-20220629112714-fd49ca59d354/go.mod h1:U8MSnEShH+o5hexfWJdze6uMFJteP0ko7J2frO7Yu1Y= github.com/nspcc-dev/dbft v0.0.0-20220902113116-58a5e763e647/go.mod h1:g9xisXmX9NP9MjioaTe862n9SlZTrP+6PVUWLBYOr98= github.com/nspcc-dev/go-ordered-json v0.0.0-20210915112629-e1b6cce73d02/go.mod h1:79bEUDEviBHJMFV6Iq6in57FEOCMcRhfQnfaf0ETA5U= github.com/nspcc-dev/go-ordered-json v0.0.0-20220111165707-25110be27d22 h1:n4ZaFCKt1pQJd7PXoMJabZWK9ejjbLOVrkl/lOUmshg= github.com/nspcc-dev/go-ordered-json v0.0.0-20220111165707-25110be27d22/go.mod h1:79bEUDEviBHJMFV6Iq6in57FEOCMcRhfQnfaf0ETA5U= -github.com/nspcc-dev/hrw v1.0.9 h1:17VcAuTtrstmFppBjfRiia4K2wA/ukXZhLFS8Y8rz5Y= github.com/nspcc-dev/hrw v1.0.9/go.mod h1:l/W2vx83vMQo6aStyx2AuZrJ+07lGv2JQGlVkPG06MU= github.com/nspcc-dev/neo-go v0.73.1-pre.0.20200303142215-f5a1b928ce09/go.mod h1:pPYwPZ2ks+uMnlRLUyXOpLieaDQSEaf4NM3zHVbRjmg= github.com/nspcc-dev/neo-go v0.98.0/go.mod h1:E3cc1x6RXSXrJb2nDWXTXjnXk3rIqVN8YdFyWv+FrqM= -github.com/nspcc-dev/neo-go v0.99.2/go.mod h1:9P0yWqhZX7i/ChJ+zjtiStO1uPTolPFUM+L5oNznU8E= github.com/nspcc-dev/neo-go v0.99.4 h1:8Y+SdRxksC72a4PNkcGCh/aaQinh9Gu+c5LilbcsXOI= github.com/nspcc-dev/neo-go v0.99.4/go.mod h1:mKTolfRUfKjFso5HPvGSQtUZc70n0VKBMs16eGuC5gA= -github.com/nspcc-dev/neo-go/pkg/interop v0.0.0-20220809123759-3094d3e0c14b/go.mod h1:23bBw0v6pBYcrWs8CBEEDIEDJNbcFoIh8pGGcf2Vv8s= github.com/nspcc-dev/neo-go/pkg/interop v0.0.0-20220927123257-24c107e3a262 h1:UTmSLZw5OpD/JPE1B5Vf98GF0zu2/Hsqq1lGLtStTUE= github.com/nspcc-dev/neo-go/pkg/interop v0.0.0-20220927123257-24c107e3a262/go.mod h1:23bBw0v6pBYcrWs8CBEEDIEDJNbcFoIh8pGGcf2Vv8s= github.com/nspcc-dev/neofs-api-go/v2 v2.11.0-pre.0.20211201134523-3604d96f3fe1/go.mod h1:oS8dycEh8PPf2Jjp6+8dlwWyEv2Dy77h/XhhcdxYEFs= github.com/nspcc-dev/neofs-api-go/v2 v2.11.1/go.mod h1:oS8dycEh8PPf2Jjp6+8dlwWyEv2Dy77h/XhhcdxYEFs= -github.com/nspcc-dev/neofs-api-go/v2 v2.14.0 h1:jhuN8Ldqz7WApvUJRFY0bjRXE1R3iCkboMX5QVZhHVk= -github.com/nspcc-dev/neofs-api-go/v2 v2.14.0/go.mod h1:DRIr0Ic1s+6QgdqmNFNLIqMqd7lNMJfYwkczlm1hDtM= -github.com/nspcc-dev/neofs-contract v0.16.0 h1:/K5IMwZOlUCooxpe//73RW20HTfHvwRL088gppU5DM8= -github.com/nspcc-dev/neofs-contract v0.16.0/go.mod h1:gN5bo2TlMvLbySImmg76DVj3jVmYgti2VVlQ+h/tcr0= github.com/nspcc-dev/neofs-crypto v0.2.0/go.mod h1:F/96fUzPM3wR+UGsPi3faVNmFlA9KAEAUQR7dMxZmNA= github.com/nspcc-dev/neofs-crypto v0.2.3/go.mod h1:8w16GEJbH6791ktVqHN9YRNH3s9BEEKYxGhlFnp0cDw= github.com/nspcc-dev/neofs-crypto v0.3.0/go.mod h1:8w16GEJbH6791ktVqHN9YRNH3s9BEEKYxGhlFnp0cDw= -github.com/nspcc-dev/neofs-crypto v0.4.0 h1:5LlrUAM5O0k1+sH/sktBtrgfWtq1pgpDs09fZo+KYi4= github.com/nspcc-dev/neofs-crypto v0.4.0/go.mod h1:6XJ8kbXgOfevbI2WMruOtI+qUJXNwSGM/E9eClXxPHs= github.com/nspcc-dev/neofs-sdk-go v0.0.0-20211201182451-a5b61c4f6477/go.mod h1:dfMtQWmBHYpl9Dez23TGtIUKiFvCIxUZq/CkSIhEpz4= github.com/nspcc-dev/neofs-sdk-go v0.0.0-20220113123743-7f3162110659/go.mod h1:/jay1lr3w7NQd/VDBkEhkJmDmyPNsu4W+QV2obsUV40= github.com/nspcc-dev/rfc6979 v0.1.0/go.mod h1:exhIh1PdpDC5vQmyEsGvc4YDM/lyQp/452QxGq/UEso= github.com/nspcc-dev/rfc6979 v0.2.0 h1:3e1WNxrN60/6N0DW7+UYisLeZJyfqZTNOjeV/toYvOE= github.com/nspcc-dev/rfc6979 v0.2.0/go.mod h1:exhIh1PdpDC5vQmyEsGvc4YDM/lyQp/452QxGq/UEso= -github.com/nspcc-dev/tzhash v1.6.1 h1:8dUrWFpjkmoHF+7GxuGUmarj9LLHWFcuyF3CTrqq9JE= -github.com/nspcc-dev/tzhash v1.6.1/go.mod h1:BoflzCVp+DO/f1mvbcsJQWoFzidIFBhWFZMglbUW648= github.com/nxadm/tail v1.4.4/go.mod h1:kenIhsEOeOJmVchQTgglprH7qJGnHDVpk1VPCcaMI8A= github.com/onsi/ginkgo v1.6.0/go.mod h1:lLunBs/Ym6LB5Z9jYTR76FiuTmxDTDusOGeTQH+WWjE= github.com/onsi/ginkgo v1.7.0/go.mod h1:lLunBs/Ym6LB5Z9jYTR76FiuTmxDTDusOGeTQH+WWjE= diff --git a/netmap/context.go b/netmap/context.go index fc3b91cd..2697d6e5 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 931e874e..4bac2367 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 bd229cad..17fcfce5 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 fc300737..6e989053 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 c283f472..d11a3cac 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 3d312db5..7fb3e44c 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 67af033e..82e606fe 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 f5826214..af1fb884 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 710e39ad..3e358ff4 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 91a3c32b..466b0eda 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 2884c3fa..e72541a4 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 91161c9d..85be2380 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 2e66b9ff..370cf10e 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 7f31e499..96d9b21d 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 11dac77e..23f5d9e2 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 45ab0e1b..4553cb05 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 065eef90..f06c5bfb 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 95109f3d..cdcc5803 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 32e35f41..53006263 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 7c74cb96..5af2975b 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 d5f1b3f9..7a2593ce 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 22189a88..27a7e34a 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 6d99ec61..372e4a35 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 3d34d1c8..daca0f3e 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 3c47cdbd..f7f4e943 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 a7edb8c4..e254000b 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 baa1b221..5d332384 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 1b7c40ed..3104a7d6 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 27575848..66b7cbfd 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 ad93fa3f..acf72279 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 ee680fbf..be8759cb 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 b57afdcd..2e088446 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 6e7cfc93..a3f2c77c 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 ea2238bc..e46ccfaa 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 e14d3600..1541f806 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 fd776bd7..dd495260 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 5f38822c..818a39cf 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 9be4527a..c1de85c3 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 2174a29b..96262e97 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 26faaf61..794805b5 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 45b4a47c..6b75dafe 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 6a15ac31..5741969c 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 e15cee5c..bb6eac63 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 7c13f2ca..765db376 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 f582b246..e6f83ab4 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 06149108..502d2145 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 62d50505..e423a6be 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 f87d1089..5f32afa1 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 d95a41e2..4c4ed256 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 c90fa479..b051e5f2 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 1d425c67..cf2649cb 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 69cf0504..da55a97a 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 13d09eb9..50801a56 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 aedd6143..0ec94e8a 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 7e59ace7..2dc31a68 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 8d704fe5..204a5396 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 bfee237a..9cdca170 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 cdde4072..1d8fb5f7 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 09c045e5..9d5cd765 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 b0b106c0..e6041c35 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 7346cd06..186f2059 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 29773a7f..ec311d08 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 95e15f0d..11f745d6 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 29b84206..3e2c21e8 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 88569515..bce62c52 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 0b35f374..856aa3ba 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 4279ff32..d9264cb9 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 95c5d805..2f9dbead 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 cf478b8a..c119d323 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 94bc2f75..a08de20d 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 8e657187..f9ff7c53 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 9d3d015a..7a479c72 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 ef119554..c9d52de1 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 8cfa4fa9..49b8e6d4 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 3515bbf6..9b38187c 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 72dd20cf..1486d8f7 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 00245d3d..e03d62f9 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 f47d5544..4c98fa4b 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 ce4466a1..9a22a6f7 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 43156966..dcaac639 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 7884f5a4..3acd9b55 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 dab0121e..bd52188e 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 08d851a1..b6e35a16 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 2d47d1ae..4fc90d97 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 367264a8..da99b480 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 adf9d0c0..4d90b28e 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 437d4490..80db4c52 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 b4ea64f1..6fc8fa62 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 0a05fcc3..608225fb 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 0d1aa0ab..19f0747d 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" )