Current `go:generate` command was, probably, executed only on my laptop.
Replace it with explicit version, because package in the generated code
depends on in.
Signed-off-by: Evgenii Stratonikov <e.stratonikov@yadro.com>
In previous implementation of `Client.Dial` there was no ability to
specify parent context (e.g. global application context).
Add `PrmDial.SetContext` method which accepts optional base dial
context. Use the context to open client connection or fall back to using
`context.Background()`.
Upgraded version of `github.com/nspcc-dev/neofs-api-go/v2` module
also fixes the problem when dial timeout didn't work properly.
Signed-off-by: Leonard Lyubich <ctulhurider@gmail.com>
Rename `LimitByObject` method of the `session.Object` type to
`LimitByObjects` and make it to accept variadic parameter.
Signed-off-by: Leonard Lyubich <ctulhurider@gmail.com>
`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>
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>
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>
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>
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>
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>