Commit graph

231 commits

Author SHA1 Message Date
Leonard Lyubich
f8018f9c3d [#241] v2/session: Define keys of the well-known X-headers
Signed-off-by: Leonard Lyubich <leonard@nspcc.ru>
2021-01-11 18:43:42 +03:00
Alex Vanin
aafeb70bdb [#235] v2/audit: Regenerate protobuf
Signed-off-by: Alex Vanin <alexey@nspcc.ru>
2020-12-25 16:20:34 +03:00
Alex Vanin
1c25c3904b [#234] Update audit result struct definition
Signed-off-by: Alex Vanin <alexey@nspcc.ru>
2020-12-25 16:20:34 +03:00
Leonard Lyubich
9986a4ecd1 [#233] Implement data audit result type with basic methods
Signed-off-by: Leonard Lyubich <leonard@nspcc.ru>
2020-12-25 16:20:34 +03:00
Leonard Lyubich
3039aa20c7 [#233] v2/refs: Implement converters for object ID list type
Signed-off-by: Leonard Lyubich <leonard@nspcc.ru>
2020-12-25 16:20:34 +03:00
Leonard Lyubich
eaa99af2b2 Recompile protobuf files with neofs-api yeouido
Signed-off-by: Leonard Lyubich <leonard@nspcc.ru>
2020-12-25 16:20:29 +03:00
Leonard Lyubich
53e2756762 [#231] object: Implement string encode/decode methods on Type
Signed-off-by: Leonard Lyubich <leonard@nspcc.ru>
2020-12-25 16:20:26 +03:00
Leonard Lyubich
8fe135ab8c [#229] v2/object: Add hash fields to ShortHeader message
Signed-off-by: Leonard Lyubich <leonard@nspcc.ru>
2020-12-25 16:20:26 +03:00
Leonard Lyubich
b2528d4c59 Recompile protobuf files with neofs-api yeouido
Signed-off-by: Leonard Lyubich <leonard@nspcc.ru>
2020-12-25 16:20:19 +03:00
Leonard Lyubich
adb681878b Recompile protobuf files from neofs-api v2.1.1
Signed-off-by: Leonard Lyubich <leonard@nspcc.ru>
2020-12-18 16:29:16 +03:00
Leonard Lyubich
2aa51d3add v2/object: Fix NPE in SplitInfo.GetObject
Signed-off-by: Leonard Lyubich <leonard@nspcc.ru>
2020-12-11 14:48:27 +03:00
Leonard Lyubich
4567986682 [#226] v2/object: Add tombstone field to DeleteResponseBody
Signed-off-by: Leonard Lyubich <leonard@nspcc.ru>
2020-12-10 18:26:23 +03:00
Leonard Lyubich
6037a26a35 [#226] v2/tombstone: Implement unified message structure with methods
Signed-off-by: Leonard Lyubich <leonard@nspcc.ru>
2020-12-10 18:26:23 +03:00
Leonard Lyubich
2f3e5742d3 [#226] v2/grpc: Re-compile protobuf definitions
Add compiled tombstone message. Extend Object.DeleteResponse.Body with
tombstone address field.

Signed-off-by: Leonard Lyubich <leonard@nspcc.ru>
2020-12-10 18:26:23 +03:00
Alex Vanin
ded06674ac [#225] v2/object: Support more SplitInfo structures
- SplitInfo structure in object.HeadResponse
- SplitInfo structure in object.GetRangeResponse
- Raw flag in object.GetRangeRequest

Signed-off-by: Alex Vanin <alexey@nspcc.ru>
2020-12-08 10:23:27 +03:00
Alex Vanin
42cd897b25 [#225] v2/object: Update GRPC files from neofs-api
Signed-off-by: Alex Vanin <alexey@nspcc.ru>
2020-12-08 10:23:27 +03:00
Alex Vanin
28aad71860 [#225] Do not use wrappers on oneof object.HeadResponse types
Signed-off-by: Alex Vanin <alexey@nspcc.ru>
2020-12-08 10:23:27 +03:00
Alex Vanin
b683dbe7e6 [#218] pkg/object: Add marshal operations for SplitInfo
Signed-off-by: Alex Vanin <alexey@nspcc.ru>
2020-12-03 16:09:38 +03:00
Alex Vanin
1fdeca84e1 [#218] Support SplitInfo structure
Signed-off-by: Alex Vanin <alexey@nspcc.ru>
2020-12-03 16:09:38 +03:00
Alex Vanin
3d08d8140f [#209] object: Support splitID search attribute
Signed-off-by: Alex Vanin <alexey@nspcc.ru>
2020-11-26 11:56:30 +03:00
Alex Vanin
79c76e87e4 [#209] object: Remove childfree search attribute
Signed-off-by: Alex Vanin <alexey@nspcc.ru>
2020-11-26 11:56:30 +03:00
Alex Vanin
b9778464b9 [#209] v2/object: Add splitID to unified structure
* Add getters/setters
* Support stable marshaling
* Support converters

Signed-off-by: Alex Vanin <alexey@nspcc.ru>
2020-11-26 11:56:30 +03:00
Alex Vanin
d441193952 [#209] v2/object: Recompile GRPC files and add SplitID setter
Signed-off-by: Alex Vanin <alexey@nspcc.ru>
2020-11-26 11:56:30 +03:00
Leonard Lyubich
03ac6bedb4 [#205] v2/client: Replace WithGRPCDialContext option with WithDialTimeout
There is a need to set dial timeout in v2 client that is used in case of
internal connection opening. Add DialTimeout option constructor to support
this feature. Remove unused and no longer needed WithGRPCDialContext
function.

Signed-off-by: Leonard Lyubich <leonard@nspcc.ru>
2020-11-23 14:15:42 +03:00
Leonard Lyubich
55948c2ab1 [#168] storageGroup: Implement binary/JSON encoders/decoders on SG
Signed-off-by: Leonard Lyubich <leonard@nspcc.ru>
2020-11-13 18:07:26 +03:00
Leonard Lyubich
6456fcf8fa [#168] session: Implement binary/JSON encoders/decoders on ResponseVerify
Signed-off-by: Leonard Lyubich <leonard@nspcc.ru>
2020-11-13 18:07:26 +03:00
Leonard Lyubich
edf6ec05b3 [#168] session: Implement binary/JSON encoders/decoders on ResponseMeta
Signed-off-by: Leonard Lyubich <leonard@nspcc.ru>
2020-11-13 18:07:26 +03:00
Leonard Lyubich
986bc1b0ea [#168] session: Implement binary/JSON encoders/decoders on RequestVerify
Signed-off-by: Leonard Lyubich <leonard@nspcc.ru>
2020-11-13 18:07:26 +03:00
Leonard Lyubich
8f8e977a3e [#168] session: Implement binary/JSON encoders/decoders on RequestMeta
Signed-off-by: Leonard Lyubich <leonard@nspcc.ru>
2020-11-13 18:07:26 +03:00
Leonard Lyubich
7e3e9e1cba [#168] session: Implement binary/JSON encoders/decoders on XHeader
Signed-off-by: Leonard Lyubich <leonard@nspcc.ru>
2020-11-13 18:07:26 +03:00
Leonard Lyubich
85d4713348 [#168] session: Implement binary/JSON encoders/decoders on SessionToken
Signed-off-by: Leonard Lyubich <leonard@nspcc.ru>
2020-11-13 18:07:26 +03:00
Leonard Lyubich
4e163617d1 [#168] session: Implement binary/JSON encoders/decoders on TokenBody
Signed-off-by: Leonard Lyubich <leonard@nspcc.ru>
2020-11-13 18:07:26 +03:00
Leonard Lyubich
20bf21e5e4 [#168] session: Implement binary/JSON encoders/decoders on TokenLifetime
Signed-off-by: Leonard Lyubich <leonard@nspcc.ru>
2020-11-13 18:07:26 +03:00
Leonard Lyubich
86351a8f90 [#168] session: Implement binary/JSON encoders/decoders on SessionContext
Signed-off-by: Leonard Lyubich <leonard@nspcc.ru>
2020-11-13 18:07:26 +03:00
Leonard Lyubich
93df2fd765 [#168] refs: Implement binary/JSON encoders/decoders on Checksum
Signed-off-by: Leonard Lyubich <leonard@nspcc.ru>
2020-11-13 18:07:26 +03:00
Leonard Lyubich
4b55b06780 [#168] refs: Implement binary/JSON encoders/decoders on Signature
Signed-off-by: Leonard Lyubich <leonard@nspcc.ru>
2020-11-13 18:07:26 +03:00
Leonard Lyubich
1519a02d63 [#168] refs: Implement binary/JSON encoders/decoders on Version
Signed-off-by: Leonard Lyubich <leonard@nspcc.ru>
2020-11-13 18:07:26 +03:00
Leonard Lyubich
9ec57ee9f8 [#168] refs: Implement binary/JSON encoders/decoders on OwnerID
Signed-off-by: Leonard Lyubich <leonard@nspcc.ru>
2020-11-13 18:07:26 +03:00
Leonard Lyubich
c0f3ac51d4 [#168] refs: Implement binary/JSON encoders/decoders on ContainerID
Signed-off-by: Leonard Lyubich <leonard@nspcc.ru>
2020-11-13 18:07:26 +03:00
Leonard Lyubich
7289ff6c64 [#168] refs: Implement binary/JSON encoders/decoders on ObjectID
Signed-off-by: Leonard Lyubich <leonard@nspcc.ru>
2020-11-13 18:07:26 +03:00
Leonard Lyubich
4ce751f13c [#168] refs: Implement binary/JSON encoders/decoders on Address
Signed-off-by: Leonard Lyubich <leonard@nspcc.ru>
2020-11-13 18:07:26 +03:00
Leonard Lyubich
9325e22871 [#168] object: Implement binary/JSON encoders/decoders on Object
Signed-off-by: Leonard Lyubich <leonard@nspcc.ru>
2020-11-13 18:07:26 +03:00
Leonard Lyubich
9cdd14841a [#168] object: Implement binary/JSON encoders/decoders on HeaderWithSig
Signed-off-by: Leonard Lyubich <leonard@nspcc.ru>
2020-11-13 18:07:26 +03:00
Leonard Lyubich
b8f86f1a60 [#168] object: Implement binary/JSON encoders/decoders on Header
Signed-off-by: Leonard Lyubich <leonard@nspcc.ru>
2020-11-13 18:07:26 +03:00
Leonard Lyubich
78374caa41 [#168] object: Implement binary/JSON encoders/decoders on SplitHeader
Signed-off-by: Leonard Lyubich <leonard@nspcc.ru>
2020-11-13 18:07:26 +03:00
Leonard Lyubich
0caff85fb7 [#168] object: Implement binary/JSON encoders/decoders on Attribute
Signed-off-by: Leonard Lyubich <leonard@nspcc.ru>
2020-11-13 18:07:26 +03:00
Leonard Lyubich
ce0d70fa02 [#168] object: Implement binary/JSON encoders/decoders on ShortHeader
Signed-off-by: Leonard Lyubich <leonard@nspcc.ru>
2020-11-13 18:07:26 +03:00
Leonard Lyubich
a684da6118 [#168] container: Implement binary/JSON encoders/decoders on Container
Signed-off-by: Leonard Lyubich <leonard@nspcc.ru>
2020-11-13 18:07:26 +03:00
Leonard Lyubich
bc5d9dcce5 [#168] container: Implement binary/JSON encoders/decoders on Attribute
Signed-off-by: Leonard Lyubich <leonard@nspcc.ru>
2020-11-13 18:07:26 +03:00
Leonard Lyubich
ec957be60c [#168] acl: Implement binary/JSON encoders/decoders on BearerToken
Signed-off-by: Leonard Lyubich <leonard@nspcc.ru>
2020-11-13 18:07:26 +03:00
Leonard Lyubich
d8fa8df442 [#168] acl: Implement binary/JSON encoders/decoders on BearerTokenBody
Signed-off-by: Leonard Lyubich <leonard@nspcc.ru>
2020-11-13 18:07:26 +03:00
Leonard Lyubich
0f4d5d5f1e [#168] acl: Implement binary/JSON encoders/decoders on TokenLifetime
Signed-off-by: Leonard Lyubich <leonard@nspcc.ru>
2020-11-13 18:07:26 +03:00
Leonard Lyubich
233756ca8f [#168] acl: Implement binary/JSON encoders/decoders on Table
Signed-off-by: Leonard Lyubich <leonard@nspcc.ru>
2020-11-13 18:07:26 +03:00
Leonard Lyubich
ae68790bbd [#168] acl: Implement binary/JSON encoders/decoders on Record
Signed-off-by: Leonard Lyubich <leonard@nspcc.ru>
2020-11-13 18:07:26 +03:00
Leonard Lyubich
9ddc4c1f48 [#168] acl: Implement binary/JSON encoders/decoders on Target
Signed-off-by: Leonard Lyubich <leonard@nspcc.ru>
2020-11-13 18:07:26 +03:00
Leonard Lyubich
7f42156201 [#168] acl: Implement binary/JSON encoders/decoders on HeaderFilter
Signed-off-by: Leonard Lyubich <leonard@nspcc.ru>
2020-11-13 18:07:26 +03:00
Leonard Lyubich
9bebc1247d [#168] accounting: Implement binary/JSON encoders/decoders on Decimal
Signed-off-by: Leonard Lyubich <leonard@nspcc.ru>
2020-11-13 18:07:26 +03:00
Leonard Lyubich
e721734599 [#168] netmap: Implement binary and JSON encoders/decoders on Filter
Signed-off-by: Leonard Lyubich <leonard@nspcc.ru>
2020-11-13 18:07:26 +03:00
Alex Vanin
7894749060 [#192] v2/netmap: Fix client error messages
Signed-off-by: Alex Vanin <alexey@nspcc.ru>
2020-11-11 14:07:01 +03:00
Alex Vanin
abed8a9156 [#191] v2: Add ObjectID filters for ACL and Object packages
Signed-off-by: Alex Vanin <alexey@nspcc.ru>
2020-11-11 10:35:34 +03:00
Alex Vanin
91eade02cd [#191] v2/object: Rename leaf filter to phy
Signed-off-by: Alex Vanin <alexey@nspcc.ru>
2020-11-11 10:35:34 +03:00
Alex Vanin
ef31dec43a [#191] Recompile latest neofs-api repository
Signed-off-by: Alex Vanin <alexey@nspcc.ru>
2020-11-11 10:35:34 +03:00
Alex Vanin
e4d94bbe03 [#186] v2/netmap: Add JSON converter for placement policy
Signed-off-by: Alex Vanin <alexey@nspcc.ru>
2020-11-05 10:38:04 +03:00
Alex Vanin
352e99d9b9 [#185] v2: Return errors in JSON converters
Signed-off-by: Alex Vanin <alexey@nspcc.ru>
2020-10-29 10:15:28 +03:00
Leonard Lyubich
6b54019148 [#182] v2/object: Define boolean property values
Signed-off-by: Leonard Lyubich <leonard@nspcc.ru>
2020-10-28 14:11:49 +03:00
Leonard Lyubich
309c39481e [#182] v2/acl: Define filter keys for object headers
Signed-off-by: Leonard Lyubich <leonard@nspcc.ru>
2020-10-28 14:11:49 +03:00
Leonard Lyubich
31b1bed5d7 [#182] v2/object: Define reserved search filter keys
Signed-off-by: Leonard Lyubich <leonard@nspcc.ru>
2020-10-28 14:11:49 +03:00
Leonard Lyubich
dc9fcd5d98 [#182] Rename methods to match updated field names
Signed-off-by: Leonard Lyubich <leonard@nspcc.ru>
2020-10-28 14:11:49 +03:00
Leonard Lyubich
5be034ab80 [#182] Regenerate proto-compiled files
Signed-off-by: Leonard Lyubich <leonard@nspcc.ru>
2020-10-28 14:11:49 +03:00
Leonard Lyubich
ad0b01e892 [#172] Improve the readability of named attribute constants
Signed-off-by: Leonard Lyubich <leonard@nspcc.ru>
2020-10-22 19:15:45 +03:00
Leonard Lyubich
342eeb47a8 [#172] v2/object: Define well-known system attributes
Signed-off-by: Leonard Lyubich <leonard@nspcc.ru>
2020-10-22 19:15:45 +03:00
Leonard Lyubich
634f7e92e8 [#172] v2/container: Define well-known system attributes
Signed-off-by: Leonard Lyubich <leonard@nspcc.ru>
2020-10-22 19:15:45 +03:00
Alex Vanin
c8f46f7d97 [#178] v2: Print default values in JSON
Signed-off-by: Alex Vanin <alexey@nspcc.ru>
2020-10-20 18:24:48 +03:00
Alex Vanin
e6035a3249 [#172] v2: Use protojson package
Signed-off-by: Alex Vanin <alexey@nspcc.ru>
2020-10-20 13:45:14 +03:00
Alex Vanin
8351c78f58 [#172] Use protobuf v2 API for go
Signed-off-by: Alex Vanin <alexey@nspcc.ru>
2020-10-20 13:45:14 +03:00
Alex Vanin
b681b28e33 [#172] v2/netmap: Add JSON converter for node info
Signed-off-by: Alex Vanin <alexey@nspcc.ru>
2020-10-20 13:45:14 +03:00
Alex Vanin
2e1096200e [#172] v2/container: Add JSON converter for container
Signed-off-by: Alex Vanin <alexey@nspcc.ru>
2020-10-20 13:45:14 +03:00
Alex Vanin
cb188e63b7 [#172] v2/acl: Add JSON converters for EACL and bearer token
Signed-off-by: Alex Vanin <alexey@nspcc.ru>
2020-10-20 13:45:14 +03:00
Alex Vanin
5f6720f456 [#172] v2/acl: Rename target keyList field to keys
According to new neofs-api target filed `key_list`
rename to `keys`.

Signed-off-by: Alex Vanin <alexey@nspcc.ru>
2020-10-20 13:45:14 +03:00
Alex Vanin
80b7033606 [#172] Update neofs-api with rich docs and JSON attributes
Signed-off-by: Alex Vanin <alexey@nspcc.ru>
2020-10-20 13:45:14 +03:00
Alex Vanin
a29b615522 [#166] v2/netmap: add v2 structures for netmap service
Signed-off-by: Alex Vanin <alexey@nspcc.ru>
2020-10-08 15:38:57 +03:00
Alex Vanin
81975017b2 sdk/v2: Remove unused marshallers
All default marshallers defined on unified structure
in `v2` package

Signed-off-by: Alex Vanin <alexey@nspcc.ru>
2020-09-21 17:56:22 +03:00
Alex Vanin
f21cecfc43 sdk/v2: Fix typo found by golangci-lint
Signed-off-by: Alex Vanin <alexey@nspcc.ru>
2020-09-21 17:56:22 +03:00
Alex Vanin
790add6538 [#139] v2/object: Fix string conversion errors for go1.15
Signed-off-by: Alex Vanin <alexey@nspcc.ru>
2020-09-18 10:45:11 +03:00
Alex Vanin
182a3af9b8 [#139] v2/acl: Rename TargetInfo to Target
Corresponds with proto definition.

Signed-off-by: Alex Vanin <alexey@nspcc.ru>
2020-09-18 10:45:11 +03:00
Alex Vanin
581cb2d2ba [#138] v2/object: Update to neofs-api jindo release
Signed-off-by: Alex Vanin <alexey@nspcc.ru>
2020-09-18 10:45:11 +03:00
Alex Vanin
c0cc4a4374 [#138] v2/netmap: Update to neofs-api jindo release
Signed-off-by: Alex Vanin <alexey@nspcc.ru>
2020-09-18 10:45:11 +03:00
Alex Vanin
59f804faa2 [#136] v2/acl: Fix record stable size 2020-09-18 10:45:11 +03:00
Alex Vanin
148618b5b3 [#134] v2/netmap: Update unified structures
Signed-off-by: Alex Vanin <alexey@nspcc.ru>
2020-09-18 10:45:11 +03:00
Alex Vanin
505ef59dd6 [#134] v2/netmap: Regenerate proto files
Signed-off-by: Alex Vanin <alexey@nspcc.ru>
2020-09-18 10:45:11 +03:00
Alex Vanin
94c4e05aa2 [#134] v2/netmap: Remove prototype of stable marshaller
Signed-off-by: Alex Vanin <alexey@nspcc.ru>
2020-09-18 10:45:11 +03:00
Alex Vanin
7a6c5eac1e [#134] v2/acl: Update unified structures
Signed-off-by: Alex Vanin <alexey@nspcc.ru>
2020-09-18 10:45:11 +03:00
Alex Vanin
09cc2a5037 [#134] v2/acl: Regenerate proto files
Signed-off-by: Alex Vanin <alexey@nspcc.ru>
2020-09-18 10:45:11 +03:00
Leonard Lyubich
e222c441e5 [#132] v2/object: Implement stable unmarshaler on Object
Signed-off-by: Leonard Lyubich <leonard@nspcc.ru>
2020-09-18 10:45:11 +03:00
Leonard Lyubich
104604acae [#132] v2/refs: Implement stable unmarshaler on Address
Signed-off-by: Leonard Lyubich <leonard@nspcc.ru>
2020-09-18 10:45:11 +03:00
Alex Vanin
edd0004b93 [#129] v2: Add unified structure for NodeInfo
Signed-off-by: Alex Vanin <alexey@nspcc.ru>
2020-09-18 10:45:11 +03:00
Alex Vanin
ac0d57cc9b [#129] v2: Regenerate NodeInfo struct from API
Signed-off-by: Alex Vanin <alexey@nspcc.ru>
2020-09-18 10:45:11 +03:00
Alex Vanin
10137b44dd [#126] v2: make stable marshal wrapper public
This wrapper can be used outside of v2 packages to
use SignDataWithHandler function. This function uses
DataSource interface and this wrapper implements
this interface based on stable marshal structures.

Signed-off-by: Alex Vanin <alexey@nspcc.ru>
2020-09-18 10:45:11 +03:00
Alex Vanin
86d56086e3 Rename unified client constructors
Client constructor `New` will be used as `package.New()`
in external packages. This definition is not very clear
since it can create new structure or new client or whatever.
`package.NewClient()` is quite unambiguous.

Signed-off-by: Alex Vanin <alexey@nspcc.ru>
2020-09-18 10:45:08 +03:00
Leonard Lyubich
55a6509e8f v2: Define API service interfaces
Define interfaces that reflect service (Accounting, Container, Session)
declarations in the API.

Signed-off-by: Leonard Lyubich <leonard@nspcc.ru>
2020-09-18 10:44:39 +03:00