Commit graph

575 commits

Author SHA1 Message Date
LeL
5f07bcfec2
Drop subnet support (#420) 2023-05-24 18:47:22 +04:00
Roman Khimov
4d4c5fc70c
Revise apistatus funcs (#419)
close #417
2023-05-24 14:55:28 +03:00
Evgenii Baidakov
e7a5728d6b
client: Rename FromStatusV2 to ErrorFromV2, ToStatusV2 to ErrorToV2
Signed-off-by: Evgenii Baidakov <evgenii@nspcc.io>
2023-05-24 13:41:58 +04:00
Roman Khimov
74cd2b12d1
Check signer type where appropriate (#418) 2023-05-23 18:46:59 +03:00
Evgenii Baidakov
26c1b26eec
client: Use error in FromStatusV2, ToStatusV2 functions
Signed-off-by: Evgenii Baidakov <evgenii@nspcc.io>
2023-05-23 14:56:40 +04:00
Evgenii Baidakov
22ff96ad44
client: Remove status.Status type
Signed-off-by: Evgenii Baidakov <evgenii@nspcc.io>
2023-05-23 14:49:46 +04:00
Evgenii Baidakov
277b8f7de4
client: Remove ErrFromStatus function
Signed-off-by: Evgenii Baidakov <evgenii@nspcc.io>
2023-05-23 14:49:46 +04:00
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
b9ec85e5e3
status: Remove IsSuccessful and ErrToStatus functions
Signed-off-by: Evgenii Baidakov <evgenii@nspcc.io>
2023-05-23 07:36:32 +04:00
Roman Khimov
de560d7424 *: drop subnet support
We don't need them and while there are reason to have some remnants in the
protocol itself we can remove them from the SDK immediately to not include
them into the 1.0.0 release.

Refs. nspcc-dev/neofs-api#261.

Signed-off-by: Roman Khimov <roman@nspcc.ru>
2023-05-22 22:46:41 +03:00
Roman Khimov
e99e9537a2 *: demand RFC6979 signer where appropriate
It's needed for container operations, therefore default ones for client and
pool have to be of this type as well. And it's easier to check for it before
usage.

Fixes #209.

Signed-off-by: Roman Khimov <roman@nspcc.ru>
2023-05-22 17:30:52 +03:00
Roman Khimov
2e18c3c16d client: replace client.Init() with New()
We'll need to check initialization parameters for consistency and Init doesn't
return any error, therefore it's easier to use smth.New() pattern and simplify
things a bit because uninited Client is not very useful anyway (we require
Init and there can be additional reasons for that in the future).

Refs. #164.

Signed-off-by: Roman Khimov <roman@nspcc.ru>
2023-05-22 17:03:10 +03:00
Roman Khimov
4e1390763a *: specify RFC6979 signer as mandatory where appropriate
Refs. #209.

Signed-off-by: Roman Khimov <roman@nspcc.ru>
2023-05-22 16:50:53 +03:00
Roman Khimov
7002b3b0df
Return errors instead of panic (#414)
close #390
2023-05-19 14:58:58 +03:00
Evgenii Baidakov
d1bcce5f79
client: Make MissingField error exported
Signed-off-by: Evgenii Baidakov <evgenii@nspcc.io>
2023-05-19 14:45:50 +04:00
Evgenii Baidakov
4b0c67ea7a
*: Update documentation
Signed-off-by: Evgenii Baidakov <evgenii@nspcc.io>
2023-05-19 14:45:50 +04:00
Evgenii Baidakov
4fe5e6022d
slicer: Replace panics with errors
Signed-off-by: Evgenii Baidakov <evgenii@nspcc.io>
2023-05-19 14:45:49 +04:00
Evgenii Baidakov
5dec2b49b0
client: Replace panics with errors in sign logic
Signed-off-by: Evgenii Baidakov <evgenii@nspcc.io>
2023-05-19 14:45:49 +04:00
Evgenii Baidakov
ef887b3ab1
client: Replace panics with errors in dial
Signed-off-by: Evgenii Baidakov <evgenii@nspcc.io>
2023-05-19 14:45:49 +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
8094342b1c
user: Add exported error for user extracting from key
Signed-off-by: Evgenii Baidakov <evgenii@nspcc.io>
2023-05-19 14:30:02 +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
Roman Khimov
cfdd870755
Drop ResolveNeoFSFailures (#413)
close #406 
fixes #405
2023-05-19 12:13:24 +03:00
Evgenii Baidakov
49bc3b7202
pool: Refactor handleError to updateErrorRate
Signed-off-by: Evgenii Baidakov <evgenii@nspcc.io>
2023-05-19 12:21:16 +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
e0afe0807c
client: Fix error checking for go 1.18-19
Should be reverted/updated when minimum version of Go will be set to 1.20

Signed-off-by: Evgenii Baidakov <evgenii@nspcc.io>
2023-05-19 12:19:20 +04:00
Evgenii Baidakov
a4e14ab35b
client: Fix linter - unused parameter
Signed-off-by: Evgenii Baidakov <evgenii@nspcc.io>
2023-05-19 12:19:19 +04:00
Evgenii Baidakov
9e1079723e
client: Fix linter - unnecessary leading newline
Signed-off-by: Evgenii Baidakov <evgenii@nspcc.io>
2023-05-19 12:19:19 +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
548f911195
client: Update documentation
Signed-off-by: Evgenii Baidakov <evgenii@nspcc.io>
2023-05-19 12:19:18 +04:00
Evgenii Baidakov
149b145073
client: Extend tests for apistatuses
Signed-off-by: Evgenii Baidakov <evgenii@nspcc.io>
2023-05-19 12:19:18 +04:00
Evgenii Baidakov
1d952ced4e
client: Replace apistatus type check with error check
Signed-off-by: Evgenii Baidakov <evgenii@nspcc.io>
2023-05-19 10:33:09 +04:00
Evgenii Baidakov
483aff30c0
client: Remove duplicate test function
TestFromStatusV2 and TestToStatusV2 have the identical testcases and code to check them

Signed-off-by: Evgenii Baidakov <evgenii@nspcc.io>
2023-05-19 10:33:09 +04:00
Evgenii Baidakov
9533a778a8
client: Move and extend status errors tests
Signed-off-by: Evgenii Baidakov <evgenii@nspcc.io>
2023-05-19 10:33:08 +04:00
Evgenii Baidakov
fc0bd12101
client: Add separate error for each apistatus
Signed-off-by: Evgenii Baidakov <evgenii@nspcc.io>
2023-05-19 10:33:08 +04:00
LeL
9d25bc7519
go.mod: update tzhash (#415) 2023-05-18 17:55:26 +04:00
Roman Khimov
d17066dfea go.mod: update tzhash
Signed-off-by: Roman Khimov <roman@nspcc.ru>
2023-05-18 16:21:39 +03:00
Roman Khimov
fec2f065e8
Set contextCall.err if missed session params (#410)
close #221
2023-05-16 12:29:28 +03:00
Evgenii Baidakov
162a15ae4b
client: Add tests for contextCall.err in session creation
Signed-off-by: Evgenii Baidakov <evgenii@nspcc.io>
2023-05-15 07:45:14 +04:00
Evgenii Baidakov
0c7bfc2afe
client: Set contextCall.err if missed session params
Signed-off-by: Evgenii Baidakov <evgenii@nspcc.io>
2023-05-15 07:45:06 +04:00
LeL
669c9ce9bc
.github: extend CODEOWNERS list (#411) 2023-05-12 10:14:04 +04:00
Roman Khimov
9e893fe3e9 .github: extend CODEOWNERS list
Signed-off-by: Roman Khimov <roman@nspcc.ru>
2023-05-11 18:26:42 +03:00
Roman Khimov
c97f834c6b
Accept oid.Address into client.PrmObjectGet, PrmObjectHash, PrmObjectDelete (#408) 2023-05-05 12:04:07 +03: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
626532d7dd
client: Use ByAddress instead of two calls FromContainer + ByID
Signed-off-by: Evgenii Baidakov <evgenii@nspcc.io>
2023-05-05 12:17:12 +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
Roman Khimov
d7a12a4846
Replace IsErrXXX functions with regular Go errors (#407)
close #220
2023-05-05 10:47:42 +03:00
Evgenii Baidakov
f34c99d538
docs: Actualize interfaces in status structs
Signed-off-by: Evgenii Baidakov <evgenii@nspcc.io>
2023-05-05 10:17:16 +04:00
Evgenii Baidakov
ca0f19c453
client: Remove IsErrXXX functions
Signed-off-by: Evgenii Baidakov <evgenii@nspcc.io>
2023-05-05 10:17:16 +04:00
Evgenii Baidakov
f1b438a2ac
pool: Replace IsErrXXX functions with errors
Signed-off-by: Evgenii Baidakov <evgenii@nspcc.io>
2023-05-05 10:17:15 +04:00