prepare to rename neofs-proto to neofs-api

This commit is contained in:
Evgeniy Kulikov 2020-01-30 16:32:50 +03:00
parent b42537f8d8
commit 53af48372f
No known key found for this signature in database
GPG key ID: BF6AEE0A2A699BF2
70 changed files with 100 additions and 99 deletions

View file

@ -111,16 +111,16 @@ associated with owner id
Initial public release
[0.2.0]: https://github.com/nspcc-dev/neofs-proto/compare/v0.1.0...v0.2.0
[0.2.1]: https://github.com/nspcc-dev/neofs-proto/compare/v0.2.0...v0.2.1
[0.2.2]: https://github.com/nspcc-dev/neofs-proto/compare/v0.2.1...v0.2.2
[0.2.3]: https://github.com/nspcc-dev/neofs-proto/compare/v0.2.2...v0.2.3
[0.2.4]: https://github.com/nspcc-dev/neofs-proto/compare/v0.2.3...v0.2.4
[0.2.5]: https://github.com/nspcc-dev/neofs-proto/compare/v0.2.4...v0.2.5
[0.2.6]: https://github.com/nspcc-dev/neofs-proto/compare/v0.2.5...v0.2.6
[0.2.7]: https://github.com/nspcc-dev/neofs-proto/compare/v0.2.6...v0.2.7
[0.2.8]: https://github.com/nspcc-dev/neofs-proto/compare/v0.2.7...v0.2.8
[0.2.9]: https://github.com/nspcc-dev/neofs-proto/compare/v0.2.8...v0.2.9
[0.2.10]: https://github.com/nspcc-dev/neofs-proto/compare/v0.2.9...v0.2.10
[0.2.11]: https://github.com/nspcc-dev/neofs-proto/compare/v0.2.10...v0.2.11
[0.2.12]: https://github.com/nspcc-dev/neofs-proto/compare/v0.2.11...v0.2.12
[0.2.0]: https://github.com/nspcc-dev/neofs-api/compare/v0.1.0...v0.2.0
[0.2.1]: https://github.com/nspcc-dev/neofs-api/compare/v0.2.0...v0.2.1
[0.2.2]: https://github.com/nspcc-dev/neofs-api/compare/v0.2.1...v0.2.2
[0.2.3]: https://github.com/nspcc-dev/neofs-api/compare/v0.2.2...v0.2.3
[0.2.4]: https://github.com/nspcc-dev/neofs-api/compare/v0.2.3...v0.2.4
[0.2.5]: https://github.com/nspcc-dev/neofs-api/compare/v0.2.4...v0.2.5
[0.2.6]: https://github.com/nspcc-dev/neofs-api/compare/v0.2.5...v0.2.6
[0.2.7]: https://github.com/nspcc-dev/neofs-api/compare/v0.2.6...v0.2.7
[0.2.8]: https://github.com/nspcc-dev/neofs-api/compare/v0.2.7...v0.2.8
[0.2.9]: https://github.com/nspcc-dev/neofs-api/compare/v0.2.8...v0.2.9
[0.2.10]: https://github.com/nspcc-dev/neofs-api/compare/v0.2.9...v0.2.10
[0.2.11]: https://github.com/nspcc-dev/neofs-api/compare/v0.2.10...v0.2.11
[0.2.12]: https://github.com/nspcc-dev/neofs-api/compare/v0.2.11...v0.2.12

View file

@ -1,9 +1,9 @@
package accounting
import (
"github.com/nspcc-dev/neofs-proto/decimal"
"github.com/nspcc-dev/neofs-proto/internal"
"github.com/nspcc-dev/neofs-proto/refs"
"github.com/nspcc-dev/neofs-api/decimal"
"github.com/nspcc-dev/neofs-api/internal"
"github.com/nspcc-dev/neofs-api/refs"
)
type (

Binary file not shown.

View file

@ -1,6 +1,6 @@
syntax = "proto3";
package accounting;
option go_package = "github.com/nspcc-dev/neofs-proto/accounting";
option go_package = "github.com/nspcc-dev/neofs-api/accounting";
import "service/meta.proto";
import "service/verify.proto";

View file

@ -7,11 +7,11 @@ import (
"reflect"
"github.com/mr-tron/base58"
"github.com/nspcc-dev/neofs-api/chain"
"github.com/nspcc-dev/neofs-api/decimal"
"github.com/nspcc-dev/neofs-api/internal"
"github.com/nspcc-dev/neofs-api/refs"
crypto "github.com/nspcc-dev/neofs-crypto"
"github.com/nspcc-dev/neofs-proto/chain"
"github.com/nspcc-dev/neofs-proto/decimal"
"github.com/nspcc-dev/neofs-proto/internal"
"github.com/nspcc-dev/neofs-proto/refs"
"github.com/pkg/errors"
)

Binary file not shown.

View file

@ -1,6 +1,6 @@
syntax = "proto3";
package accounting;
option go_package = "github.com/nspcc-dev/neofs-proto/accounting";
option go_package = "github.com/nspcc-dev/neofs-api/accounting";
import "decimal/decimal.proto";
import "github.com/gogo/protobuf/gogoproto/gogo.proto";

View file

@ -5,10 +5,10 @@ import (
"testing"
"github.com/mr-tron/base58"
"github.com/nspcc-dev/neofs-api/chain"
"github.com/nspcc-dev/neofs-api/decimal"
"github.com/nspcc-dev/neofs-api/refs"
"github.com/nspcc-dev/neofs-crypto/test"
"github.com/nspcc-dev/neofs-proto/chain"
"github.com/nspcc-dev/neofs-proto/decimal"
"github.com/nspcc-dev/neofs-proto/refs"
"github.com/stretchr/testify/require"
)
@ -34,7 +34,7 @@ func TestCheque(t *testing.T) {
})
t.Run("marshal/unmarshal", func(t *testing.T) {
var b2 = new(Cheque)
b2 := new(Cheque)
key1 := test.DecodeKey(0)
key2 := test.DecodeKey(1)
@ -67,7 +67,7 @@ func TestCheque(t *testing.T) {
})
t.Run("example from SC", func(t *testing.T) {
var pathToCheque = "fixtures/cheque_data"
pathToCheque := "fixtures/cheque_data"
expect, err := ioutil.ReadFile(pathToCheque)
require.NoError(t, err)

View file

@ -3,7 +3,7 @@ package accounting
import (
"encoding/binary"
"github.com/nspcc-dev/neofs-proto/refs"
"github.com/nspcc-dev/neofs-api/refs"
)
type (

Binary file not shown.

View file

@ -1,6 +1,6 @@
syntax = "proto3";
package accounting;
option go_package = "github.com/nspcc-dev/neofs-proto/accounting";
option go_package = "github.com/nspcc-dev/neofs-api/accounting";
import "service/meta.proto";
import "service/verify.proto";

View file

@ -1,7 +1,7 @@
package bootstrap
import (
"github.com/nspcc-dev/neofs-proto/service"
"github.com/nspcc-dev/neofs-api/service"
)
// NodeType type alias.

Binary file not shown.

View file

@ -1,6 +1,6 @@
syntax = "proto3";
package bootstrap;
option go_package = "github.com/nspcc-dev/neofs-proto/bootstrap";
option go_package = "github.com/nspcc-dev/neofs-api/bootstrap";
import "service/meta.proto";
import "service/verify.proto";

View file

@ -7,7 +7,7 @@ import (
"strings"
"github.com/golang/protobuf/proto"
"github.com/nspcc-dev/neofs-proto/object"
"github.com/nspcc-dev/neofs-api/object"
)
type (

Binary file not shown.

View file

@ -1,6 +1,6 @@
syntax = "proto3";
package bootstrap;
option go_package = "github.com/nspcc-dev/neofs-proto/bootstrap";
option go_package = "github.com/nspcc-dev/neofs-api/bootstrap";
import "github.com/gogo/protobuf/gogoproto/gogo.proto";

View file

@ -7,8 +7,8 @@ import (
"encoding/hex"
"github.com/mr-tron/base58"
"github.com/nspcc-dev/neofs-api/internal"
crypto "github.com/nspcc-dev/neofs-crypto"
"github.com/nspcc-dev/neofs-proto/internal"
"github.com/pkg/errors"
"golang.org/x/crypto/ripemd160"
)

View file

@ -4,8 +4,8 @@ import (
"bytes"
"encoding/binary"
"github.com/nspcc-dev/neofs-proto/internal"
"github.com/nspcc-dev/neofs-proto/refs"
"github.com/nspcc-dev/neofs-api/internal"
"github.com/nspcc-dev/neofs-api/refs"
"github.com/pkg/errors"
)

Binary file not shown.

View file

@ -1,6 +1,6 @@
syntax = "proto3";
package container;
option go_package = "github.com/nspcc-dev/neofs-proto/container";
option go_package = "github.com/nspcc-dev/neofs-api/container";
import "service/meta.proto";
import "service/verify.proto";

View file

@ -4,9 +4,9 @@ import (
"bytes"
"github.com/google/uuid"
"github.com/nspcc-dev/neofs-api/internal"
"github.com/nspcc-dev/neofs-api/refs"
"github.com/nspcc-dev/neofs-crypto/test"
"github.com/nspcc-dev/neofs-proto/internal"
"github.com/nspcc-dev/neofs-proto/refs"
"github.com/nspcc-dev/netmap"
"github.com/pkg/errors"
)

Binary file not shown.

View file

@ -1,6 +1,6 @@
syntax = "proto3";
package container;
option go_package = "github.com/nspcc-dev/neofs-proto/container";
option go_package = "github.com/nspcc-dev/neofs-api/container";
import "github.com/nspcc-dev/netmap/selector.proto";
import "github.com/gogo/protobuf/gogoproto/gogo.proto";

View file

@ -4,8 +4,8 @@ import (
"testing"
"github.com/gogo/protobuf/proto"
"github.com/nspcc-dev/neofs-api/refs"
"github.com/nspcc-dev/neofs-crypto/test"
"github.com/nspcc-dev/neofs-proto/refs"
"github.com/nspcc-dev/netmap"
"github.com/stretchr/testify/require"
)

Binary file not shown.

View file

@ -1,6 +1,6 @@
syntax = "proto3";
package decimal;
option go_package = "github.com/nspcc-dev/neofs-proto/decimal";
option go_package = "github.com/nspcc-dev/neofs-api/decimal";
import "github.com/gogo/protobuf/gogoproto/gogo.proto";

2
go.mod
View file

@ -1,4 +1,4 @@
module github.com/nspcc-dev/neofs-proto
module github.com/nspcc-dev/neofs-api
go 1.13

View file

@ -4,7 +4,7 @@ import (
"bytes"
"github.com/mr-tron/base58"
"github.com/nspcc-dev/neofs-proto/internal"
"github.com/nspcc-dev/neofs-api/internal"
"github.com/nspcc-dev/tzhash/tz"
"github.com/pkg/errors"
)
@ -70,7 +70,7 @@ func (h Hash) Verify(data []byte) bool { return h.Equal(Sum(data)) }
// Validate checks if combined hashes are equal to current Hash.
func (h Hash) Validate(hashes []Hash) bool {
var hashBytes = make([][]byte, 0, len(hashes))
hashBytes := make([][]byte, 0, len(hashes))
for i := range hashes {
hashBytes = append(hashBytes, hashes[i].Bytes())
}

View file

@ -1,7 +1,8 @@
package object
// todo: all extensions must be transferred to the separate util library
import "github.com/nspcc-dev/neofs-proto/storagegroup"
import "github.com/nspcc-dev/neofs-api/storagegroup"
// IsLinking checks if object has children links to another objects.
// We have to check payload size because zero-object must have zero

View file

@ -1,11 +1,11 @@
package object
import (
"github.com/nspcc-dev/neofs-proto/hash"
"github.com/nspcc-dev/neofs-proto/internal"
"github.com/nspcc-dev/neofs-proto/refs"
"github.com/nspcc-dev/neofs-proto/service"
"github.com/nspcc-dev/neofs-proto/session"
"github.com/nspcc-dev/neofs-api/hash"
"github.com/nspcc-dev/neofs-api/internal"
"github.com/nspcc-dev/neofs-api/refs"
"github.com/nspcc-dev/neofs-api/service"
"github.com/nspcc-dev/neofs-api/session"
)
type (

Binary file not shown.

View file

@ -1,6 +1,6 @@
syntax = "proto3";
package object;
option go_package = "github.com/nspcc-dev/neofs-proto/object";
option go_package = "github.com/nspcc-dev/neofs-api/object";
import "refs/types.proto";
import "object/types.proto";

View file

@ -3,8 +3,8 @@ package object
import (
"sort"
"github.com/nspcc-dev/neofs-proto/refs"
"github.com/nspcc-dev/neofs-proto/storagegroup"
"github.com/nspcc-dev/neofs-api/refs"
"github.com/nspcc-dev/neofs-api/storagegroup"
)
// Here are defined getter functions for objects that contain storage group

View file

@ -5,8 +5,8 @@ import (
"sort"
"testing"
"github.com/nspcc-dev/neofs-proto/hash"
"github.com/nspcc-dev/neofs-proto/storagegroup"
"github.com/nspcc-dev/neofs-api/hash"
"github.com/nspcc-dev/neofs-api/storagegroup"
"github.com/stretchr/testify/require"
)

View file

@ -5,9 +5,9 @@ import (
"context"
"github.com/gogo/protobuf/proto"
"github.com/nspcc-dev/neofs-proto/internal"
"github.com/nspcc-dev/neofs-proto/refs"
"github.com/nspcc-dev/neofs-proto/session"
"github.com/nspcc-dev/neofs-api/internal"
"github.com/nspcc-dev/neofs-api/refs"
"github.com/nspcc-dev/neofs-api/session"
)
type (

Binary file not shown.

View file

@ -1,6 +1,6 @@
syntax = "proto3";
package object;
option go_package = "github.com/nspcc-dev/neofs-proto/object";
option go_package = "github.com/nspcc-dev/neofs-api/object";
import "refs/types.proto";
import "session/types.proto";

View file

@ -4,7 +4,7 @@ import (
"io"
"strconv"
"github.com/nspcc-dev/neofs-proto/session"
"github.com/nspcc-dev/neofs-api/session"
"github.com/pkg/errors"
)

View file

@ -4,11 +4,11 @@ import (
"testing"
"github.com/google/uuid"
"github.com/nspcc-dev/neofs-api/container"
"github.com/nspcc-dev/neofs-api/refs"
"github.com/nspcc-dev/neofs-api/session"
crypto "github.com/nspcc-dev/neofs-crypto"
"github.com/nspcc-dev/neofs-crypto/test"
"github.com/nspcc-dev/neofs-proto/container"
"github.com/nspcc-dev/neofs-proto/refs"
"github.com/nspcc-dev/neofs-proto/session"
"github.com/stretchr/testify/require"
)
@ -128,7 +128,6 @@ func TestObject_Verify(t *testing.T) {
// re-sign object
obj.Sign(sessionkey)
t.Run("incorrect with bad public key", func(t *testing.T) {
err = obj.Verify()
require.Error(t, err)

Binary file not shown.

View file

@ -1,6 +1,6 @@
syntax = "proto3";
package query;
option go_package = "github.com/nspcc-dev/neofs-proto/query";
option go_package = "github.com/nspcc-dev/neofs-api/query";
import "github.com/gogo/protobuf/gogoproto/gogo.proto";

View file

@ -4,7 +4,7 @@ import (
"crypto/sha256"
"strings"
"github.com/nspcc-dev/neofs-proto/internal"
"github.com/nspcc-dev/neofs-api/internal"
)
const (

View file

@ -5,7 +5,7 @@ import (
"crypto/ecdsa"
"github.com/mr-tron/base58"
"github.com/nspcc-dev/neofs-proto/chain"
"github.com/nspcc-dev/neofs-api/chain"
"github.com/pkg/errors"
)

View file

@ -13,8 +13,8 @@ import (
"crypto/sha256"
"github.com/google/uuid"
"github.com/nspcc-dev/neofs-proto/chain"
"github.com/nspcc-dev/neofs-proto/internal"
"github.com/nspcc-dev/neofs-api/chain"
"github.com/nspcc-dev/neofs-api/internal"
)
type (

Binary file not shown.

View file

@ -1,6 +1,6 @@
syntax = "proto3";
package refs;
option go_package = "github.com/nspcc-dev/neofs-proto/refs";
option go_package = "github.com/nspcc-dev/neofs-api/refs";
import "github.com/gogo/protobuf/gogoproto/gogo.proto";

View file

@ -1,7 +1,7 @@
package service
import (
"github.com/nspcc-dev/neofs-proto/internal"
"github.com/nspcc-dev/neofs-api/internal"
"github.com/pkg/errors"
"google.golang.org/grpc/codes"
"google.golang.org/grpc/status"
@ -94,7 +94,7 @@ func IRNonForwarding(role NodeRole) TTLCondition {
// ProcessRequestTTL validates and update ttl requests.
func ProcessRequestTTL(req MetaHeader, cond ...TTLCondition) error {
var ttl = req.GetTTL()
ttl := req.GetTTL()
if ttl == ZeroTTL {
return status.New(codes.InvalidArgument, ErrZeroTTL.Error()).Err()

Binary file not shown.

View file

@ -1,6 +1,6 @@
syntax = "proto3";
package service;
option go_package = "github.com/nspcc-dev/neofs-proto/service";
option go_package = "github.com/nspcc-dev/neofs-api/service";
import "github.com/gogo/protobuf/gogoproto/gogo.proto";

View file

@ -4,9 +4,9 @@ import (
"crypto/ecdsa"
"sync"
"github.com/nspcc-dev/neofs-api/internal"
"github.com/nspcc-dev/neofs-api/refs"
crypto "github.com/nspcc-dev/neofs-crypto"
"github.com/nspcc-dev/neofs-proto/internal"
"github.com/nspcc-dev/neofs-proto/refs"
"github.com/pkg/errors"
)

Binary file not shown.

View file

@ -1,6 +1,6 @@
syntax = "proto3";
package service;
option go_package = "github.com/nspcc-dev/neofs-proto/service";
option go_package = "github.com/nspcc-dev/neofs-api/service";
import "github.com/gogo/protobuf/gogoproto/gogo.proto";

View file

@ -7,9 +7,9 @@ import (
"testing"
"github.com/gogo/protobuf/proto"
"github.com/nspcc-dev/neofs-api/refs"
crypto "github.com/nspcc-dev/neofs-crypto"
"github.com/nspcc-dev/neofs-crypto/test"
"github.com/nspcc-dev/neofs-proto/refs"
"github.com/pkg/errors"
"github.com/stretchr/testify/require"
)

Binary file not shown.

View file

@ -1,6 +1,6 @@
syntax = "proto3";
package service;
option go_package = "github.com/nspcc-dev/neofs-proto/service";
option go_package = "github.com/nspcc-dev/neofs-api/service";
import "service/meta.proto";
import "service/verify.proto";

View file

@ -4,8 +4,8 @@ import (
"context"
"crypto/ecdsa"
"github.com/nspcc-dev/neofs-api/refs"
crypto "github.com/nspcc-dev/neofs-crypto"
"github.com/nspcc-dev/neofs-proto/refs"
)
type (

Binary file not shown.

View file

@ -1,6 +1,6 @@
syntax = "proto3";
package session;
option go_package = "github.com/nspcc-dev/neofs-proto/session";
option go_package = "github.com/nspcc-dev/neofs-api/session";
import "session/types.proto";
import "service/meta.proto";

View file

@ -6,8 +6,8 @@ import (
"crypto/rand"
"sync"
"github.com/nspcc-dev/neofs-api/refs"
crypto "github.com/nspcc-dev/neofs-crypto"
"github.com/nspcc-dev/neofs-proto/refs"
)
type simpleStore struct {

View file

@ -5,8 +5,8 @@ import (
"crypto/rand"
"testing"
"github.com/nspcc-dev/neofs-api/refs"
crypto "github.com/nspcc-dev/neofs-crypto"
"github.com/nspcc-dev/neofs-proto/refs"
"github.com/stretchr/testify/require"
)
@ -76,7 +76,8 @@ func TestTokenStore(t *testing.T) {
t1 = s.New(TokenParams{
ObjectID: []ObjectID{oid},
OwnerID: c.OwnerID,
PublicKeys: pk})
PublicKeys: pk,
})
signToken(t, t1, c)

View file

@ -5,10 +5,10 @@ import (
"encoding/binary"
"sync"
"github.com/nspcc-dev/neofs-api/chain"
"github.com/nspcc-dev/neofs-api/internal"
"github.com/nspcc-dev/neofs-api/refs"
crypto "github.com/nspcc-dev/neofs-crypto"
"github.com/nspcc-dev/neofs-proto/chain"
"github.com/nspcc-dev/neofs-proto/internal"
"github.com/nspcc-dev/neofs-proto/refs"
"github.com/pkg/errors"
)

Binary file not shown.

View file

@ -1,6 +1,6 @@
syntax = "proto3";
package session;
option go_package = "github.com/nspcc-dev/neofs-proto/session";
option go_package = "github.com/nspcc-dev/neofs-api/session";
import "github.com/gogo/protobuf/gogoproto/gogo.proto";

Binary file not shown.

View file

@ -1,6 +1,6 @@
syntax = "proto3";
package state;
option go_package = "github.com/nspcc-dev/neofs-proto/state";
option go_package = "github.com/nspcc-dev/neofs-api/state";
import "service/meta.proto";
import "service/verify.proto";

View file

@ -3,7 +3,7 @@ package storagegroup
import (
"context"
"github.com/nspcc-dev/neofs-proto/refs"
"github.com/nspcc-dev/neofs-api/refs"
)
type (

View file

@ -7,8 +7,8 @@ import (
"github.com/gogo/protobuf/proto"
"github.com/mr-tron/base58"
"github.com/nspcc-dev/neofs-proto/hash"
"github.com/nspcc-dev/neofs-proto/refs"
"github.com/nspcc-dev/neofs-api/hash"
"github.com/nspcc-dev/neofs-api/refs"
)
type (

Binary file not shown.

View file

@ -1,6 +1,6 @@
syntax = "proto3";
package storagegroup;
option go_package = "github.com/nspcc-dev/neofs-proto/storagegroup";
option go_package = "github.com/nspcc-dev/neofs-api/storagegroup";
import "github.com/gogo/protobuf/gogoproto/gogo.proto";