From 485510ab6616b9d5b0973b7f97990107f5f6b143 Mon Sep 17 00:00:00 2001 From: Leonard Lyubich Date: Tue, 4 Aug 2020 16:04:56 +0300 Subject: [PATCH] [#26] object: Define object split info message This commit defines SplitHeader message that encapsulates data about spawning the object through a payload splitting. Message fields contain information about the hierarchy in the split-chain as well as information about the origin object. Signed-off-by: Leonard Lyubich --- object/types.proto | 18 ++++++++++++++++++ proto-docs/object.md | 16 ++++++++++++++++ 2 files changed, 34 insertions(+) diff --git a/object/types.proto b/object/types.proto index 6de2531..77e82c7 100644 --- a/object/types.proto +++ b/object/types.proto @@ -100,6 +100,24 @@ message Transform { Type type = 1; } +// SplitHeader groups information about spawning the object through a payload splitting. +message SplitHeader { + // Parent carries identifier of the origin object. + refs.ObjectID Parent = 1; + + // Previous carries identifier of the left split neighbor. + refs.ObjectID Previous = 2; + + // Previous carries identifier of the right split neighbor. + refs.ObjectID Next = 3; + + // Children carries list of identifiers of the objects generated by splitting the current. + repeated refs.ObjectID Children = 4; + + // Origin carries the header of the origin object. + Header Origin = 5; +} + // Header groups the information about the NeoFS object. message Header { // SystemHeader describes system header diff --git a/proto-docs/object.md b/proto-docs/object.md index 0b0ac7c..4b87cff 100644 --- a/proto-docs/object.md +++ b/proto-docs/object.md @@ -36,6 +36,7 @@ - [Link](#object.Link) - [Object](#object.Object) - [PublicKey](#object.PublicKey) + - [SplitHeader](#object.SplitHeader) - [SystemHeader](#object.SystemHeader) - [Tombstone](#object.Tombstone) - [Transform](#object.Transform) @@ -453,6 +454,21 @@ Header groups the information about the NeoFS object. | Value | [bytes](#bytes) | | Value contains marshaled ecdsa public key | + + +### Message SplitHeader +SplitHeader groups information about spawning the object through a payload splitting. + + +| Field | Type | Label | Description | +| ----- | ---- | ----- | ----------- | +| Parent | [refs.ObjectID](#refs.ObjectID) | | Parent carries identifier of the origin object. | +| Previous | [refs.ObjectID](#refs.ObjectID) | | Previous carries identifier of the left split neighbor. | +| Next | [refs.ObjectID](#refs.ObjectID) | | Previous carries identifier of the right split neighbor. | +| Children | [refs.ObjectID](#refs.ObjectID) | repeated | Children carries list of identifiers of the objects generated by splitting the current. | +| Origin | [Header](#object.Header) | | Origin carries the header of the origin object. | + + ### Message SystemHeader