forked from TrueCloudLab/frostfs-api
[#26] object: Remake ExtendedHeader to field set
In previous version of the format ExtendedHeader consisted of one field Value, defined by oneof mechanism. Such a definition format give complete freedom when composing an object header, however, it did not allow strictly structuring the header format at the level of type syntax. Since the object has a well-defined structure in the system, this commit replaces the definition through oneof with a set of fields. As a consequence, storing a set of extended headers of the new type in the general header became redundant, so the repeated keyword was removed. Signed-off-by: Leonard Lyubich <leonard@nspcc.ru>
This commit is contained in:
parent
cbd4cf63f9
commit
9666fd4bc7
2 changed files with 25 additions and 27 deletions
|
@ -17,7 +17,6 @@ message Attribute {
|
|||
}
|
||||
|
||||
message ExtendedHeader {
|
||||
oneof Value {
|
||||
// Link to other objects
|
||||
Link Link = 1;
|
||||
// Redirect not used yet
|
||||
|
@ -40,7 +39,6 @@ message ExtendedHeader {
|
|||
storagegroup.StorageGroup StorageGroup = 10;
|
||||
// PublicKey of owner of the object. Key is used for verification and can be based on NeoID or x509 cert.
|
||||
PublicKey PublicKey = 11;
|
||||
}
|
||||
}
|
||||
|
||||
message Tombstone {}
|
||||
|
@ -109,8 +107,8 @@ message Header {
|
|||
// SystemHeader describes system header
|
||||
SystemHeader SystemHeader = 1;
|
||||
|
||||
// ExtendedHeaders describes a set of an extended headers
|
||||
repeated ExtendedHeader ExtendedHeaders = 2;
|
||||
// ExtendedHeader carries the additional part of the header.
|
||||
ExtendedHeader ExtendedHeader = 2;
|
||||
}
|
||||
|
||||
message Object {
|
||||
|
|
|
@ -403,7 +403,7 @@ Header groups the information about the NeoFS object.
|
|||
| Field | Type | Label | Description |
|
||||
| ----- | ---- | ----- | ----------- |
|
||||
| SystemHeader | [SystemHeader](#object.SystemHeader) | | SystemHeader describes system header |
|
||||
| ExtendedHeaders | [ExtendedHeader](#object.ExtendedHeader) | repeated | ExtendedHeaders describes a set of an extended headers |
|
||||
| ExtendedHeader | [ExtendedHeader](#object.ExtendedHeader) | | ExtendedHeader carries the additional part of the header. |
|
||||
|
||||
|
||||
<a name="object.IntegrityHeader"></a>
|
||||
|
|
Loading…
Reference in a new issue