Leonard Lyubich
5395988efc
[ #208 ] pkg/client: Add function to get container and verify ID
...
GetContainer method reads container structure by identifier from the
network. In some cases it is required to additionally check the
correspondence of the container structure to the identifier as a hash from
the binary representation. To do this, a new function
GetVerifiedContainerStructure is defined to execute the check after
receiving the container.
Signed-off-by: Leonard Lyubich <leonard@nspcc.ru>
2020-12-17 14:52:04 +03:00
Leonard Lyubich
1bc91466aa
sdk/client: Fix setter of objectAddressWriter structure value
...
Signed-off-by: Leonard Lyubich <leonard@nspcc.ru>
2020-12-11 11:19:45 +03:00
Leonard Lyubich
803c91b3eb
[ #226 ] sdk/client: Add tombstone address to the return of DeleteObject
...
Signed-off-by: Leonard Lyubich <leonard@nspcc.ru>
2020-12-10 18:26:23 +03:00
Alex Vanin
139660c6ff
[ #225 ] pkg/client: Update object methods
...
- Support errors with SplitInfo in head and range methods.
- Support raw flat in range method.
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
6db6b569e0
[ #223 ] pkg/client: Add getters for object params
...
Signed-off-by: Alex Vanin <alexey@nspcc.ru>
2020-12-03 18:07:42 +03:00
Alex Vanin
664ebfd8a7
[ #218 ] pkg/client: Add raw flag for object.Head
...
Signed-off-by: Alex Vanin <alexey@nspcc.ru>
2020-12-03 16:09:38 +03:00
Alex Vanin
582cdd4ba3
[ #218 ] pkg/client: Add raw flag for object.Get
...
Signed-off-by: Alex Vanin <alexey@nspcc.ru>
2020-12-03 16:09:38 +03:00
Alex Vanin
e11b1728be
[ #218 ] pkg/object: Define custom error 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
Leonard Lyubich
8c99d9d54c
[ #207 ] sdk/client: Implement GetEACLWithSignature method
...
GetEACL method of Client receives eACL table with signature, verifies the
signature and return the table. In some cases we need to receive table and
signature regardless of their correctness. New method GetEACLWithSignature
provides such an opportunity.
Signed-off-by: Leonard Lyubich <leonard@nspcc.ru>
2020-11-24 15:16:42 +03:00
Leonard Lyubich
3ebfef9f94
[ #207 ] sdk/client: Fix signature verification in GetEACL method
...
Extended ACL tables should be signed with RFC-6979 standard. Fix Client
.GetEACL implementation to verify eACL signature with SignRFC6979 option.
Signed-off-by: Leonard Lyubich <leonard@nspcc.ru>
2020-11-24 15:16:42 +03:00
Leonard Lyubich
5ee500bb43
[ #205 ] sdk/client: Support option to set dial timeout
...
There is a need to set dial timeout in SDK client that is used in case of
internal connection opening. Add DialTimeout option constructor to support
this feature.
Signed-off-by: Leonard Lyubich <leonard@nspcc.ru>
2020-11-23 14:15:42 +03:00
Alex Vanin
9ceba98198
[ #202 ] pkg/client: Fix signature check in object header getter
...
According to API object.Head response contains signature of
object ID rather than signature of object header itself.
Signed-off-by: Alex Vanin <alexey@nspcc.ru>
2020-11-17 16:23:44 +03:00
Leonard Lyubich
0620a3b1eb
[ #199 ] sdk/client: Correct linter's remarks
...
Signed-off-by: Leonard Lyubich <leonard@nspcc.ru>
2020-11-16 18:51:14 +03:00
Leonard Lyubich
7611c218e3
[ #199 ] sdk/client: Verify eACL table signature in GetEACL method
...
Signed-off-by: Leonard Lyubich <leonard@nspcc.ru>
2020-11-16 18:51:14 +03:00
Leonard Lyubich
3097059f85
[ #199 ] sdk/client: Verify header signature in GetObjectHeader method
...
Signed-off-by: Leonard Lyubich <leonard@nspcc.ru>
2020-11-16 18:51:14 +03:00
Leonard Lyubich
fe336fd5ba
[ #198 ] sdk/client: Use XHeader type
...
Signed-off-by: Leonard Lyubich <leonard@nspcc.ru>
2020-11-16 12:44:37 +03:00
Leonard Lyubich
5f5e5ac5dd
[ #197 ] sdk/object: Rename getters of Attribute and Object types
...
Signed-off-by: Leonard Lyubich <leonard@nspcc.ru>
2020-11-16 11:52:21 +03:00
Leonard Lyubich
67bcf6eb4d
[ #197 ] sdk/object: Rename getters of Address type
...
Signed-off-by: Leonard Lyubich <leonard@nspcc.ru>
2020-11-16 11:52:21 +03:00
Leonard Lyubich
2bcbd48972
[ #197 ] sdk: Rename getters of Version type
...
Signed-off-by: Leonard Lyubich <leonard@nspcc.ru>
2020-11-16 11:52:21 +03:00
Leonard Lyubich
52fae76533
[ #168 ] sdk/accounting: Refactor Decimal type
...
Signed-off-by: Leonard Lyubich <leonard@nspcc.ru>
2020-11-13 18:07:26 +03:00
Alex Vanin
874a4b937f
[ #193 ] pkg/client: Fix error message typos
...
Signed-off-by: Alex Vanin <alexey@nspcc.ru>
2020-11-13 12:28:00 +03:00
Alex Vanin
d442b204ca
[ #193 ] pkg/client: Update container structure
...
Signed-off-by: Alex Vanin <alexey@nspcc.ru>
2020-11-13 12:28:00 +03:00
Leonard Lyubich
162b0de725
[ #189 ] sdk/client: Return NodeInfo SDK type from EndpointInfo method
...
Signed-off-by: Leonard Lyubich <leonard@nspcc.ru>
2020-11-06 09:28:50 +03:00
Leonard Lyubich
53697081ce
[ #189 ] sdk: Fix type conflicts after netmap package refactoring
...
Signed-off-by: Leonard Lyubich <leonard@nspcc.ru>
2020-11-06 09:28:50 +03:00
Leonard Lyubich
2b171e1617
[ #188 ] sdk: Implement Epoch method
...
Implement Epoch method on Client that receives epoch number through Netmap
.LocalNodeInfo call.
Signed-off-by: Leonard Lyubich <leonard@nspcc.ru>
2020-11-05 09:58:21 +03:00
Leonard Lyubich
7f0f42bc30
[ #180 ] sdk/client: Set session token field in all requests
...
Signed-off-by: Leonard Lyubich <leonard@nspcc.ru>
2020-10-28 12:15:49 +03:00
Leonard Lyubich
b2ba0eef07
[ #180 ] sdk/client: Implement methods that attach tokens to Client
...
Signed-off-by: Leonard Lyubich <leonard@nspcc.ru>
2020-10-28 12:15:49 +03:00
Leonard Lyubich
805ad54f41
[ #180 ] sdk/client: Make defaultOptions func a Client method
...
Signed-off-by: Leonard Lyubich <leonard@nspcc.ru>
2020-10-28 12:15:49 +03:00
Alex Vanin
2aa40b0dd3
[ #177 ] sdk/client: Set version of new EACL table
...
Signed-off-by: Alex Vanin <alexey@nspcc.ru>
2020-10-20 15:35:41 +03:00
Alex Vanin
7b3736567c
[ #169 ] sdk/client: Do not resign session token
...
In some cases SDK Client provided with signed and prepared
session token. In this case we don't need to change verb
or sign it.
Signed-off-by: Alex Vanin <alexey@nspcc.ru>
2020-10-14 21:09:56 +03:00
Alex Vanin
d3e3889425
[ #167 ] sdk/client: Add endpoint info getter
...
Adds support of new netmap service to the SDK client.
Signed-off-by: Alex Vanin <alexey@nspcc.ru>
2020-10-09 09:15:34 +03:00
Leonard Lyubich
2cc58e36f8
[ #160 ] sdk/client: Set object identifier in Head result
...
Signed-off-by: Leonard Lyubich <leonard@nspcc.ru>
2020-09-25 17:37:44 +03:00
Alex Vanin
c814cc62fa
[ #158 ] pkg/client: Ignore EOF on buffer copy in object.Put
...
There is a issue when user sends payload chunk to the neofs
node, but node closes connection earlier, e.g. node can return
error as soon as it checked ACL permission and denied request.
In this case client will receive EOF error and it produces
`could not send payload bytes to Put object stream` error, but
in fact there is different error.
If we ignore EOF there then `stream.CloseAndRecv()` return
correct error message later.
Signed-off-by: Alex Vanin <alexey@nspcc.ru>
2020-09-25 15:58:40 +03:00
Leonard Lyubich
d19e5418da
[ #159 ] sdk: Define object range in object pkg
...
Define Range type in object package. Replace Range in client package with
the new one.
Signed-off-by: Leonard Lyubich <leonard@nspcc.ru>
2020-09-25 15:58:24 +03:00
Alex Vanin
59033d330d
[ #143 ] sdk/client: Add call option to set bearer token
...
Signed-off-by: Alex Vanin <alexey@nspcc.ru>
2020-09-18 10:45:11 +03:00
Leonard Lyubich
0259a06783
[ #150 ] sdk/token: Add owner ID
...
Signed-off-by: Leonard Lyubich <leonard@nspcc.ru>
2020-09-18 10:45:11 +03:00
Alex Vanin
73220620c5
[ #148 ] sdk/client: Support object search rpc
...
Signed-off-by: Alex Vanin <alexey@nspcc.ru>
2020-09-18 10:45:11 +03:00
Alex Vanin
5fa271e141
[ #144 ] sdk/client: Add call option to set session token
...
Signed-off-by: Alex Vanin <alexey@nspcc.ru>
2020-09-18 10:45:11 +03:00
Alex Vanin
3783133173
[ #144 ] sdk/client: Add RPC to create session token
...
Signed-off-by: Alex Vanin <alexey@nspcc.ru>
2020-09-18 10:45:11 +03:00
Alex Vanin
15f803119b
[ #139 ] sdk/client: Support EACL in RPC client
...
Signed-off-by: Alex Vanin <alexey@nspcc.ru>
2020-09-18 10:45:11 +03:00
Alex Vanin
3c7c363002
[ #142 ] sdk/container: Add converters to and from v2
...
Signed-off-by: Alex Vanin <alexey@nspcc.ru>
2020-09-18 10:45:11 +03:00
Alex Vanin
012cea1add
[ #142 ] sdk/container: Use placement policy from neofs-api v2.0
...
Signed-off-by: Alex Vanin <alexey@nspcc.ru>
2020-09-18 10:45:11 +03:00
Leonard Lyubich
644a21edca
[ #141 ] sdk/client: Fix object operations
...
Signed-off-by: Leonard Lyubich <leonard@nspcc.ru>
2020-09-18 10:45:11 +03:00
Leonard Lyubich
e0c34a51f2
[ #140 ] sdk: Refactor version type
...
Signed-off-by: Leonard Lyubich <leonard@nspcc.ru>
2020-09-18 10:45:11 +03:00
Leonard Lyubich
524280a5e8
[ #140 ] sdk: Refactor reference types
...
Refactor v2-compatible reference types to be wrappers over corresponding
types from v2.
Signed-off-by: Leonard Lyubich <leonard@nspcc.ru>
2020-09-18 10:45:11 +03:00
Alex Vanin
efbf73b775
[ #138 ] sdk/object: Fix head request
...
Now head request returns full header with signature.
Signed-off-by: Alex Vanin <alexey@nspcc.ru>
2020-09-18 10:45:11 +03:00
Leonard Lyubich
b19e3a48db
[ #135 ] sdk/client: Implement object operations
...
Signed-off-by: Leonard Lyubich <leonard@nspcc.ru>
2020-09-18 10:45:11 +03:00
Alex Vanin
de505ddee9
[ #133 ] sdk: Use cid wrapper to sign container delete request
...
StableMarshalerWrapper is not suitable for container delete
request, because it signs marshaled structure of container id.
As for delete request, container id itself should be signed.
Signed-off-by: Alex Vanin <alexey@nspcc.ru>
2020-09-18 10:45:11 +03:00