Commit graph

535 commits

Author SHA1 Message Date
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
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
Evgenii Baidakov
7d2cfff825
client: Define separate errors instead of IsErrXXX functions
Signed-off-by: Evgenii Baidakov <evgenii@nspcc.io>
2023-05-05 10:17:15 +04:00
Roman Khimov
8ed98d6dec
Release 1.0.0-rc.8 (#403) 2023-04-27 14:25:13 +03:00
Roman Khimov
c0aaa66fe5 gitignore: ignore text editor backup files
Signed-off-by: Roman Khimov <roman@nspcc.ru>
2023-04-27 12:58:11 +03:00
Roman Khimov
24527b7880 CHANGELOG: add it, release 1.0.0-rc.8
Signed-off-by: Roman Khimov <roman@nspcc.ru>
2023-04-27 12:58:06 +03:00
Roman Khimov
e0d06dd444
Provide static object slicer (#382)
* closes #342
2023-04-27 12:03:40 +03:00
Leonard Lyubich
153695a03d client: Provide the ability to create slicer.Slicer instance
`CreateObject` function uses `slicer.Slicer` to read data encapsulated
behind `io.Reader` and store it in the NeoFS network. Sometimes there is
a need to init data writer (`io.Writer`)` instead of providing reader.
To cover such use-cases, it's worth to expose slicer's constructor based
on client.

Add `NewDataSlicer` constructor. Use the function in `CreateObject`.

Refs #342.

Signed-off-by: Leonard Lyubich <leonard@morphbits.io>
2023-04-26 21:40:01 +04:00
Leonard Lyubich
e2011832eb slicer: Allow to toggle homomorphic hashing
Homomorphic hashing of object payload is not always necessary. There is
a need to provide ability to skip calculation. It's also worth to not
calculate it by default since current implementation of Tillich-Zemor
algorithm has large resource cost.

Do not calculate homomorphic checksum in `Slicer` methods by default.
Provide option to enable the calculation. Make tests to randomize
calculation flag and assert results according to it.

Refs #342.

Signed-off-by: Leonard Lyubich <leonard@morphbits.io>
2023-04-26 21:40:01 +04:00
Leonard Lyubich
ab5ae28fdb slicer: Implement alternative slicing through user writing
Provide method to initialize payload stream as `io.WriteCloser`. This
approach will be useful for applications which need to control data
writing by themselves.

Refs #342.

Signed-off-by: Leonard Lyubich <leonard@morphbits.io>
2023-04-26 21:39:59 +04:00
Leonard Lyubich
0d7d03d56f client: Support static data slicing
Add `CreateObject` function which slices data stream into NeoFS objects
and saves the produced objects in the NeoFS network using `Client`.

Closes #342.

Signed-off-by: Leonard Lyubich <leonard@morphbits.io>
2023-04-26 21:38:08 +04:00
Leonard Lyubich
8eded316de Initial commit of static object slicer
There is a need to provide convenient function which allows to slice
user data into objects to be stored in NeoFS. The main challenge is to
produce objects compliant with the format described in the NeoFS
Specification.

Add `object/slicer` package. Export `Slicer` type which performs data
slicing.

Refs #342.

Signed-off-by: Leonard Lyubich <leonard@morphbits.io>
2023-04-26 21:38:05 +04:00
Roman Khimov
28a3708b4e
Replace signature package from neofs-api-go (#401)
close #219
2023-04-26 17:17:12 +03:00
Evgenii Baidakov
36b1e8442c
tests: Use dedicated function to generate signers in tests
Signed-off-by: Evgenii Baidakov <evgenii@nspcc.io>
2023-04-26 15:03:55 +04:00
Evgenii Baidakov
25c0fd9b8e
client: Update coverage for signing
Signed-off-by: Evgenii Baidakov <evgenii@nspcc.io>
2023-04-26 15:01:44 +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 Baidakov
77c2e227b9
pool: Use PublicKey like cache key instead of PrivateKey
Signed-off-by: Evgenii Baidakov <evgenii@nspcc.io>
2023-04-25 14:08:47 +04:00
Roman Khimov
dbbb22ca28
Use CID to prevent incorrect usage in netmap (#396)
close #216
2023-04-21 15:25:53 +03:00
Evgenii Baidakov
83ca99ae92
doc: Actualize docs for ContainerNodes func
Signed-off-by: Evgenii Baidakov <evgenii@nspcc.io>
2023-04-21 10:24:37 +04:00
Evgenii Baidakov
4b6965f209
netmap: Use CID to prevent incorrect usage in netmap
Signed-off-by: Evgenii Baidakov <evgenii@nspcc.io>
2023-04-21 10:24:10 +04:00
Roman Khimov
16daed8140
Set external signer for requests payload (#398)
close #373
2023-04-20 14:48:09 +03:00
Evgenii Baidakov
70df422866
neofsecdsa: Add StaticSigner for externally calculated hashes
Signed-off-by: Evgenii Baidakov <evgenii@nspcc.io>
2023-04-20 14:29:59 +04:00
Evgenii Baidakov
6ac961d41c
client: Set external signer for requests payload
Signed-off-by: Evgenii Baidakov <evgenii@nspcc.io>
2023-04-20 14:29:58 +04:00
Roman Khimov
0bc98456e3
Remove FromString method of enumerations (#393)
close #98
2023-04-19 21:09:43 +03:00
Evgenii Baidakov
6757c0a706
linter: Fix fmt.Errorf format for type variable
Signed-off-by: Evgenii Baidakov <evgenii@nspcc.io>
2023-04-19 16:14:22 +04:00
Evgenii Baidakov
5d3fcd6f55
enums: Remove FromString method of enumerations
Signed-off-by: Evgenii Baidakov <evgenii@nspcc.io>
2023-04-19 14:33:35 +04:00
LeL
34213c6275
Update go version to 1.20 (#394) 2023-04-19 14:23:22 +04:00
LeL
bde3b2f4b6
Actualize CODEOWNERS (#395) 2023-04-19 14:19:40 +04:00
Roman Khimov
dcdd75b751
documentation: Container create and get example (#392)
Close #385
2023-04-18 22:49:39 +03:00
Roman Khimov
32fc84a67c .github: hey, I'm the code owner too!
Let me have this green button.

Signed-off-by: Roman Khimov <roman@nspcc.ru>
2023-04-18 21:58:12 +03:00
Evgenii Baidakov
38a613fce5
*: replace interface{} with any keyword
Signed-off-by: Evgenii Baidakov <evgenii@nspcc.io>
2023-04-18 12:28:25 +04:00
Evgenii Baidakov
54faed8384
.github: Remove support 1.17, add support 1.20
Signed-off-by: Evgenii Baidakov <evgenii@nspcc.io>
2023-04-18 12:21:34 +04:00
Evgenii Baidakov
c5f949e314
go.mod: Set minimum version to 1.18
Signed-off-by: Evgenii Baidakov <evgenii@nspcc.io>
2023-04-18 12:19:34 +04:00
Evgenii Baidakov
d1ae4ef576
documentation: Container create and get example
Signed-off-by: Evgenii Baidakov <evgenii@nspcc.io>
2023-04-17 17:39:33 +04:00
Roman Khimov
47af8441eb
[#362] pool: Don't use default session token for read (#363)
close #362
2023-04-17 15:43:06 +03:00
Roman Khimov
8678b36ed9
Check CID is set to eacl table in ContainerSetEACL command (#389)
close #384
2023-04-17 15:25:58 +03:00
Roman Khimov
c6bda422fc
filter: Add payload and homomorphic hash filter methods (#386)
close #383
2023-04-17 14:44:21 +03:00
Evgenii Baidakov
dfb799783e
client: Check CID is set to eacl table in ContainerSetEACL command
Signed-off-by: Evgenii Baidakov <evgenii@nspcc.io>
2023-04-17 09:40:43 +04:00
Roman Khimov
493fa50915
Feature/308 add forming phy storage group (#348)
Move forming storage group (with phy objects) from
[neofs-cli](c2918fce3a/pkg/services/object_manager/storagegroup/collect.go (L17-L67))
to sdk

close #308
2023-04-15 20:53:46 +03:00
Roman Khimov
08a152b0bf
Update deps (#372) 2023-04-15 20:39:17 +03:00
Roman Khimov
3d42ae62d6
Method to take raw client (#388)
close #379
2023-04-15 14:29:38 +03:00