forked from TrueCloudLab/frostfs-api
[#26] object: Define message for object header
In previous version of the format Object message included two header fields: SystemHeader and list of ExtendedHeader. Due to the fact that all headers were not encapsulated in a single message, some messages were forced to use Object to convey the full header of the object (e.g. object.HeadResponse). To resolve this semantic inconsistency, this commit defines a Header message, consisting of a system and an extended portion. As a result, the Object now consists of two fields - Header and Payload. Signed-off-by: Leonard Lyubich <leonard@nspcc.ru>
This commit is contained in:
parent
2c3717bdee
commit
5beca3b0d1
2 changed files with 23 additions and 4 deletions
|
@ -109,13 +109,20 @@ message Transform {
|
|||
Type type = 1;
|
||||
}
|
||||
|
||||
message Object {
|
||||
// Header groups the information about the NeoFS object.
|
||||
message Header {
|
||||
// SystemHeader describes system header
|
||||
SystemHeader SystemHeader = 1;
|
||||
|
||||
// ExtendedHeaders describes a set of an extended headers
|
||||
repeated ExtendedHeader ExtendedHeaders = 2;
|
||||
}
|
||||
|
||||
message Object {
|
||||
// Header carries the object header.
|
||||
Header Header = 1;
|
||||
// Payload is an object's payload
|
||||
bytes Payload = 3;
|
||||
bytes Payload = 2;
|
||||
}
|
||||
|
||||
message PublicKey {
|
||||
|
|
|
@ -32,6 +32,7 @@
|
|||
- [Attribute](#object.Attribute)
|
||||
- [CreationPoint](#object.CreationPoint)
|
||||
- [ExtendedHeader](#object.ExtendedHeader)
|
||||
- [Header](#object.Header)
|
||||
- [IntegrityHeader](#object.IntegrityHeader)
|
||||
- [Link](#object.Link)
|
||||
- [Object](#object.Object)
|
||||
|
@ -406,6 +407,18 @@ Attribute groups the parameters of the object attributes.
|
|||
| PublicKey | [PublicKey](#object.PublicKey) | | PublicKey of owner of the object. Key is used for verification and can be based on NeoID or x509 cert. |
|
||||
|
||||
|
||||
<a name="object.Header"></a>
|
||||
|
||||
### Message Header
|
||||
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 |
|
||||
|
||||
|
||||
<a name="object.IntegrityHeader"></a>
|
||||
|
||||
### Message IntegrityHeader
|
||||
|
@ -438,8 +451,7 @@ Attribute groups the parameters of the object attributes.
|
|||
|
||||
| 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 |
|
||||
| Header | [Header](#object.Header) | | Header carries the object header. |
|
||||
| Payload | [bytes](#bytes) | | Payload is an object's payload |
|
||||
|
||||
|
||||
|
|
Loading…
Reference in a new issue