Commit graph

966 commits

Author SHA1 Message Date
Leonard Lyubich
93e1580684 [#253] container: Implement marshalers on UsedSpaceAnnouncement structure
Implement Unmarshal method on UsedSpaceAnnouncement v2 message. Implement
Marshal/Unmarshal methods on cross-version UsedSpaceAnnouncement type.

Signed-off-by: Leonard Lyubich <leonard@nspcc.ru>
2021-02-11 15:04:13 +03:00
Alex Vanin
9e01f29dda [#250] pkg/container: Add epoch field to size announce body
Signed-off-by: Alex Vanin <alexey@nspcc.ru>
2021-02-11 15:04:13 +03:00
Alex Vanin
e27d76e804 [#250] v2/container: Add epoch field to size announce body
Signed-off-by: Alex Vanin <alexey@nspcc.ru>
2021-02-11 15:04:13 +03:00
Alex Vanin
5566081d2d [#245] pkg/client: Add AnnounceContainerUsedSpace method
Signed-off-by: Alex Vanin <alexey@nspcc.ru>
2021-02-11 15:04:13 +03:00
Alex Vanin
d2ee6b469a [#245] v2/container: Add AnnounceUsedSpace method
Signed-off-by: Alex Vanin <alexey@nspcc.ru>
2021-02-11 15:04:13 +03:00
Evgenii Stratonikov
5d9ef5feec [#248] netmap: fulfill backup factor for default attribute
Signed-off-by: Evgenii Stratonikov <evgeniy@nspcc.ru>
2021-02-03 15:31:18 +03:00
Alex Vanin
42657aaf11 Update changelog for release v1.22.2
Signed-off-by: Alex Vanin <alexey@nspcc.ru>
2021-01-27 20:07:01 +03:00
Alex Vanin
c35e15a758 [#249] pkg/netmap: Add CBF field in placement context
If CBF value is not set, then netmap package uses default CBF
value. However it modifies placement policy structure in
`GetContainerNodes()` because policy passed as a pointer.

Instead package can store CBF value in internal context and use
it without policy modification.

Signed-off-by: Alex Vanin <alexey@nspcc.ru>
2021-01-27 15:47:06 +03:00
Alex Vanin
98284f0bfa Fix badge in README file
We don't have `go` workflow in the repository.

Signed-off-by: Alex Vanin <alexey@nspcc.ru>
2021-01-25 13:51:38 +03:00
Alex Vanin
9401724b9c [#246] pkg/client: Use io.Reader wrapper at object put
Object payload transferred in chunks. Size of the
chunks may be limited by transport protocols. To
split it we use `io.CopyBuffer` with pre-allocated
buffer size of one chunk. However this function may
ignore buffer if reader or writer implements
`WriteTo` or `ReadFrom` methods. Unfortunately
`bytes.Reader` implements `WriteTo` function.

To fix this we wrap reader so wrapper implements
only `io.Reader` interface.

Related to github.com/nspcc-dev/neofs-node/issues/338

Signed-off-by: Alex Vanin <alexey@nspcc.ru>
2021-01-25 13:25:52 +03:00
Leonard Lyubich
c7dcea9e49 Update changelog for release v1.22.1
Signed-off-by: Leonard Lyubich <leonard@nspcc.ru>
2021-01-15 17:02:35 +03:00
Alex Vanin
43c579f670 [#243] Fix ineffassign linter errors
Signed-off-by: Alex Vanin <alexey@nspcc.ru>
2021-01-12 18:22:07 +03:00
Alex Vanin
8a82400451 [#243] Fix golint linter errors
Signed-off-by: Alex Vanin <alexey@nspcc.ru>
2021-01-12 18:22:07 +03:00
Alex Vanin
c2db2a54a1 [#243] Fix exhaustive linter errors
Signed-off-by: Alex Vanin <alexey@nspcc.ru>
2021-01-12 18:22:07 +03:00
Alex Vanin
60a55ea6c1 [#243] Fix whitespace linter errors
Signed-off-by: Alex Vanin <alexey@nspcc.ru>
2021-01-12 18:22:07 +03:00
Alex Vanin
2fa752864f [#243] Fix goimports linter errors
Signed-off-by: Alex Vanin <alexey@nspcc.ru>
2021-01-12 18:22:07 +03:00
Alex Vanin
0c9440c972 [#243] Update linter config
Signed-off-by: Alex Vanin <alexey@nspcc.ru>
2021-01-12 18:22:07 +03:00
Leonard Lyubich
f8018f9c3d [#241] v2/session: Define keys of the well-known X-headers
Signed-off-by: Leonard Lyubich <leonard@nspcc.ru>
2021-01-11 18:43:42 +03:00
Stanislav Bogatyrev
aa55079b69 Minor typo fixes
Signed-off-by: Stanislav Bogatyrev <stanislav@nspcc.ru>
2020-12-30 12:35:03 +03:00
Alex Vanin
0f740d51d9 Release v1.22.0 - Yeouido (여의도, 汝矣島)
Signed-off-by: Alex Vanin <alexey@nspcc.ru>
2020-12-30 12:35:03 +03:00
Leonard Lyubich
f0a0bc4cda Update changelog and readme for v1.22.0
Signed-off-by: Leonard Lyubich <leonard@nspcc.ru>
2020-12-25 16:20:34 +03:00
Alex Vanin
aafeb70bdb [#235] v2/audit: Regenerate protobuf
Signed-off-by: Alex Vanin <alexey@nspcc.ru>
2020-12-25 16:20:34 +03:00
Alex Vanin
1c25c3904b [#234] Update audit result struct definition
Signed-off-by: Alex Vanin <alexey@nspcc.ru>
2020-12-25 16:20:34 +03:00
Leonard Lyubich
9986a4ecd1 [#233] Implement data audit result type with basic methods
Signed-off-by: Leonard Lyubich <leonard@nspcc.ru>
2020-12-25 16:20:34 +03:00
Leonard Lyubich
3039aa20c7 [#233] v2/refs: Implement converters for object ID list type
Signed-off-by: Leonard Lyubich <leonard@nspcc.ru>
2020-12-25 16:20:34 +03:00
Leonard Lyubich
51e8e318c2 [#233] proto: Implement functions for fixed64 protobuf data type
Signed-off-by: Leonard Lyubich <leonard@nspcc.ru>
2020-12-25 16:20:34 +03:00
Leonard Lyubich
eaa99af2b2 Recompile protobuf files with neofs-api yeouido
Signed-off-by: Leonard Lyubich <leonard@nspcc.ru>
2020-12-25 16:20:29 +03:00
Leonard Lyubich
f0ebe80a78 [#231] object/search: Implement method to add search filter by type
Signed-off-by: Leonard Lyubich <leonard@nspcc.ru>
2020-12-25 16:20:26 +03:00
Leonard Lyubich
53e2756762 [#231] object: Implement string encode/decode methods on Type
Signed-off-by: Leonard Lyubich <leonard@nspcc.ru>
2020-12-25 16:20:26 +03:00
Leonard Lyubich
0f04087543 [#230] pkg: Implement string encode/decode methods on Checksum
Signed-off-by: Leonard Lyubich <leonard@nspcc.ru>
2020-12-25 16:20:26 +03:00
Leonard Lyubich
6861de042b [#230] pkg: Implement storage group type with basic methods
Signed-off-by: Leonard Lyubich <leonard@nspcc.ru>
2020-12-25 16:20:26 +03:00
Leonard Lyubich
37e2cab93b [#229] pkg/client: Set hash fields to result of short HEAD operation
Signed-off-by: Leonard Lyubich <leonard@nspcc.ru>
2020-12-25 16:20:26 +03:00
Leonard Lyubich
8fe135ab8c [#229] v2/object: Add hash fields to ShortHeader message
Signed-off-by: Leonard Lyubich <leonard@nspcc.ru>
2020-12-25 16:20:26 +03:00
Leonard Lyubich
b2528d4c59 Recompile protobuf files with neofs-api yeouido
Signed-off-by: Leonard Lyubich <leonard@nspcc.ru>
2020-12-25 16:20:19 +03:00
Leonard Lyubich
6f7f6da042 Update changelog for release v1.21.2
Signed-off-by: Leonard Lyubich <leonard@nspcc.ru>
2020-12-24 14:56:00 +03:00
Leonard Lyubich
c4f7be19ea [#194] pkg/client: Verify container format in GetContainer method
Make Client.GetContainer method to return an error if received container
structure does not meet NeoFS API specification.

Signed-off-by: Leonard Lyubich <leonard@nspcc.ru>
2020-12-24 12:54:53 +03:00
Leonard Lyubich
7988405753 [#194] pkg/container: Implement container constructor with format check
Implement NewVerifiedFromV2 function that verifies format of NeoFS API V2
Container message.

Signed-off-by: Leonard Lyubich <leonard@nspcc.ru>
2020-12-24 12:54:53 +03:00
Leonard Lyubich
70c29ca3e5 [#194] pkg/container: Implement container nonce getter/setter as UUID
Implement NonceUUID/SetNonceUUID methods on container structure. Change
implementation of Nonce/SetNonce methods and mark them deprecated.

Signed-off-by: Leonard Lyubich <leonard@nspcc.ru>
2020-12-24 12:54:53 +03:00
Leonard Lyubich
3550e128bb [#236] Fix SDK minor version number
Signed-off-by: Leonard Lyubich <leonard@nspcc.ru>
2020-12-24 10:35:33 +03:00
Leonard Lyubich
9480742d7b Update changelog for v1.21.1
Signed-off-by: Leonard Lyubich <leonard@nspcc.ru>
2020-12-18 16:29:16 +03:00
Leonard Lyubich
adb681878b Recompile protobuf files from neofs-api v2.1.1
Signed-off-by: Leonard Lyubich <leonard@nspcc.ru>
2020-12-18 16:29:16 +03:00
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
84839b09c2 [#208] pkg/container: Define standard error for mismatch identifiers
Signed-off-by: Leonard Lyubich <leonard@nspcc.ru>
2020-12-17 14:52:04 +03:00
Leonard Lyubich
7d1a795d76 Update changelog and readme for v1.21.0
Signed-off-by: Leonard Lyubich <leonard@nspcc.ru>
2020-12-11 17:50:26 +03:00
Leonard Lyubich
2aa51d3add v2/object: Fix NPE in SplitInfo.GetObject
Signed-off-by: Leonard Lyubich <leonard@nspcc.ru>
2020-12-11 14:48:27 +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
Leonard Lyubich
4567986682 [#226] v2/object: Add tombstone field to DeleteResponseBody
Signed-off-by: Leonard Lyubich <leonard@nspcc.ru>
2020-12-10 18:26:23 +03:00
Leonard Lyubich
c064760f5d [#226] sdk/object: Implement Tombstone type with field access and encoding
Signed-off-by: Leonard Lyubich <leonard@nspcc.ru>
2020-12-10 18:26:23 +03:00
Leonard Lyubich
6037a26a35 [#226] v2/tombstone: Implement unified message structure with methods
Signed-off-by: Leonard Lyubich <leonard@nspcc.ru>
2020-12-10 18:26:23 +03:00