Commit Graph

407 Commits (4e31b4f2316929aa391fc164d64dfacc7eaa4a92)

Author SHA1 Message Date
Pavel Karpy 58d4f4a55f [#170] acl: Document package functionality
Signed-off-by: Pavel Karpy <carpawell@nspcc.ru>
2022-03-25 19:15:22 +03:00
Denis Kirillov 030bbce2cf [#165] pool: drop prmCommon from container params
Signed-off-by: Denis Kirillov <denis@nspcc.ru>
2022-03-21 12:41:08 +03:00
Denis Kirillov 59b49dd7e6 [#165] pool: update WaitForContainerPresence
Signed-off-by: Denis Kirillov <denis@nspcc.ru>
2022-03-21 12:41:08 +03:00
Denis Kirillov 191d85e607 [#165] pool: change exported fields to setters
Signed-off-by: Denis Kirillov <denis@nspcc.ru>
2022-03-21 12:41:08 +03:00
Denis Kirillov 9be9697856 [#165] pool: make client interface unexported
Signed-off-by: Denis Kirillov <denis@nspcc.ru>
2022-03-21 12:41:08 +03:00
Denis Kirillov 52548fe176 [#165] pool: add docs
Signed-off-by: Denis Kirillov <denis@nspcc.ru>
2022-03-21 12:41:08 +03:00
Denis Kirillov 7811d8eefc [#165] pool: distinguish init step and run
Signed-off-by: Denis Kirillov <denis@nspcc.ru>
2022-03-21 12:41:08 +03:00
Denis Kirillov d03523a3bc [#165] pool: replace options with parameters
Signed-off-by: Denis Kirillov <denis@nspcc.ru>
2022-03-21 12:41:08 +03:00
Denis Kirillov ec5c223f29 [#165] pool: make private inner structs
Signed-off-by: Denis Kirillov <denis@nspcc.ru>
2022-03-21 12:41:08 +03:00
Denis Kirillov f5cabe26cb [#165] pool: drop builder
Signed-off-by: Denis Kirillov <denis@nspcc.ru>
2022-03-21 12:41:08 +03:00
Leonard Lyubich aeb4ac638a [#170] accounting: Remove `message` sub-string from V2-methods
Signed-off-by: Leonard Lyubich <leonard@nspcc.ru>
2022-03-21 12:37:53 +03:00
Leonard Lyubich 7d31de57ec [#170] audit: Refactor and document package functionality
Signed-off-by: Leonard Lyubich <leonard@nspcc.ru>
2022-03-21 12:37:53 +03:00
Leonard Lyubich 48150852f3 [#170] accounting: Refactor and document package functionality
Signed-off-by: Leonard Lyubich <leonard@nspcc.ru>
2022-03-21 12:37:53 +03:00
Alex Vanin a55ffa4796 [#176] status: Do not lose built-in error text message
Signed-off-by: Alex Vanin <alexey@nspcc.ru>
2022-03-16 17:16:20 +03:00
Alex Vanin b006ade154 Update neofs-api-go to v2.12.1
Signed-off-by: Alex Vanin <alexey@nspcc.ru>
2022-03-15 17:18:05 +03:00
Evgenii Stratonikov 3e12d0eb69 [#172] object: Allow to marshal `SplitInfo` to JSON
Signed-off-by: Evgenii Stratonikov <evgeniy@nspcc.ru>
2022-03-15 17:00:25 +03:00
Alex Vanin 7d19718e1d [#168] netmap: Add simple selector benchmark
Signed-off-by: Alex Vanin <alexey@nspcc.ru>
2022-03-15 16:59:59 +03:00
Alex Vanin b91e25f782 [#168] pool: Adopt replacement of pointer slices with struct slices
Signed-off-by: Alex Vanin <alexey@nspcc.ru>
2022-03-15 16:59:59 +03:00
Alex Vanin 9c5d3d9dfa [#168] client: Adopt replacement of pointer slices with struct slices
Signed-off-by: Alex Vanin <alexey@nspcc.ru>
2022-03-15 16:59:59 +03:00
Alex Vanin e89a0d88d2 [#168] container: Remove pointer tricks from `setAttribute`
Signed-off-by: Alex Vanin <alexey@nspcc.ru>
2022-03-15 16:59:59 +03:00
Alex Vanin 98d4b5c926 [#168] container: Replace []*Attribute with []Attribute
Signed-off-by: Alex Vanin <alexey@nspcc.ru>
2022-03-15 16:59:59 +03:00
Alex Vanin cef9872b39 [#168] policy: Adopt replacement of pointer slices with struct slices
Signed-off-by: Alex Vanin <alexey@nspcc.ru>
2022-03-15 16:59:59 +03:00
Alex Vanin cdcbaa1677 [#168] netmap: Replace pointer slices with non-pointer slices
- []*Replica => []Replica
 - []*Selector => []Selector
 - []*Filter => []Filter
 - []*NetworkParameter => []NetworkParameter
 - []*Node => []Node

Also introduces `filter.id()`` function to store filters
in numCache map.

Signed-off-by: Alex Vanin <alexey@nspcc.ru>
2022-03-15 16:59:59 +03:00
Alex Vanin e70bf05fb9 [#168] eacl: Replace pointer slices with non-pointer slices
- []*Record => []Record
 - []*Filter => []Filter
 - []*Target => []Target

Signed-off-by: Alex Vanin <alexey@nspcc.ru>
2022-03-15 16:59:59 +03:00
Alex Vanin ef96949cbf [#168] object: Replace pointer slices with non-pointer slices
- []*oid.ID => []oid.ID
 - []*object.SearchFilter => []object.SearchFilter
 - []*Attribute => []Attribute

Signed-off-by: Alex Vanin <alexey@nspcc.ru>
2022-03-15 16:59:59 +03:00
Alex Vanin 467358f15a [#168] reputation: Replace []*reputation.Trust with []reputation.Trust
Signed-off-by: Alex Vanin <alexey@nspcc.ru>
2022-03-15 16:59:59 +03:00
Alex Vanin 022f412584 [#168] storagegroup: Replace []*oid.ID with []oid.ID
Signed-off-by: Alex Vanin <alexey@nspcc.ru>
2022-03-15 16:59:59 +03:00
Alex Vanin d4a8b1755c [#168] audit: Replace []*oid.ID with []oid.ID
Signed-off-by: Alex Vanin <alexey@nspcc.ru>
2022-03-15 16:59:59 +03:00
Alex Vanin eea0c0ecdc [#168] Update neofs-api-go with non pointer slices
Signed-off-by: Alex Vanin <alexey@nspcc.ru>
2022-03-15 16:59:59 +03:00
Alex Vanin 68b0440c62 [#164] Do not return rpc.Balance error in Dial
Balance request should be replaced with more generic Dial()
call from neofs-api-go.

Signed-off-by: Alex Vanin <alexey@nspcc.ru>
2022-03-14 13:04:49 +03:00
Leonard Lyubich b81122740a [#164] pool: Make `pool.Pool` a struct
Connection pool package should not define `Pool` type as an interface
since it provides single particular implementation.

Make `pool.Pool` type a struct instead of interface. Also remove
`Object`, `Container` and `Accounting` interfaces.

Signed-off-by: Leonard Lyubich <leonard@nspcc.ru>
2022-03-10 15:02:10 +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 df5c69eea5 [#139] object: Implement function to init object creation
All NeoFS object must have at least container and owner identifiers.

Add `InitCreation` function which write all required fields to the
object instance. Extend `Object` type docs with all the constructors.

Signed-off-by: Leonard Lyubich <leonard@nspcc.ru>
2022-03-05 17:38:16 +03:00
Leonard Lyubich 1c161956c8 [#163] object: Implement functions linking Object and Lock instances
Add `WriteLock`/`ReadLock` function which writes/read `Lock` instace
to/from the `Object` instance.

Signed-off-by: Leonard Lyubich <leonard@nspcc.ru>
2022-03-05 17:38:16 +03:00
Leonard Lyubich fb8daf80fc Upgrade NeoFS API Go module to v2.12.0
Signed-off-by: Leonard Lyubich <leonard@nspcc.ru>
2022-03-05 17:38:16 +03:00
Denis Kirillov 61f9c3392b [#159] Add object context to session tokens
Signed-off-by: Denis Kirillov <denis@nspcc.ru>
2022-03-03 15:08:47 +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
Alex Vanin 6f1c21da31 [#158] client: Do not ignore errors in `processCall()`
Some callbacks, such as `close()` -> `result(v2)` may
generate new errors, so `processCall` should not ignore
them.

Signed-off-by: Alex Vanin <alexey@nspcc.ru>
2022-03-03 14:27:29 +03:00
Alex Vanin 7ef141aab7 [#158] client: Fix length setter in object hash range
Signed-off-by: Alex Vanin <alexey@nspcc.ru>
2022-03-03 14:27:29 +03:00
Alex Vanin bf23b548ab [#158] client: Support object context in session token setter
Signed-off-by: Alex Vanin <alexey@nspcc.ru>
2022-03-03 14:27:29 +03:00
Leonard Lyubich d109594d75 [#157] util/signature: Revive removed features
Signed-off-by: Leonard Lyubich <leonard@nspcc.ru>
2022-03-03 09:39:21 +03:00
Leonard Lyubich a292150d42 [#157] signature: Change scheme selection
`SignData`: use `ECDSAWithSHA512` by default. `SignWithRFC6979` option
switches the scheme to `RFC6979WithSHA256`.

`VerifyData`: if scheme is not fixed (like by `SignWithRFC6979` option)
then scheme from the message is processed.

Signed-off-by: Leonard Lyubich <leonard@nspcc.ru>
2022-03-03 09:39:21 +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 12aa7ae144 [#140] apistatus: Support session errors
Define `SessionTokenNotFound`/`SessionTokenExpired` types for
`TOKEN_NOT_FOUND`/`TOKEN_EXPIRED` codes.

Signed-off-by: Leonard Lyubich <leonard@nspcc.ru>
2022-03-02 18:27:08 +03:00
Leonard Lyubich c627648798 [#140] apistatus: Support `CONTAINER_NOT_FOUND` error
Define `ContainerNotFound` type for `CONTAINER_NOT_FOUND` code.

Signed-off-by: Leonard Lyubich <leonard@nspcc.ru>
2022-03-02 18:27:08 +03:00
Leonard Lyubich f1e46d35de [#140] apistatus: Support `OBJECT_ALREADY_REMOVED` error
Define `ObjectAlreadyRemoved` type for `OBJECT_ALREADY_REMOVED` code.

Signed-off-by: Leonard Lyubich <leonard@nspcc.ru>
2022-03-02 18:27:08 +03:00
Leonard Lyubich ff3826ae6b [#140] apistatus: Support `OBJECT_NOT_FOUND` error
Define `ObjectNotFound` type for `OBJECT_NOT_FOUND` code.

Signed-off-by: Leonard Lyubich <leonard@nspcc.ru>
2022-03-02 18:27:08 +03:00
Leonard Lyubich 3e94b7c892 [#140] apistatus: Support `ACCESS_DENIED` error
Define `ObjectAccessDenied` type for `ACCESS_DENIED` code. Provide
method to write/read human-readable reason.

Signed-off-by: Leonard Lyubich <leonard@nspcc.ru>
2022-03-02 18:27:08 +03:00
Leonard Lyubich 2b28f91a89 [#140] object: Support `LOCK` type
Add `TypeLock` value to `Type` enum. Implement `Lock` type compatible
with corresponding message. Implement `ObjectLocked` and
`IrregularObjectLock` errors in `apistatus` package.

Signed-off-by: Leonard Lyubich <leonard@nspcc.ru>
2022-03-02 18:27:08 +03:00