Define `SysAttributeZoneDefault` constant for default zone in V2 code. Add
`SetNativeName` function which sets name with default zone.
Signed-off-by: Leonard Lyubich <leonard@nspcc.ru>
Implement `GetNativeNameWithZone` / `SetNativeNameWithZone` function which
gets / sets `__NEOFS_NAME` and `__NEOFS_ZONE` container attributes.
Signed-off-by: Leonard Lyubich <leonard@nspcc.ru>
Recompile NeoFS API protobuf files. Implement `NetworkParameter` and
`NetworkConfig` types. Expand `NetworkInfo` type with MillisecondsPerBlock
and `NetworkConfig`.
Signed-off-by: Leonard Lyubich <leonard@nspcc.ru>
There is a need to analyze some response information in API client.
Define `ResponseMetaInfo` structure of response information. Add
`WithResponseInfoHandler` client option which allows to set the response
info callback. The callback is called right after any response is received.
Signed-off-by: Leonard Lyubich <leonard@nspcc.ru>
Return `AnnounceIntermediateResultResponse` instead of
`AnnounceIntermediateResultRequest` from `rpc.AnnounceIntermediateResult`.
Signed-off-by: Leonard Lyubich <leonard@nspcc.ru>
Copy `Curve` field of `ecdsa.PublicKey` arg to `keys.PublicKey` instance in
`NEO3WalletFromPublicKey` function.
Signed-off-by: Leonard Lyubich <leonard@nspcc.ru>
According to specification, well-known object related filter keys for
extended ACL do not include `$Object:split.parent`.
Signed-off-by: Alex Vanin <alexey@nspcc.ru>
In the well-known BasicACL constants we need to set the always toggled
bits for the system group. Otherwise it may be confusing for those who
read the specification and try to match it with the reference
implementation or the resulting BasicACL set in the container.
Signed-off-by: Stanislav Bogatyrev <stanislav@nspcc.ru>
Create new `SessionTokenBody` instead of using one from the parameter in
order to prevent data corruption.
Signed-off-by: Leonard Lyubich <leonard@nspcc.ru>
There is a problem when containers with newer versions considered invalid by
Client. This does not allow receiving correct containers of new versions
through the client.
Fix the problem by turning off version check in `Client.GetContainer`.
Signed-off-by: Leonard Lyubich <leonard@nspcc.ru>
In latest NeoFS API changes `NodeInfo` message carries list of network
addresses. There is a need
Add `SetAddresses` / `IterateAddresses` / `NumberOfAddresses` methods to
provide the access to node's address group. Mark `Address` / `SetAddress`
methods as deprecated.
Signed-off-by: Leonard Lyubich <leonard@nspcc.ru>
Fix failure to comply with a requirement of stdlib `io.Reader` docs: `When
Read encounters an error or end-of-file condition after successfully reading
n > 0 bytes, it returns the number of bytes read.`
Prepare a platform for unit tests and test the affected case.
Signed-off-by: Leonard Lyubich <leonard@nspcc.ru>
Implement `String` / `FromString` method pair in all levels of enum
definitions. From now `String()` returns canonical protojson-compatible
values.
Signed-off-by: Leonard Lyubich <leonard@nspcc.ru>
Define `ReaderHandler` type. Add `GetObjectParams.WithPayloadReaderHandler`
method which accepts `ReaderHandler`. The handler is called right after
header receipt in `Client.GetObject`. After the handler is called,
`GetObject` returns object header immediately.
Signed-off-by: Leonard Lyubich <leonard@nspcc.ru>
Move all memory allocation and field settings
in `Generate...(empty bool)` functions behind
`if !empty` check.
Signed-off-by: Pavel Karpy <carpawell@nspcc.ru>
Move all memory allocation and field settings
in `Generate...(empty bool)` functions behind
`if !empty` check.
Signed-off-by: Pavel Karpy <carpawell@nspcc.ru>
Move all memory allocation and field settings
in `Generate...(empty bool)` functions behind
`if !empty` check. Do not create empty slices
if `empty == true`.
Signed-off-by: Pavel Karpy <carpawell@nspcc.ru>
Move all memory allocation and field settings
in `Generate...(empty bool)` functions behind
`if !empty` check. Do not create empty slices
if `empty == true`.
Signed-off-by: Pavel Karpy <carpawell@nspcc.ru>
Move all memory allocation and field settings
in `Generate...(empty bool)` functions behind
`if !empty` check. Do not create empty slices
if `empty == true`.
Signed-off-by: Pavel Karpy <carpawell@nspcc.ru>
Move all memory allocation and field settings
in `Generate...(empty bool)` functions behind
`if !empty` check. Do not create empty slices
if `empty == true`.
Signed-off-by: Pavel Karpy <carpawell@nspcc.ru>
Move all memory allocation and field settings
in `Generate...(empty bool)` functions behind
`if !empty` check. Do not create empty slices
if `empty == true`.
Signed-off-by: Pavel Karpy <carpawell@nspcc.ru>
Move all memory allocation and field settings
in `Generate...(empty bool)` functions behind
`if !empty` check.
Signed-off-by: Pavel Karpy <carpawell@nspcc.ru>
Move all memory allocation and field settings
in `Generate...(empty bool)` functions behind
`if !empty` check. Do not create empty slices
if `empty == true`.
Signed-off-by: Pavel Karpy <carpawell@nspcc.ru>