forked from TrueCloudLab/frostfs-api-go
prepare to rename neofs-proto to neofs-api
This commit is contained in:
parent
b42537f8d8
commit
53af48372f
70 changed files with 100 additions and 99 deletions
26
CHANGELOG.md
26
CHANGELOG.md
|
@ -111,16 +111,16 @@ associated with owner id
|
||||||
|
|
||||||
Initial public release
|
Initial public release
|
||||||
|
|
||||||
[0.2.0]: https://github.com/nspcc-dev/neofs-proto/compare/v0.1.0...v0.2.0
|
[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-proto/compare/v0.2.0...v0.2.1
|
[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-proto/compare/v0.2.1...v0.2.2
|
[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-proto/compare/v0.2.2...v0.2.3
|
[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-proto/compare/v0.2.3...v0.2.4
|
[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-proto/compare/v0.2.4...v0.2.5
|
[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-proto/compare/v0.2.5...v0.2.6
|
[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-proto/compare/v0.2.6...v0.2.7
|
[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-proto/compare/v0.2.7...v0.2.8
|
[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-proto/compare/v0.2.8...v0.2.9
|
[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-proto/compare/v0.2.9...v0.2.10
|
[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-proto/compare/v0.2.10...v0.2.11
|
[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-proto/compare/v0.2.11...v0.2.12
|
[0.2.12]: https://github.com/nspcc-dev/neofs-api/compare/v0.2.11...v0.2.12
|
||||||
|
|
|
@ -1,9 +1,9 @@
|
||||||
package accounting
|
package accounting
|
||||||
|
|
||||||
import (
|
import (
|
||||||
"github.com/nspcc-dev/neofs-proto/decimal"
|
"github.com/nspcc-dev/neofs-api/decimal"
|
||||||
"github.com/nspcc-dev/neofs-proto/internal"
|
"github.com/nspcc-dev/neofs-api/internal"
|
||||||
"github.com/nspcc-dev/neofs-proto/refs"
|
"github.com/nspcc-dev/neofs-api/refs"
|
||||||
)
|
)
|
||||||
|
|
||||||
type (
|
type (
|
||||||
|
|
Binary file not shown.
|
@ -1,6 +1,6 @@
|
||||||
syntax = "proto3";
|
syntax = "proto3";
|
||||||
package accounting;
|
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/meta.proto";
|
||||||
import "service/verify.proto";
|
import "service/verify.proto";
|
||||||
|
|
|
@ -7,11 +7,11 @@ import (
|
||||||
"reflect"
|
"reflect"
|
||||||
|
|
||||||
"github.com/mr-tron/base58"
|
"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"
|
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"
|
"github.com/pkg/errors"
|
||||||
)
|
)
|
||||||
|
|
||||||
|
|
Binary file not shown.
|
@ -1,6 +1,6 @@
|
||||||
syntax = "proto3";
|
syntax = "proto3";
|
||||||
package accounting;
|
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 "decimal/decimal.proto";
|
||||||
import "github.com/gogo/protobuf/gogoproto/gogo.proto";
|
import "github.com/gogo/protobuf/gogoproto/gogo.proto";
|
||||||
|
|
|
@ -5,10 +5,10 @@ import (
|
||||||
"testing"
|
"testing"
|
||||||
|
|
||||||
"github.com/mr-tron/base58"
|
"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-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"
|
"github.com/stretchr/testify/require"
|
||||||
)
|
)
|
||||||
|
|
||||||
|
@ -34,7 +34,7 @@ func TestCheque(t *testing.T) {
|
||||||
})
|
})
|
||||||
|
|
||||||
t.Run("marshal/unmarshal", func(t *testing.T) {
|
t.Run("marshal/unmarshal", func(t *testing.T) {
|
||||||
var b2 = new(Cheque)
|
b2 := new(Cheque)
|
||||||
|
|
||||||
key1 := test.DecodeKey(0)
|
key1 := test.DecodeKey(0)
|
||||||
key2 := test.DecodeKey(1)
|
key2 := test.DecodeKey(1)
|
||||||
|
@ -67,7 +67,7 @@ func TestCheque(t *testing.T) {
|
||||||
})
|
})
|
||||||
|
|
||||||
t.Run("example from SC", func(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)
|
expect, err := ioutil.ReadFile(pathToCheque)
|
||||||
require.NoError(t, err)
|
require.NoError(t, err)
|
||||||
|
|
||||||
|
|
|
@ -3,7 +3,7 @@ package accounting
|
||||||
import (
|
import (
|
||||||
"encoding/binary"
|
"encoding/binary"
|
||||||
|
|
||||||
"github.com/nspcc-dev/neofs-proto/refs"
|
"github.com/nspcc-dev/neofs-api/refs"
|
||||||
)
|
)
|
||||||
|
|
||||||
type (
|
type (
|
||||||
|
|
Binary file not shown.
|
@ -1,6 +1,6 @@
|
||||||
syntax = "proto3";
|
syntax = "proto3";
|
||||||
package accounting;
|
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/meta.proto";
|
||||||
import "service/verify.proto";
|
import "service/verify.proto";
|
||||||
|
|
|
@ -1,7 +1,7 @@
|
||||||
package bootstrap
|
package bootstrap
|
||||||
|
|
||||||
import (
|
import (
|
||||||
"github.com/nspcc-dev/neofs-proto/service"
|
"github.com/nspcc-dev/neofs-api/service"
|
||||||
)
|
)
|
||||||
|
|
||||||
// NodeType type alias.
|
// NodeType type alias.
|
||||||
|
|
Binary file not shown.
|
@ -1,6 +1,6 @@
|
||||||
syntax = "proto3";
|
syntax = "proto3";
|
||||||
package bootstrap;
|
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/meta.proto";
|
||||||
import "service/verify.proto";
|
import "service/verify.proto";
|
||||||
|
|
|
@ -7,7 +7,7 @@ import (
|
||||||
"strings"
|
"strings"
|
||||||
|
|
||||||
"github.com/golang/protobuf/proto"
|
"github.com/golang/protobuf/proto"
|
||||||
"github.com/nspcc-dev/neofs-proto/object"
|
"github.com/nspcc-dev/neofs-api/object"
|
||||||
)
|
)
|
||||||
|
|
||||||
type (
|
type (
|
||||||
|
|
Binary file not shown.
|
@ -1,6 +1,6 @@
|
||||||
syntax = "proto3";
|
syntax = "proto3";
|
||||||
package bootstrap;
|
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";
|
import "github.com/gogo/protobuf/gogoproto/gogo.proto";
|
||||||
|
|
||||||
|
|
|
@ -7,8 +7,8 @@ import (
|
||||||
"encoding/hex"
|
"encoding/hex"
|
||||||
|
|
||||||
"github.com/mr-tron/base58"
|
"github.com/mr-tron/base58"
|
||||||
|
"github.com/nspcc-dev/neofs-api/internal"
|
||||||
crypto "github.com/nspcc-dev/neofs-crypto"
|
crypto "github.com/nspcc-dev/neofs-crypto"
|
||||||
"github.com/nspcc-dev/neofs-proto/internal"
|
|
||||||
"github.com/pkg/errors"
|
"github.com/pkg/errors"
|
||||||
"golang.org/x/crypto/ripemd160"
|
"golang.org/x/crypto/ripemd160"
|
||||||
)
|
)
|
||||||
|
|
|
@ -4,8 +4,8 @@ import (
|
||||||
"bytes"
|
"bytes"
|
||||||
"encoding/binary"
|
"encoding/binary"
|
||||||
|
|
||||||
"github.com/nspcc-dev/neofs-proto/internal"
|
"github.com/nspcc-dev/neofs-api/internal"
|
||||||
"github.com/nspcc-dev/neofs-proto/refs"
|
"github.com/nspcc-dev/neofs-api/refs"
|
||||||
"github.com/pkg/errors"
|
"github.com/pkg/errors"
|
||||||
)
|
)
|
||||||
|
|
||||||
|
|
Binary file not shown.
|
@ -1,6 +1,6 @@
|
||||||
syntax = "proto3";
|
syntax = "proto3";
|
||||||
package container;
|
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/meta.proto";
|
||||||
import "service/verify.proto";
|
import "service/verify.proto";
|
||||||
|
|
|
@ -4,9 +4,9 @@ import (
|
||||||
"bytes"
|
"bytes"
|
||||||
|
|
||||||
"github.com/google/uuid"
|
"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-crypto/test"
|
||||||
"github.com/nspcc-dev/neofs-proto/internal"
|
|
||||||
"github.com/nspcc-dev/neofs-proto/refs"
|
|
||||||
"github.com/nspcc-dev/netmap"
|
"github.com/nspcc-dev/netmap"
|
||||||
"github.com/pkg/errors"
|
"github.com/pkg/errors"
|
||||||
)
|
)
|
||||||
|
|
Binary file not shown.
|
@ -1,6 +1,6 @@
|
||||||
syntax = "proto3";
|
syntax = "proto3";
|
||||||
package container;
|
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/nspcc-dev/netmap/selector.proto";
|
||||||
import "github.com/gogo/protobuf/gogoproto/gogo.proto";
|
import "github.com/gogo/protobuf/gogoproto/gogo.proto";
|
||||||
|
|
|
@ -4,8 +4,8 @@ import (
|
||||||
"testing"
|
"testing"
|
||||||
|
|
||||||
"github.com/gogo/protobuf/proto"
|
"github.com/gogo/protobuf/proto"
|
||||||
|
"github.com/nspcc-dev/neofs-api/refs"
|
||||||
"github.com/nspcc-dev/neofs-crypto/test"
|
"github.com/nspcc-dev/neofs-crypto/test"
|
||||||
"github.com/nspcc-dev/neofs-proto/refs"
|
|
||||||
"github.com/nspcc-dev/netmap"
|
"github.com/nspcc-dev/netmap"
|
||||||
"github.com/stretchr/testify/require"
|
"github.com/stretchr/testify/require"
|
||||||
)
|
)
|
||||||
|
|
Binary file not shown.
|
@ -1,6 +1,6 @@
|
||||||
syntax = "proto3";
|
syntax = "proto3";
|
||||||
package decimal;
|
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";
|
import "github.com/gogo/protobuf/gogoproto/gogo.proto";
|
||||||
|
|
||||||
|
|
2
go.mod
2
go.mod
|
@ -1,4 +1,4 @@
|
||||||
module github.com/nspcc-dev/neofs-proto
|
module github.com/nspcc-dev/neofs-api
|
||||||
|
|
||||||
go 1.13
|
go 1.13
|
||||||
|
|
||||||
|
|
|
@ -4,7 +4,7 @@ import (
|
||||||
"bytes"
|
"bytes"
|
||||||
|
|
||||||
"github.com/mr-tron/base58"
|
"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/nspcc-dev/tzhash/tz"
|
||||||
"github.com/pkg/errors"
|
"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.
|
// Validate checks if combined hashes are equal to current Hash.
|
||||||
func (h Hash) Validate(hashes []Hash) bool {
|
func (h Hash) Validate(hashes []Hash) bool {
|
||||||
var hashBytes = make([][]byte, 0, len(hashes))
|
hashBytes := make([][]byte, 0, len(hashes))
|
||||||
for i := range hashes {
|
for i := range hashes {
|
||||||
hashBytes = append(hashBytes, hashes[i].Bytes())
|
hashBytes = append(hashBytes, hashes[i].Bytes())
|
||||||
}
|
}
|
||||||
|
|
|
@ -1,7 +1,8 @@
|
||||||
package object
|
package object
|
||||||
|
|
||||||
// todo: all extensions must be transferred to the separate util library
|
// 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.
|
// IsLinking checks if object has children links to another objects.
|
||||||
// We have to check payload size because zero-object must have zero
|
// We have to check payload size because zero-object must have zero
|
||||||
|
|
|
@ -1,11 +1,11 @@
|
||||||
package object
|
package object
|
||||||
|
|
||||||
import (
|
import (
|
||||||
"github.com/nspcc-dev/neofs-proto/hash"
|
"github.com/nspcc-dev/neofs-api/hash"
|
||||||
"github.com/nspcc-dev/neofs-proto/internal"
|
"github.com/nspcc-dev/neofs-api/internal"
|
||||||
"github.com/nspcc-dev/neofs-proto/refs"
|
"github.com/nspcc-dev/neofs-api/refs"
|
||||||
"github.com/nspcc-dev/neofs-proto/service"
|
"github.com/nspcc-dev/neofs-api/service"
|
||||||
"github.com/nspcc-dev/neofs-proto/session"
|
"github.com/nspcc-dev/neofs-api/session"
|
||||||
)
|
)
|
||||||
|
|
||||||
type (
|
type (
|
||||||
|
|
Binary file not shown.
|
@ -1,6 +1,6 @@
|
||||||
syntax = "proto3";
|
syntax = "proto3";
|
||||||
package object;
|
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 "refs/types.proto";
|
||||||
import "object/types.proto";
|
import "object/types.proto";
|
||||||
|
|
|
@ -3,8 +3,8 @@ package object
|
||||||
import (
|
import (
|
||||||
"sort"
|
"sort"
|
||||||
|
|
||||||
"github.com/nspcc-dev/neofs-proto/refs"
|
"github.com/nspcc-dev/neofs-api/refs"
|
||||||
"github.com/nspcc-dev/neofs-proto/storagegroup"
|
"github.com/nspcc-dev/neofs-api/storagegroup"
|
||||||
)
|
)
|
||||||
|
|
||||||
// Here are defined getter functions for objects that contain storage group
|
// Here are defined getter functions for objects that contain storage group
|
||||||
|
|
|
@ -5,8 +5,8 @@ import (
|
||||||
"sort"
|
"sort"
|
||||||
"testing"
|
"testing"
|
||||||
|
|
||||||
"github.com/nspcc-dev/neofs-proto/hash"
|
"github.com/nspcc-dev/neofs-api/hash"
|
||||||
"github.com/nspcc-dev/neofs-proto/storagegroup"
|
"github.com/nspcc-dev/neofs-api/storagegroup"
|
||||||
"github.com/stretchr/testify/require"
|
"github.com/stretchr/testify/require"
|
||||||
)
|
)
|
||||||
|
|
||||||
|
|
|
@ -5,9 +5,9 @@ import (
|
||||||
"context"
|
"context"
|
||||||
|
|
||||||
"github.com/gogo/protobuf/proto"
|
"github.com/gogo/protobuf/proto"
|
||||||
"github.com/nspcc-dev/neofs-proto/internal"
|
"github.com/nspcc-dev/neofs-api/internal"
|
||||||
"github.com/nspcc-dev/neofs-proto/refs"
|
"github.com/nspcc-dev/neofs-api/refs"
|
||||||
"github.com/nspcc-dev/neofs-proto/session"
|
"github.com/nspcc-dev/neofs-api/session"
|
||||||
)
|
)
|
||||||
|
|
||||||
type (
|
type (
|
||||||
|
|
Binary file not shown.
|
@ -1,6 +1,6 @@
|
||||||
syntax = "proto3";
|
syntax = "proto3";
|
||||||
package object;
|
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 "refs/types.proto";
|
||||||
import "session/types.proto";
|
import "session/types.proto";
|
||||||
|
|
|
@ -4,7 +4,7 @@ import (
|
||||||
"io"
|
"io"
|
||||||
"strconv"
|
"strconv"
|
||||||
|
|
||||||
"github.com/nspcc-dev/neofs-proto/session"
|
"github.com/nspcc-dev/neofs-api/session"
|
||||||
"github.com/pkg/errors"
|
"github.com/pkg/errors"
|
||||||
)
|
)
|
||||||
|
|
||||||
|
|
|
@ -4,11 +4,11 @@ import (
|
||||||
"testing"
|
"testing"
|
||||||
|
|
||||||
"github.com/google/uuid"
|
"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"
|
crypto "github.com/nspcc-dev/neofs-crypto"
|
||||||
"github.com/nspcc-dev/neofs-crypto/test"
|
"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"
|
"github.com/stretchr/testify/require"
|
||||||
)
|
)
|
||||||
|
|
||||||
|
@ -128,7 +128,6 @@ func TestObject_Verify(t *testing.T) {
|
||||||
// re-sign object
|
// re-sign object
|
||||||
obj.Sign(sessionkey)
|
obj.Sign(sessionkey)
|
||||||
|
|
||||||
|
|
||||||
t.Run("incorrect with bad public key", func(t *testing.T) {
|
t.Run("incorrect with bad public key", func(t *testing.T) {
|
||||||
err = obj.Verify()
|
err = obj.Verify()
|
||||||
require.Error(t, err)
|
require.Error(t, err)
|
||||||
|
|
Binary file not shown.
|
@ -1,6 +1,6 @@
|
||||||
syntax = "proto3";
|
syntax = "proto3";
|
||||||
package query;
|
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";
|
import "github.com/gogo/protobuf/gogoproto/gogo.proto";
|
||||||
|
|
||||||
|
|
|
@ -4,7 +4,7 @@ import (
|
||||||
"crypto/sha256"
|
"crypto/sha256"
|
||||||
"strings"
|
"strings"
|
||||||
|
|
||||||
"github.com/nspcc-dev/neofs-proto/internal"
|
"github.com/nspcc-dev/neofs-api/internal"
|
||||||
)
|
)
|
||||||
|
|
||||||
const (
|
const (
|
||||||
|
|
|
@ -5,7 +5,7 @@ import (
|
||||||
"crypto/ecdsa"
|
"crypto/ecdsa"
|
||||||
|
|
||||||
"github.com/mr-tron/base58"
|
"github.com/mr-tron/base58"
|
||||||
"github.com/nspcc-dev/neofs-proto/chain"
|
"github.com/nspcc-dev/neofs-api/chain"
|
||||||
"github.com/pkg/errors"
|
"github.com/pkg/errors"
|
||||||
)
|
)
|
||||||
|
|
||||||
|
|
|
@ -13,8 +13,8 @@ import (
|
||||||
"crypto/sha256"
|
"crypto/sha256"
|
||||||
|
|
||||||
"github.com/google/uuid"
|
"github.com/google/uuid"
|
||||||
"github.com/nspcc-dev/neofs-proto/chain"
|
"github.com/nspcc-dev/neofs-api/chain"
|
||||||
"github.com/nspcc-dev/neofs-proto/internal"
|
"github.com/nspcc-dev/neofs-api/internal"
|
||||||
)
|
)
|
||||||
|
|
||||||
type (
|
type (
|
||||||
|
|
BIN
refs/types.pb.go
BIN
refs/types.pb.go
Binary file not shown.
|
@ -1,6 +1,6 @@
|
||||||
syntax = "proto3";
|
syntax = "proto3";
|
||||||
package refs;
|
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";
|
import "github.com/gogo/protobuf/gogoproto/gogo.proto";
|
||||||
|
|
||||||
|
|
|
@ -1,7 +1,7 @@
|
||||||
package service
|
package service
|
||||||
|
|
||||||
import (
|
import (
|
||||||
"github.com/nspcc-dev/neofs-proto/internal"
|
"github.com/nspcc-dev/neofs-api/internal"
|
||||||
"github.com/pkg/errors"
|
"github.com/pkg/errors"
|
||||||
"google.golang.org/grpc/codes"
|
"google.golang.org/grpc/codes"
|
||||||
"google.golang.org/grpc/status"
|
"google.golang.org/grpc/status"
|
||||||
|
@ -94,7 +94,7 @@ func IRNonForwarding(role NodeRole) TTLCondition {
|
||||||
|
|
||||||
// ProcessRequestTTL validates and update ttl requests.
|
// ProcessRequestTTL validates and update ttl requests.
|
||||||
func ProcessRequestTTL(req MetaHeader, cond ...TTLCondition) error {
|
func ProcessRequestTTL(req MetaHeader, cond ...TTLCondition) error {
|
||||||
var ttl = req.GetTTL()
|
ttl := req.GetTTL()
|
||||||
|
|
||||||
if ttl == ZeroTTL {
|
if ttl == ZeroTTL {
|
||||||
return status.New(codes.InvalidArgument, ErrZeroTTL.Error()).Err()
|
return status.New(codes.InvalidArgument, ErrZeroTTL.Error()).Err()
|
||||||
|
|
Binary file not shown.
|
@ -1,6 +1,6 @@
|
||||||
syntax = "proto3";
|
syntax = "proto3";
|
||||||
package service;
|
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";
|
import "github.com/gogo/protobuf/gogoproto/gogo.proto";
|
||||||
|
|
||||||
|
|
|
@ -4,9 +4,9 @@ import (
|
||||||
"crypto/ecdsa"
|
"crypto/ecdsa"
|
||||||
"sync"
|
"sync"
|
||||||
|
|
||||||
|
"github.com/nspcc-dev/neofs-api/internal"
|
||||||
|
"github.com/nspcc-dev/neofs-api/refs"
|
||||||
crypto "github.com/nspcc-dev/neofs-crypto"
|
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"
|
"github.com/pkg/errors"
|
||||||
)
|
)
|
||||||
|
|
||||||
|
|
Binary file not shown.
|
@ -1,6 +1,6 @@
|
||||||
syntax = "proto3";
|
syntax = "proto3";
|
||||||
package service;
|
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";
|
import "github.com/gogo/protobuf/gogoproto/gogo.proto";
|
||||||
|
|
||||||
|
|
|
@ -7,9 +7,9 @@ import (
|
||||||
"testing"
|
"testing"
|
||||||
|
|
||||||
"github.com/gogo/protobuf/proto"
|
"github.com/gogo/protobuf/proto"
|
||||||
|
"github.com/nspcc-dev/neofs-api/refs"
|
||||||
crypto "github.com/nspcc-dev/neofs-crypto"
|
crypto "github.com/nspcc-dev/neofs-crypto"
|
||||||
"github.com/nspcc-dev/neofs-crypto/test"
|
"github.com/nspcc-dev/neofs-crypto/test"
|
||||||
"github.com/nspcc-dev/neofs-proto/refs"
|
|
||||||
"github.com/pkg/errors"
|
"github.com/pkg/errors"
|
||||||
"github.com/stretchr/testify/require"
|
"github.com/stretchr/testify/require"
|
||||||
)
|
)
|
||||||
|
|
Binary file not shown.
|
@ -1,6 +1,6 @@
|
||||||
syntax = "proto3";
|
syntax = "proto3";
|
||||||
package service;
|
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/meta.proto";
|
||||||
import "service/verify.proto";
|
import "service/verify.proto";
|
||||||
|
|
|
@ -4,8 +4,8 @@ import (
|
||||||
"context"
|
"context"
|
||||||
"crypto/ecdsa"
|
"crypto/ecdsa"
|
||||||
|
|
||||||
|
"github.com/nspcc-dev/neofs-api/refs"
|
||||||
crypto "github.com/nspcc-dev/neofs-crypto"
|
crypto "github.com/nspcc-dev/neofs-crypto"
|
||||||
"github.com/nspcc-dev/neofs-proto/refs"
|
|
||||||
)
|
)
|
||||||
|
|
||||||
type (
|
type (
|
||||||
|
|
Binary file not shown.
|
@ -1,6 +1,6 @@
|
||||||
syntax = "proto3";
|
syntax = "proto3";
|
||||||
package session;
|
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 "session/types.proto";
|
||||||
import "service/meta.proto";
|
import "service/meta.proto";
|
||||||
|
|
|
@ -6,8 +6,8 @@ import (
|
||||||
"crypto/rand"
|
"crypto/rand"
|
||||||
"sync"
|
"sync"
|
||||||
|
|
||||||
|
"github.com/nspcc-dev/neofs-api/refs"
|
||||||
crypto "github.com/nspcc-dev/neofs-crypto"
|
crypto "github.com/nspcc-dev/neofs-crypto"
|
||||||
"github.com/nspcc-dev/neofs-proto/refs"
|
|
||||||
)
|
)
|
||||||
|
|
||||||
type simpleStore struct {
|
type simpleStore struct {
|
||||||
|
|
|
@ -5,8 +5,8 @@ import (
|
||||||
"crypto/rand"
|
"crypto/rand"
|
||||||
"testing"
|
"testing"
|
||||||
|
|
||||||
|
"github.com/nspcc-dev/neofs-api/refs"
|
||||||
crypto "github.com/nspcc-dev/neofs-crypto"
|
crypto "github.com/nspcc-dev/neofs-crypto"
|
||||||
"github.com/nspcc-dev/neofs-proto/refs"
|
|
||||||
"github.com/stretchr/testify/require"
|
"github.com/stretchr/testify/require"
|
||||||
)
|
)
|
||||||
|
|
||||||
|
@ -76,7 +76,8 @@ func TestTokenStore(t *testing.T) {
|
||||||
t1 = s.New(TokenParams{
|
t1 = s.New(TokenParams{
|
||||||
ObjectID: []ObjectID{oid},
|
ObjectID: []ObjectID{oid},
|
||||||
OwnerID: c.OwnerID,
|
OwnerID: c.OwnerID,
|
||||||
PublicKeys: pk})
|
PublicKeys: pk,
|
||||||
|
})
|
||||||
|
|
||||||
signToken(t, t1, c)
|
signToken(t, t1, c)
|
||||||
|
|
||||||
|
|
|
@ -5,10 +5,10 @@ import (
|
||||||
"encoding/binary"
|
"encoding/binary"
|
||||||
"sync"
|
"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"
|
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"
|
"github.com/pkg/errors"
|
||||||
)
|
)
|
||||||
|
|
||||||
|
@ -113,7 +113,7 @@ func (m *Token) Sign(key *ecdsa.PrivateKey) error {
|
||||||
}
|
}
|
||||||
|
|
||||||
// SetPublicKeys sets owner's public keys to the token
|
// SetPublicKeys sets owner's public keys to the token
|
||||||
func (m *Token) SetPublicKeys(keys... *ecdsa.PublicKey) {
|
func (m *Token) SetPublicKeys(keys ...*ecdsa.PublicKey) {
|
||||||
m.PublicKeys = m.PublicKeys[:0]
|
m.PublicKeys = m.PublicKeys[:0]
|
||||||
for i := range keys {
|
for i := range keys {
|
||||||
m.PublicKeys = append(m.PublicKeys, crypto.MarshalPublicKey(keys[i]))
|
m.PublicKeys = append(m.PublicKeys, crypto.MarshalPublicKey(keys[i]))
|
||||||
|
|
Binary file not shown.
|
@ -1,6 +1,6 @@
|
||||||
syntax = "proto3";
|
syntax = "proto3";
|
||||||
package session;
|
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";
|
import "github.com/gogo/protobuf/gogoproto/gogo.proto";
|
||||||
|
|
||||||
|
|
Binary file not shown.
|
@ -1,6 +1,6 @@
|
||||||
syntax = "proto3";
|
syntax = "proto3";
|
||||||
package state;
|
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/meta.proto";
|
||||||
import "service/verify.proto";
|
import "service/verify.proto";
|
||||||
|
|
|
@ -3,7 +3,7 @@ package storagegroup
|
||||||
import (
|
import (
|
||||||
"context"
|
"context"
|
||||||
|
|
||||||
"github.com/nspcc-dev/neofs-proto/refs"
|
"github.com/nspcc-dev/neofs-api/refs"
|
||||||
)
|
)
|
||||||
|
|
||||||
type (
|
type (
|
||||||
|
|
|
@ -7,8 +7,8 @@ import (
|
||||||
|
|
||||||
"github.com/gogo/protobuf/proto"
|
"github.com/gogo/protobuf/proto"
|
||||||
"github.com/mr-tron/base58"
|
"github.com/mr-tron/base58"
|
||||||
"github.com/nspcc-dev/neofs-proto/hash"
|
"github.com/nspcc-dev/neofs-api/hash"
|
||||||
"github.com/nspcc-dev/neofs-proto/refs"
|
"github.com/nspcc-dev/neofs-api/refs"
|
||||||
)
|
)
|
||||||
|
|
||||||
type (
|
type (
|
||||||
|
|
Binary file not shown.
|
@ -1,6 +1,6 @@
|
||||||
syntax = "proto3";
|
syntax = "proto3";
|
||||||
package storagegroup;
|
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";
|
import "github.com/gogo/protobuf/gogoproto/gogo.proto";
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue