Commit graph

249 commits

Author SHA1 Message Date
Leonard Lyubich
3844a3ac74 [#342] v2/reputation: Fix incorrect return of AnnounceIntermediateResult
Return `AnnounceIntermediateResultResponse` instead of
`AnnounceIntermediateResultRequest` from `rpc.AnnounceIntermediateResult`.

Signed-off-by: Leonard Lyubich <leonard@nspcc.ru>
2021-09-28 18:15:29 +03:00
Alex Vanin
86df0eac93 [#333] v2/acl: Remove FilterObjectParent constant
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>
2021-08-26 18:37:16 +03:00
Pavel Karpy
e6cd9c48ed [#331] v2/object: Add COMMON_PREFIX v2 matchtype enum constant
Signed-off-by: Pavel Karpy <carpawell@nspcc.ru>
2021-08-26 18:37:03 +03:00
Pavel Karpy
de3242d867 [#331] v2/object: Sync method name and its commentary
Signed-off-by: Pavel Karpy <carpawell@nspcc.ru>
2021-08-26 18:37:03 +03:00
Pavel Karpy
5b3860e3d9 [#331] v2/object: Recompile proto files
Add new enum matchtype `COMMON_PREFIX` to object.

Signed-off-by: Pavel Karpy <carpawell@nspcc.ru>
2021-08-26 18:37:03 +03:00
Leonard Lyubich
07fcaa4ba5 [#312] netmap: Support multiple addresses in NodeInfo
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>
2021-06-23 17:52:43 +03:00
Leonard Lyubich
616b4b71a1 [#310] *: Implement string converters for enumerations
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>
2021-06-23 10:24:32 +03:00
Pavel Karpy
86d446f54c [#307] v2/tombstone/test: Do not allocate memory if !empty
Move all memory allocation and field settings
in `Generate...(empty bool)` functions behind
`if !empty` check.

Signed-off-by: Pavel Karpy <carpawell@nspcc.ru>
2021-06-16 10:12:50 +03:00
Pavel Karpy
9dfc7e7fe9 [#307] v2/storagegroup/test: Do not allocate memory if !empty
Move all memory allocation and field settings
in `Generate...(empty bool)` functions behind
`if !empty` check.

Signed-off-by: Pavel Karpy <carpawell@nspcc.ru>
2021-06-16 10:12:50 +03:00
Pavel Karpy
383edb1be4 [#307] v2/session/test: Do not allocate memory if !empty
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>
2021-06-16 10:12:50 +03:00
Pavel Karpy
704d16c6c6 [#307] v2/refs/test: Do not allocate memory if !empty
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>
2021-06-16 10:12:50 +03:00
Pavel Karpy
192382dbfc [#307] v2/object/test: Do not allocate memory if !empty
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>
2021-06-16 10:12:50 +03:00
Pavel Karpy
dd3cbd95e9 [#307] v2/netmap/test: Do not allocate memory if !empty
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>
2021-06-16 10:12:50 +03:00
Pavel Karpy
44dafcf0e5 [#307] v2/container/test: Do not allocate memory if !empty
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>
2021-06-16 10:12:50 +03:00
Pavel Karpy
772c8be200 [#307] v2/audit/test: Do not allocate memory if !empty
Move all memory allocation and field settings
in `Generate...(empty bool)` functions behind
`if !empty` check.

Signed-off-by: Pavel Karpy <carpawell@nspcc.ru>
2021-06-16 10:12:50 +03:00
Pavel Karpy
e15dd105fe [#307] v2/acl/test: Do not allocate memory if !empty
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>
2021-06-16 10:12:50 +03:00
Pavel Karpy
51f20a76c5 [#307] v2/accounting/test: Do not allocate memory if !empty
Move all memory allocation and field settings
in `Generate...(empty bool)` functions behind
`if !empty` check.

Signed-off-by: Pavel Karpy <carpawell@nspcc.ru>
2021-06-16 10:12:50 +03:00
Pavel Karpy
176be8ead1 [#307] v2/reputation/test: Do not allocate memory if !empty
Move all memory allocation and field settings
in `Generate...(empty bool)` functions behind
`if !empty` check.

Signed-off-by: Pavel Karpy <carpawell@nspcc.ru>
2021-06-16 10:12:50 +03:00
Leonard Lyubich
c2ab4398d5 Update *.pb.go files and changelog for v1.27.0 release
Signed-off-by: Leonard Lyubich <leonard@nspcc.ru>
2021-06-03 16:58:38 +03:00
Leonard Lyubich
d8f85e80c9 [#283] v2/container/test: Add setting of new fields in generators
Set signature and session token in `GenerateGetResponseBody`. Set session
token in `GenerateGetExtendedACLResponseBody`.

Signed-off-by: Leonard Lyubich <leonard@nspcc.ru>
2021-05-26 12:24:58 +03:00
Leonard Lyubich
a4cf8df829 [#283] v2/container: Add missing testing of eACL-related messages
Signed-off-by: Leonard Lyubich <leonard@nspcc.ru>
2021-05-26 12:24:58 +03:00
Leonard Lyubich
92e8376f39 [#283] v2/container: Add session token and signature to response bodies
Add field of type `session.SessionToken` to `GetResponseBody` and
`GetExtendedACLResponseBody` messages. Add field of type `refs,Signature` to
`GetResponseBody` message. Change the implementation of all related methods.

Signed-off-by: Leonard Lyubich <leonard@nspcc.ru>
2021-05-26 12:24:58 +03:00
Leonard Lyubich
dac997b8c3 [#283] v2/container/grpc: Implement setters of new fields
Implement `SetSessionToken` / `SetSignature` setters on `GetResponse_Body`.
Implement `SetSessionToken` setter on `GetExtendedACLResponse_Body`.

Signed-off-by: Leonard Lyubich <leonard@nspcc.ru>
2021-05-26 12:24:58 +03:00
Leonard Lyubich
9eb567a53a [#283] v2/session: Support ContainerSessionContext message
Define `ContainerSessionContext` structure, implement getters / setters,
JSON and binary encoders, gRPC converters. Support new type of context in
SessionTokenBody message. Add test message generator and cover methods with
unit tests.

Signed-off-by: Leonard Lyubich <leonard@nspcc.ru>
2021-05-26 12:24:58 +03:00
Leonard Lyubich
f2be7509d3 [#283] v2/session/grpc: Implement setters on container session messages
Implement `SessionToken_Body.SetContainerSessionContext` method. Implement
field setters on `ContainerSessionContext`.

Signed-off-by: Leonard Lyubich <leonard@nspcc.ru>
2021-05-26 12:24:58 +03:00
Leonard Lyubich
8d60b2cdd5 [#283] v2/session/grpc: Fix docs of ObjectSessionContext methods
Fix docs of `SetVerb` and `SetAddress` methods of `ObjectSessionContext`.

Signed-off-by: Leonard Lyubich <leonard@nspcc.ru>
2021-05-26 12:24:58 +03:00
Leonard Lyubich
af2a9d0851 [#283] v2/grpc: Compile source files with container session context
Signed-off-by: Leonard Lyubich <leonard@nspcc.ru>
2021-05-26 12:24:58 +03:00
Evgenii Stratonikov
9ddfcdfbba [#277] go.mod: remove pkg/errors
Use stdlib `errors` instead.

Signed-off-by: Evgenii Stratonikov <evgeniy@nspcc.ru>
2021-05-19 11:14:56 +03:00
Alex Vanin
099347d3bc Synchronize namings with NeoFS API v2.6.0
Signed-off-by: Alex Vanin <alexey@nspcc.ru>
2021-05-07 15:11:18 +03:00
Pavel Karpy
bb217067f4 [#275] reputation/convert: Add nil check
In `SendIntermediateResultRequestBody`
add nil check for `trust` field.
If true, allocate new `PeerToPeerTrust`.

Signed-off-by: Pavel Karpy <carpawell@nspcc.ru>
2021-04-27 10:46:37 +03:00
Pavel Karpy
541a56aae1 [#274] reputation: Adapt converters and encoding methods on messages
Signed-off-by: Pavel Karpy <carpawell@nspcc.ru>
2021-04-22 13:37:07 +03:00
Pavel Karpy
1076478b29 [#274] reputation: Recompile proto files
Signed-off-by: Pavel Karpy <carpawell@nspcc.ru>
2021-04-22 13:37:07 +03:00
Leonard Lyubich
269288119d [#265] v2/reputation: Support PeerToPeerTrust message
Signed-off-by: Leonard Lyubich <leonard@nspcc.ru>
2021-04-09 11:57:42 +03:00
Leonard Lyubich
710d1994a4 [#265] v2/rpc: Add SendIntermediateResult RPC
Signed-off-by: Leonard Lyubich <leonard@nspcc.ru>
2021-04-02 15:57:59 +03:00
Leonard Lyubich
35567afd11 [#265] v2/signature: Support SendIntermediateResult request and response
Signed-off-by: Leonard Lyubich <leonard@nspcc.ru>
2021-04-02 15:57:59 +03:00
Leonard Lyubich
ccae5a40ba [#265] reputation: Implement converters and encoding methods on messages
Signed-off-by: Leonard Lyubich <leonard@nspcc.ru>
2021-04-02 15:57:59 +03:00
Leonard Lyubich
8ce1c5efcc [#265] reputation: Implement generators of new RPC messages
Signed-off-by: Leonard Lyubich <leonard@nspcc.ru>
2021-04-02 15:57:59 +03:00
Leonard Lyubich
46b3feabe1 [#265] reputation: Define structures of protobuf messages
Define Go structures of `SendIntermediateResult` RPC-related messages from
reputation package of NeoFS API. Implement getters and setters of message
fields.

Signed-off-by: Leonard Lyubich <leonard@nspcc.ru>
2021-04-02 15:57:59 +03:00
Leonard Lyubich
ca2e272d42 [#265] reputation/grpc: Implement setters on generated messages
Signed-off-by: Leonard Lyubich <leonard@nspcc.ru>
2021-04-02 15:57:59 +03:00
Leonard Lyubich
948cf3f174 [#265] reputation: Compile protobuf files with new RPC
Signed-off-by: Leonard Lyubich <leonard@nspcc.ru>
2021-04-02 15:57:59 +03:00
Leonard Lyubich
51d443c6fc [#265] v2/rpc: Add SendLocalTrust RPC
Signed-off-by: Leonard Lyubich <leonard@nspcc.ru>
2021-03-25 11:20:34 +03:00
Leonard Lyubich
1766228cfd [#265] v2/signature: Support SendLocalTrust request and response
Signed-off-by: Leonard Lyubich <leonard@nspcc.ru>
2021-03-25 11:20:34 +03:00
Leonard Lyubich
3adfdc5005 [#265] reputation: Implement converters and encoding methods on messages
Signed-off-by: Leonard Lyubich <leonard@nspcc.ru>
2021-03-25 11:20:34 +03:00
Leonard Lyubich
101d14d405 [#265] reputation: Implement test package with message generators
Signed-off-by: Leonard Lyubich <leonard@nspcc.ru>
2021-03-25 11:20:34 +03:00
Leonard Lyubich
40505a523d [#265] reputation: Define structures of protobuf messages
Define Go structures of all messages from reputation package of NeoFs API.
Implement getters and setters of message fields.

Signed-off-by: Leonard Lyubich <leonard@nspcc.ru>
2021-03-25 11:20:34 +03:00
Leonard Lyubich
5b33eaec36 [#265] reputation/grpc: Implement setters on generated messages
Signed-off-by: Leonard Lyubich <leonard@nspcc.ru>
2021-03-25 11:20:34 +03:00
Leonard Lyubich
1039cd6963 [#265] reputation: Compile protobuf files
Signed-off-by: Leonard Lyubich <leonard@nspcc.ru>
2021-03-25 11:20:34 +03:00
Leonard Lyubich
1031f3122e [#263] v2: Support new rpc library
Implement `message.Message` interface on all structures and use new methods
for conversion instead of functions. make `Unmarshal` and JSON methods to
use encoding functions from `message` library. Remove all per-service
clients and implement `rpc` library of the functions which execute NeoFS API
RPC through new RPC client. Remove no longer used gRPC per-service clients.

Signed-off-by: Leonard Lyubich <leonard@nspcc.ru>
2021-03-17 14:03:49 +03:00
Alex Vanin
471c7e0df9 v2: Regenerate protobuf files
Protobuf definition has updated import path for C#
library and new well-known object K-V header.

Signed-off-by: Alex Vanin <alexey@nspcc.ru>
2021-03-15 13:27:28 +03:00
Alex Vanin
a4d52c2d23 Recompile NeoFS API proto definitions
Signed-off-by: Alex Vanin <alexey@nspcc.ru>
2021-02-26 16:43:05 +03:00