Commit graph

76 commits

Author SHA1 Message Date
Leonard Lyubich
fb8daf80fc Upgrade NeoFS API Go module to v2.12.0
Signed-off-by: Leonard Lyubich <leonard@nspcc.ru>
2022-03-05 17:38:16 +03:00
Leonard Lyubich
a292150d42 [#157] signature: Change scheme selection
`SignData`: use `ECDSAWithSHA512` by default. `SignWithRFC6979` option
switches the scheme to `RFC6979WithSHA256`.

`VerifyData`: if scheme is not fixed (like by `SignWithRFC6979` option)
then scheme from the message is processed.

Signed-off-by: Leonard Lyubich <leonard@nspcc.ru>
2022-03-03 09:39:21 +03:00
Leonard Lyubich
4fba1af6aa Upgrade to NeoFS API Go v2.12.0
Use new types instead of the deprecated ones.

Signed-off-by: Leonard Lyubich <leonard@nspcc.ru>
2022-02-25 11:31:15 +03:00
Pavel Karpy
e791793253 [#143] go.mod: Update api-go library
Signed-off-by: Pavel Karpy <carpawell@nspcc.ru>
2022-02-22 19:34:51 +03:00
Leonard Lyubich
0fb22361a3 [#127] apistatus: Support WRONG_MAGIC_NUMBER status
Define `WrongMagicNumber` type for which encapsulates the work with
incorrect network magic. Provide method to read/write the correct magic
(which is a status detail in NeoFS API V2 protocol).

Signed-off-by: Leonard Lyubich <leonard@nspcc.ru>
2022-02-01 17:02:58 +03:00
Leonard Lyubich
49a17a7159 [#119] client: Configure network magic
In the latest NeoFS protocol update, each request is provided with a
network magic number. We have to provide the ability to set it on
the client.

Add `WithNetworkMagic` option constructor which accepts magic number.
Write the number to meta header of the all requests.

Signed-off-by: Leonard Lyubich <leonard@nspcc.ru>
2022-01-14 14:48:29 +03:00
Alex Vanin
f7582399ed [#107] client: Provide RWTimeout option
Signed-off-by: Alex Vanin <alexey@nspcc.ru>
2021-12-28 15:59:21 +03:00
Denis Kirillov
a2572a23a3 [#93] Return NNS resolver
Signed-off-by: Denis Kirillov <denis@nspcc.ru>
2021-12-14 15:27:04 +03:00
Leonard Lyubich
a5b61c4f64 [#96] Downgrade github.com/golang/mock module version
Downgrade `gomock` dependency to `v1.5.0` in order to import latest SDK
library to `neo-go`. Later version `v1.6.0` upgrades `golang
.org/x/tools` module which break Neo Go compiler (see neo-go#2086).

Signed-off-by: Leonard Lyubich <leonard@nspcc.ru>
2021-12-01 21:24:51 +03:00
Pavel Karpy
471ed5a3ec [#95] go.mod: Update api-go/v2 package.
Signed-off-by: Pavel Karpy <carpawell@nspcc.ru>
2021-12-01 16:55:01 +03:00
Leonard Lyubich
b8989e3abb [#79] Implement type for subnet ID
Create `subnet` package. Define `ID` type of subnet identifiers.
Implement encoding and support NeoFS API V2 protocol. Provide method to
init instance from integer. Implement function which checks if `ID`
instance refers to zero subnet.

Signed-off-by: Leonard Lyubich <leonard@nspcc.ru>
2021-11-25 13:04:24 +03:00
Leonard Lyubich
9dcff95a29 [#83] client: Implement status library
Define base `Status` interface. Provide the functionality to distinguish
success and failure returns. Provide functionality to transport statuses
over NeoFS API V2 protocol. Support success `OK` and failure `INTERNAL`
returns.

Signed-off-by: Leonard Lyubich <leonard@nspcc.ru>
2021-11-23 13:03:40 +03:00
Evgenii Stratonikov
a2d342e928 [#87] go.mod: remove neo-go dependency
Signed-off-by: Evgenii Stratonikov <evgeniy@nspcc.ru>
2021-11-22 15:40:13 +03:00
Evgenii Stratonikov
d821f18b7d [#88] nns: temporarily remove nns resolver
Signed-off-by: Evgenii Stratonikov <evgeniy@nspcc.ru>
2021-11-22 15:40:13 +03:00
Denis Kirillov
02f328a03c [#11] Add dns, nns resolver
Signed-off-by: Denis Kirillov <denis@nspcc.ru>
2021-11-22 10:40:21 +03:00
Denis Kirillov
818f38b811 [#38] Replace gcache with golang-lru
Signed-off-by: Denis Kirillov <denis@nspcc.ru>
2021-11-15 14:04:06 +03:00
Denis Kirillov
c651a714fd [#38] Add session token cache
Signed-off-by: Denis Kirillov <denis@nspcc.ru>
2021-11-15 14:04:06 +03:00
Evgenii Stratonikov
1bd89bf797 [#42] go.mod: update neofs-api-go
Signed-off-by: Evgenii Stratonikov <evgeniy@nspcc.ru>
2021-10-28 14:50:33 +03:00
Denis Kirillov
9d2c7d9a04 [#16] Update neo-go version
Signed-off-by: Denis Kirillov <denis@nspcc.ru>
2021-07-26 15:23:27 +03:00
Denis Kirillov
edc1382178 [#16] Add pool tests with mock node
Signed-off-by: Denis Kirillov <denis@nspcc.ru>
2021-07-20 11:02:14 +03:00
Angira Kekteeva
317d4400a5 [#24] Update api-go vesion to 1.28.3
Signed-off-by: Angira Kekteeva <kira@nspcc.ru>
2021-07-07 17:20:36 +03:00
Leonard Lyubich
0aa14a6d82 [#23] Update NeoFS API Go library to v1.28.2
Release includes fix of session token corruption by `Client`.
2021-07-06 12:22:51 +03:00
Evgenii Stratonikov
3aeeafe79e [#3] policy: use ANTLRv4 parser generator
Signed-off-by: Evgenii Stratonikov <evgeniy@nspcc.ru>
2021-06-15 11:42:14 +03:00
Roman Khimov
cecb5e052d go.mod: update neofs-api-go to v1.27.0
Builds fine.

Signed-off-by: Roman Khimov <roman@nspcc.ru>
2021-06-03 17:41:27 +03:00
Angira Kekteeva
d62b4534db [#4] *: Add new imports for added pkgs
Signed-off-by: Angira Kekteeva <kira@nspcc.ru>
2021-05-25 14:35:50 +03:00
Angira Kekteeva
3ef4b2c4cf [nspcc-dev/neofs-node#166] *: Add project files
Create Makefile, go.mod, .golangci.yml.
Add coverage and IDE entries to .gitignore

Signed-off-by: Angira Kekteeva <kira@nspcc.ru>
2021-05-20 23:57:51 +03:00