Evgenii Baidakov
e2a88bc258
client: Remove status returning from processResponse function
...
Signed-off-by: Evgenii Baidakov <evgenii@nspcc.io>
2023-05-23 14:49:36 +04:00
Evgenii Baidakov
f9d740487a
client: Replace panics with errors
...
Signed-off-by: Evgenii Baidakov <evgenii@nspcc.io>
2023-05-19 14:45:48 +04:00
Evgenii Baidakov
cb4acec6a2
client: Remove MissingContext panic
...
Signed-off-by: Evgenii Baidakov <evgenii@nspcc.io>
2023-05-19 14:30:01 +04:00
Evgenii Baidakov
e377b3b4f6
*: Remove statusRes as unused
...
Fixes #405
Signed-off-by: Evgenii Baidakov <evgenii@nspcc.io>
2023-05-19 12:21:15 +04:00
Evgenii Baidakov
2f45caf8a5
client: Remove ResolveNeoFSFailures
...
Signed-off-by: Evgenii Baidakov <evgenii@nspcc.io>
2023-05-19 12:19:19 +04:00
Evgenii Baidakov
04ea0e8f6a
client: Accept rng object.Range into PrmObjectRange
...
Signed-off-by: Evgenii Baidakov <evgenii@nspcc.io>
2023-05-05 12:17:21 +04:00
Evgenii Baidakov
3f603dc8eb
client: Accept oid.Address into PrmObjectHash, PrmObjectDelete, PrmObjectGet
...
close #404
Signed-off-by: Evgenii Baidakov <evgenii@nspcc.io>
2023-05-05 12:17:12 +04:00
Evgenii Baidakov
64c0612bdc
:* Replace ecdsa.PrivateKey with neofscrypto.Signer
...
Signed-off-by: Evgenii Baidakov <evgenii@nspcc.io>
2023-04-26 14:59:21 +04:00
Evgenii Baidakov
570a628462
:* Replace signature package from neofs-api-go
...
close #219 , #155
Signed-off-by: Evgenii Baidakov <evgenii@nspcc.io>
2023-04-26 14:54:12 +04:00
Evgenii Stratonikov
f75a5feba3
[ #334 ] client: Use parameter key in object.Get
...
Signed-off-by: Evgenii Stratonikov <evgeniy@nspcc.ru>
2022-09-14 11:34:56 +04:00
Evgenii Stratonikov
ee92df3203
[ #326 ] client: Sign message in object.GetRange
'
...
Signed-off-by: Evgenii Stratonikov <evgeniy@nspcc.ru>
2022-08-29 14:45:50 +03:00
Evgenii Stratonikov
cf7bee3087
[ #326 ] client: Provide pointers requests for signing
...
Signed-off-by: Evgenii Stratonikov <evgeniy@nspcc.ru>
2022-08-29 14:45:50 +03:00
Evgenii Stratonikov
0e4d07fb06
[ #323 ] client: Remove xheaders length check in a common helper
...
Signed-off-by: Evgenii Stratonikov <evgeniy@nspcc.ru>
2022-08-26 17:34:27 +03:00
Evgenii Stratonikov
724d30db1a
[ #323 ] client: Refactor object.Get
...
Signed-off-by: Evgenii Stratonikov <evgeniy@nspcc.ru>
2022-08-26 17:34:27 +03:00
Evgenii Stratonikov
1f593d0fb2
[ #323 ] client: Refactor object.GetRange
...
Signed-off-by: Evgenii Stratonikov <evgeniy@nspcc.ru>
2022-08-26 17:34:27 +03:00
Evgenii Stratonikov
dd5826d071
[ #323 ] client: Refactor object.Head
...
Signed-off-by: Evgenii Stratonikov <evgeniy@nspcc.ru>
2022-08-26 17:34:27 +03:00
Evgenii Stratonikov
02bc2bc236
[ #323 ] client: Unify parameter processing for Get* methods
...
Signed-off-by: Evgenii Stratonikov <evgeniy@nspcc.ru>
2022-08-26 17:34:27 +03:00
Evgenii Stratonikov
992b26a3ff
[ #323 ] client: Form meta header during parameter initialization
...
Unify with other client methods.
Signed-off-by: Evgenii Stratonikov <evgeniy@nspcc.ru>
2022-08-26 17:34:27 +03:00
Evgenii Stratonikov
a926e5a1de
[ #323 ] client: Replace writeToMetaHeader
method with function
...
Signed-off-by: Evgenii Stratonikov <evgeniy@nspcc.ru>
2022-08-26 17:34:27 +03:00
Evgenii Stratonikov
0236b03fa7
[ #323 ] client: Use constant for error message
...
Signed-off-by: Evgenii Stratonikov <evgeniy@nspcc.ru>
2022-08-26 17:34:27 +03:00
Evgenii Stratonikov
2f843de3ed
[ #323 ] client: Remove initCallContextWithoutKey
...
Signed-off-by: Evgenii Stratonikov <evgeniy@nspcc.ru>
2022-08-26 17:34:27 +03:00
Evgenii Stratonikov
84888854ab
[ #322 ] *: Go fmt -s
...
go1.19 rewrites comments to proper render them in docs.
Signed-off-by: Evgenii Stratonikov <evgeniy@nspcc.ru>
2022-08-24 18:58:59 +03:00
Pavel Karpy
df6538c68c
[ #282 ] apistatus: Support OUT_OF_RANGE
error
...
Signed-off-by: Pavel Karpy <carpawell@nspcc.ru>
2022-07-05 11:53:29 +03:00
Leonard Lyubich
6994eb0e55
[ #222 ] client: Fix docs of resolving the failure statuses
...
Signed-off-by: Leonard Lyubich <leonard@nspcc.ru>
2022-07-05 11:43:38 +03:00
Leonard Lyubich
552c7875bf
[ #197 ] session: Refactor and document the package
...
Signed-off-by: Leonard Lyubich <leonard@nspcc.ru>
2022-04-27 11:09:29 +03:00
Pavel Karpy
f7172adf18
[ #170 ] oid, cid: Refactor and document package functionality
...
Signed-off-by: Pavel Karpy <carpawell@nspcc.ru>
2022-04-13 17:32:25 +03:00
Alex Vanin
27cd721422
[ #170 ] bearer: Add docs, refactor
...
Signed-off-by: Alex Vanin <alexey@nspcc.ru>
2022-04-13 11:24:15 +03:00
Leonard Lyubich
22dad0573d
[ #164 ] client: Refactor and document package functionality
...
Get rid of `Option` pattern. Define `Init`, `Dial` and `Close` methods
for the corresponding stages of use.
Signed-off-by: Leonard Lyubich <leonard@nspcc.ru>
2022-03-10 15:02:10 +03:00
Leonard Lyubich
70c3644e2b
[ #139 ] object: Deprecate RawObject
type and everything related
...
From now `Object` type should be used directly.
Signed-off-by: Leonard Lyubich <leonard@nspcc.ru>
2022-03-03 15:08:36 +03:00
Leonard Lyubich
529c4d1c2a
[ #160 ] client: Support request X-Headers
...
Add `WithXHeaders` method to all `Client` operations.
Signed-off-by: Leonard Lyubich <leonard@nspcc.ru>
2022-03-03 14:56:20 +03:00
Leonard Lyubich
2a0b7b6b40
[ #140 ] client: Specify status errors of Client
methods
...
Extend docs with supported status returns. Add several helper functions
which allow to check the particular status.
Signed-off-by: Leonard Lyubich <leonard@nspcc.ru>
2022-03-02 18:27:08 +03:00
Leonard Lyubich
b5874778e9
[ #149 ] client: Fix false io.ErrUnexpectedEOF
return
...
In previous implementation `Close` method of `ObjectReader` /
`ObjectRangeReader` could incorrectly return `io.ErrUnexpectedEOF` of
payload wasn't read by `Read` method (in this case
`remainingPayloadLen` state var is not updated).
Return `io.ErrUnexpectedEOF` from `Read` method only.
Signed-off-by: Leonard Lyubich <leonard@nspcc.ru>
2022-02-24 15:59:09 +03:00
Leonard Lyubich
2adbe29f7f
[ #149 ] client: Fill buffer completely when reading stream data
...
In previous implementation all `Read` methods read single response
per-call, so buffer could be incompletely filled w/o an error. In order
to follow `io.Reader` docs we need to continue filling the buffer while
it is possible.
Signed-off-by: Leonard Lyubich <leonard@nspcc.ru>
2022-02-24 15:59:09 +03:00
Leonard Lyubich
e1c73fd43d
[ #146 ] client: Customize private key in object HEAD/DELETE
...
We should provide the ability to customize private of object HEAD /
DELETE ops.
Implement `UseKey` method on `PrmObjectHead` / `PrmObjectDelete` types.
Sign requests with the specified key if called.
Signed-off-by: Leonard Lyubich <leonard@nspcc.ru>
2022-02-21 15:21:37 +03:00
Leonard Lyubich
b0f7f75929
[ #131 ] client: Add GetFullObject
helper function
...
Add helper function which accepts container and object identifiers and
returns object instance read to the memory.
Signed-off-by: Leonard Lyubich <leonard@nspcc.ru>
2022-02-18 17:01:08 +03:00
Leonard Lyubich
32458baeb7
[ #131 ] client: Fix false io.ErrUnexpectedEOF
return in readers
...
Signed-off-by: Leonard Lyubich <leonard@nspcc.ru>
2022-02-18 17:01:08 +03:00
Leonard Lyubich
d889ab3022
[ #131 ] client: Remove redundant else
branch
...
Signed-off-by: Leonard Lyubich <leonard@nspcc.ru>
2022-02-18 17:01:08 +03:00
Leonard Lyubich
b557aa0e2d
[ #131 ] client: Add docs to io.Reader
implementations
...
Signed-off-by: Leonard Lyubich <leonard@nspcc.ru>
2022-02-18 17:01:08 +03:00
Leonard Lyubich
a0cbc3d8be
[ #131 ] client: Return io.ErrUnexpectedEOF
on cut object payload
...
Make `ObjectReader` / `ObjectRangeReader` to track number of bytes read
and return:
* `io.ErrUnexpectedEOF` if the stream finished by the server before
the last byte of the payload was read.
* an error if more object payload size bytes was read.
Signed-off-by: Leonard Lyubich <leonard@nspcc.ru>
2022-02-18 17:01:08 +03:00
Leonard Lyubich
ff4febff6f
[ #131 ] client: Re-implement Object.Range method
...
Signed-off-by: Leonard Lyubich <leonard@nspcc.ru>
2022-02-18 17:01:08 +03:00
Leonard Lyubich
caf31a928c
[ #131 ] client: Re-implement Object.Head method
...
Signed-off-by: Leonard Lyubich <leonard@nspcc.ru>
2022-02-18 17:01:08 +03:00
Leonard Lyubich
2624347d9b
[ #131 ] client: Change interface of object PUT and GET ops
...
Signed-off-by: Leonard Lyubich <leonard@nspcc.ru>
2022-02-18 17:01:08 +03:00