forked from TrueCloudLab/frostfs-api
[#84] Clarify various types encoding formats
Signed-off-by: Stanislav Bogatyrev <stanislav@nspcc.ru>
This commit is contained in:
parent
063ec430d1
commit
b930782fd3
4 changed files with 46 additions and 17 deletions
|
@ -11,6 +11,12 @@ import "session/types.proto";
|
|||
// Type of the object payload content. Only `REGULAR` type objects can be split,
|
||||
// hence `TOMBSTONE` and `STORAGEGROUP` payload is limited by maximal object
|
||||
// size.
|
||||
//
|
||||
// String presentation of object type is PascalCased `ObjectType` enumeration
|
||||
// item name:
|
||||
// * Regular
|
||||
// * Tombstone
|
||||
// * StorageGroup
|
||||
enum ObjectType {
|
||||
// Just a normal object
|
||||
REGULAR = 0;
|
||||
|
@ -34,7 +40,7 @@ enum MatchType {
|
|||
// Short header fields
|
||||
message ShortHeader {
|
||||
// Object format version. Effectively the version of API library used to
|
||||
// create particular object
|
||||
// create particular object.
|
||||
neo.fs.v2.refs.Version version = 1 [json_name = "version"];
|
||||
|
||||
// Epoch when the object was created
|
||||
|
@ -67,7 +73,7 @@ message Header {
|
|||
uint64 creation_epoch = 4 [json_name = "creationEpoch"];
|
||||
|
||||
// Size of payload in bytes.
|
||||
// `0xFFFFFFFFFFFFFFFF` means `payload_length` is unknown
|
||||
// `0xFFFFFFFFFFFFFFFF` means `payload_length` is unknown.
|
||||
uint64 payload_length = 5 [json_name = "payloadLength"];
|
||||
|
||||
// Hash of payload bytes
|
||||
|
@ -76,7 +82,7 @@ message Header {
|
|||
// Type of the object payload content
|
||||
ObjectType object_type = 7 [json_name = "objectType"];
|
||||
|
||||
// Homomorphic hash of the object payload.
|
||||
// Homomorphic hash of the object payload
|
||||
neo.fs.v2.refs.Checksum homomorphic_hash = 8 [json_name = "homomorphicHash"];
|
||||
|
||||
// Session token, if it was used during Object creation. Need it to verify
|
||||
|
@ -136,9 +142,9 @@ message Header {
|
|||
// List of identifiers of the objects generated by splitting current one.
|
||||
repeated neo.fs.v2.refs.ObjectID children = 5 [json_name = "children"];
|
||||
|
||||
// 16 byte UUID used to identify the split object hierarchy parts. Must be
|
||||
// unique inside container. All objects participating in the split must
|
||||
// have the same `split_id` value.
|
||||
// 16 byte UUIDv4 used to identify the split object hierarchy parts. Must be
|
||||
// unique inside container. All objects participating in the split must have
|
||||
// the same `split_id` value.
|
||||
bytes split_id = 6 [json_name = "splitID"];
|
||||
|
||||
}
|
||||
|
@ -159,6 +165,6 @@ message Object {
|
|||
// Object metadata headers
|
||||
Header header = 3 [json_name = "header"];
|
||||
|
||||
// Payload bytes.
|
||||
// Payload bytes
|
||||
bytes payload = 4 [json_name = "payload"];
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue