[#26] object: Replace Transform header with Split

This commit replaces Transform message with SplitHeader in oneof definition
of Value field of Header message. The latter, unlike the first, carries
complete information about the generation of the object by splitting the
payload. As a result, the message is deleted as no longer used.

Signed-off-by: Leonard Lyubich <leonard@nspcc.ru>
This commit is contained in:
Leonard Lyubich 2020-08-04 16:50:29 +03:00 committed by Stanislav Bogatyrev
parent 485510ab66
commit cbd4cf63f9
2 changed files with 3 additions and 43 deletions

View file

@ -24,8 +24,8 @@ message ExtendedHeader {
refs.Address Redirect = 2; refs.Address Redirect = 2;
// Attribute is a set of K-V object attributes // Attribute is a set of K-V object attributes
Attribute Attribute = 3; Attribute Attribute = 3;
// Transform defines transform operation (e.g. payload split) // Split carries the position of the object in the split hierarchy.
Transform Transform = 4; SplitHeader SplitHeader = 4;
// Tombstone header that set up in deleted objects // Tombstone header that set up in deleted objects
Tombstone Tombstone = 5; Tombstone Tombstone = 5;
// Token header contains token of the session within which the object was created // Token header contains token of the session within which the object was created
@ -86,20 +86,6 @@ message Link {
bytes ID = 2; bytes ID = 2;
} }
message Transform {
enum Type {
Unknown = 0;
// Split sets when object created after payload split
Split = 1;
// Sign sets when object created after re-signing (doesn't used)
Sign = 2;
// Mould sets when object created after filling missing headers in the object
Mould = 3;
}
// Type of object transformation
Type type = 1;
}
// SplitHeader groups information about spawning the object through a payload splitting. // SplitHeader groups information about spawning the object through a payload splitting.
message SplitHeader { message SplitHeader {
// Parent carries identifier of the origin object. // Parent carries identifier of the origin object.

View file

@ -39,7 +39,6 @@
- [SplitHeader](#object.SplitHeader) - [SplitHeader](#object.SplitHeader)
- [SystemHeader](#object.SystemHeader) - [SystemHeader](#object.SystemHeader)
- [Tombstone](#object.Tombstone) - [Tombstone](#object.Tombstone)
- [Transform](#object.Transform)
- [Scalar Value Types](#scalar-value-types) - [Scalar Value Types](#scalar-value-types)
@ -385,7 +384,7 @@ Attribute groups the parameters of the object attributes.
| Link | [Link](#object.Link) | | Link to other objects | | Link | [Link](#object.Link) | | Link to other objects |
| Redirect | [refs.Address](#refs.Address) | | Redirect not used yet | | Redirect | [refs.Address](#refs.Address) | | Redirect not used yet |
| Attribute | [Attribute](#object.Attribute) | | Attribute is a set of K-V object attributes | | Attribute | [Attribute](#object.Attribute) | | Attribute is a set of K-V object attributes |
| Transform | [Transform](#object.Transform) | | Transform defines transform operation (e.g. payload split) | | 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 |
| HomoHash | [bytes](#bytes) | | HomoHash is a homomorphic hash of original object payload | | HomoHash | [bytes](#bytes) | | HomoHash is a homomorphic hash of original object payload |
@ -490,17 +489,6 @@ SplitHeader groups information about spawning the object through a payload split
<a name="object.Transform"></a>
### Message Transform
| Field | Type | Label | Description |
| ----- | ---- | ----- | ----------- |
| type | [Transform.Type](#object.Transform.Type) | | Type of object transformation |
<!-- end messages --> <!-- end messages -->
@ -519,20 +507,6 @@ SplitHeader groups information about spawning the object through a payload split
| StorageGroup | 5 | Object that included into this storage group | | StorageGroup | 5 | Object that included into this storage group |
<a name="object.Transform.Type"></a>
### Transform.Type
| Name | Number | Description |
| ---- | ------ | ----------- |
| Unknown | 0 | |
| Split | 1 | Split sets when object created after payload split |
| Sign | 2 | Sign sets when object created after re-signing (doesn't used) |
| Mould | 3 | Mould sets when object created after filling missing headers in the object |
<!-- end enums --> <!-- end enums -->