[#26] object: Repeat object attributes in header

This commit replaces single Attribute field with the repeated list of
Attribute in ExtendedHeader message.

Signed-off-by: Leonard Lyubich <leonard@nspcc.ru>
This commit is contained in:
Leonard Lyubich 2020-08-04 18:59:21 +03:00 committed by Stanislav Bogatyrev
parent fb2064803e
commit a28decac39
2 changed files with 5 additions and 5 deletions

View file

@ -17,8 +17,8 @@ message Attribute {
} }
message ExtendedHeader { message ExtendedHeader {
// Attribute is a set of K-V object attributes // Attributes carries list of the object attributes in a string key-value format.
Attribute Attribute = 3; repeated Attribute Attributes = 3;
// Split carries the position of the object in the split hierarchy. // Split carries the position of the object in the split hierarchy.
SplitHeader SplitHeader = 4; SplitHeader SplitHeader = 4;
// Tombstone header that set up in deleted objects // Tombstone header that set up in deleted objects

View file

@ -379,7 +379,7 @@ Attribute groups the parameters of the object attributes.
| Field | Type | Label | Description | | Field | Type | Label | Description |
| ----- | ---- | ----- | ----------- | | ----- | ---- | ----- | ----------- |
| Attribute | [Attribute](#object.Attribute) | | Attribute is a set of K-V object attributes | | Attributes | [Attribute](#object.Attribute) | repeated | Attributes carries list of the object attributes in a string key-value format. |
| SplitHeader | [SplitHeader](#object.SplitHeader) | | Split carries the position of the object in the split hierarchy. | | SplitHeader | [SplitHeader](#object.SplitHeader) | | Split carries the position of the object in the split hierarchy. |
| Tombstone | [Tombstone](#object.Tombstone) | | Tombstone header that set up in deleted objects | | Tombstone | [Tombstone](#object.Tombstone) | | Tombstone header that set up in deleted objects |
| Token | [service.Token](#service.Token) | | Token header contains token of the session within which the object was created | | Token | [service.Token](#service.Token) | | Token header contains token of the session within which the object was created |
@ -408,8 +408,8 @@ Header groups the information about the NeoFS object.
| Field | Type | Label | Description | | Field | Type | Label | Description |
| ----- | ---- | ----- | ----------- | | ----- | ---- | ----- | ----------- |
| PayloadChecksum | [bytes](#bytes) | | PayloadChecksum carries the checksum of object payload bytes. Changing any byte of the payload changes the checksum. | | PayloadChecksum | [bytes](#bytes) | | PayloadChecksum carries the checksum of object payload bytes. Changing any byte of the payload changes the checksum. It is calculated as a SHA-256 hash over payload bytes. |
| HeaderChecksum | [bytes](#bytes) | | HeaderChecksum carries checksum of the object header structure. It covers all object attributes. Changing any field of the object except CreatorKey and ChecksumSignature changes the checksum. PayloadChecksum and HeaderChecksum cannot be merged due to the need to verify the header in the absence of a payload (e.g. in object.Head rpc). | | HeaderChecksum | [bytes](#bytes) | | HeaderChecksum carries checksum of the object header structure. It covers all object attributes. Changing any field of the object except CreatorKey and ChecksumSignature changes the checksum. PayloadChecksum and HeaderChecksum cannot be merged due to the need to verify the header in the absence of a payload (e.g. in object.Head rpc). It is calculated as a SHA-256 hash over marshaled object header with cut CreatorKey and ChecksumSignature. |
| CreatorKey | [bytes](#bytes) | | CreatorKey carries public key of the object creator in a binary format. | | CreatorKey | [bytes](#bytes) | | CreatorKey carries public key of the object creator in a binary format. |
| ChecksumSignature | [bytes](#bytes) | | ChecksumSignature is an user's signature of checksum to verify if it is correct | | ChecksumSignature | [bytes](#bytes) | | ChecksumSignature is an user's signature of checksum to verify if it is correct |