forked from TrueCloudLab/frostfs-api
[#73] Add JSON field names to object package
Signed-off-by: Stanislav Bogatyrev <stanislav@nspcc.ru>
This commit is contained in:
parent
6ea8bc3214
commit
a1d9527f34
2 changed files with 17 additions and 16 deletions
|
@ -254,10 +254,10 @@ message HeadRequest {
|
|||
// 3. Check if `ObjectID` signature in `signature` field is correct
|
||||
message HeaderWithSignature {
|
||||
// Full object header
|
||||
Header header = 1;
|
||||
Header header = 1 [json_name = "header"];
|
||||
|
||||
// Signed `ObjectID` to verify full header's authenticity
|
||||
neo.fs.v2.refs.Signature signature = 2;
|
||||
neo.fs.v2.refs.Signature signature = 2 [json_name = "signature"];
|
||||
}
|
||||
|
||||
// Object HEAD response
|
||||
|
|
|
@ -24,6 +24,7 @@ enum ObjectType {
|
|||
enum MatchType {
|
||||
// Unknown. Not used
|
||||
MATCH_TYPE_UNSPECIFIED = 0;
|
||||
|
||||
// Full string match
|
||||
STRING_EQUAL = 1;
|
||||
}
|
||||
|
@ -38,14 +39,14 @@ message ShortHeader {
|
|||
uint64 creation_epoch = 2 [json_name = "creationEpoch"];
|
||||
|
||||
// Object's owner
|
||||
neo.fs.v2.refs.OwnerID owner_id = 3 [json_name = "owner"];
|
||||
neo.fs.v2.refs.OwnerID owner_id = 3 [json_name = "ownerID"];
|
||||
|
||||
// Type of the object payload content
|
||||
ObjectType object_type = 4 [json_name = "type"];
|
||||
ObjectType object_type = 4 [json_name = "objectType"];
|
||||
|
||||
// Size of payload in bytes.
|
||||
// `0xFFFFFFFFFFFFFFFF` means `payload_length` is unknown
|
||||
uint64 payload_length = 5 [json_name = "payloadSize"];
|
||||
uint64 payload_length = 5 [json_name = "payloadLength"];
|
||||
}
|
||||
|
||||
// Object Header
|
||||
|
@ -55,30 +56,30 @@ message Header {
|
|||
neo.fs.v2.refs.Version version = 1 [json_name = "version"];
|
||||
|
||||
// Object's container
|
||||
neo.fs.v2.refs.ContainerID container_id = 2 [json_name = "container"];
|
||||
neo.fs.v2.refs.ContainerID container_id = 2 [json_name = "containerID"];
|
||||
|
||||
// Object's owner
|
||||
neo.fs.v2.refs.OwnerID owner_id = 3 [json_name = "owner"];
|
||||
neo.fs.v2.refs.OwnerID owner_id = 3 [json_name = "ownerID"];
|
||||
|
||||
// Object creation Epoch
|
||||
uint64 creation_epoch = 4 [json_name = "creationEpoch"];
|
||||
|
||||
// Size of payload in bytes.
|
||||
// `0xFFFFFFFFFFFFFFFF` means `payload_length` is unknown
|
||||
uint64 payload_length = 5 [json_name = "payloadSize"];
|
||||
uint64 payload_length = 5 [json_name = "payloadLength"];
|
||||
|
||||
// Hash of payload bytes
|
||||
neo.fs.v2.refs.Checksum payload_hash = 6 [json_name = "payloadHash"];
|
||||
|
||||
// Type of the object payload content
|
||||
ObjectType object_type = 7 [json_name = "type"];
|
||||
ObjectType object_type = 7 [json_name = "objectType"];
|
||||
|
||||
// Homomorphic hash of the object payload.
|
||||
neo.fs.v2.refs.Checksum homomorphic_hash = 8 [json_name = "homoHash"];
|
||||
neo.fs.v2.refs.Checksum homomorphic_hash = 8 [json_name = "homomorphicHash"];
|
||||
|
||||
// Session token, if it was used during Object creation. Need it to verify
|
||||
// integrity and authenticity out of Request scope.
|
||||
neo.fs.v2.session.SessionToken session_token = 9 [json_name = "token"];
|
||||
neo.fs.v2.session.SessionToken session_token = 9 [json_name = "sessionToken"];
|
||||
|
||||
// `Attribute` is a user-defined Key-Value metadata pair attached to the
|
||||
// object.
|
||||
|
@ -109,19 +110,19 @@ message Header {
|
|||
neo.fs.v2.refs.ObjectID parent = 1 [json_name = "parent"];
|
||||
|
||||
// Identifier of the left split neighbor
|
||||
neo.fs.v2.refs.ObjectID previous = 2[json_name = "previous"];
|
||||
neo.fs.v2.refs.ObjectID previous = 2 [json_name = "previous"];
|
||||
|
||||
// `signature` field of the parent object. Used to reconstruct parent.
|
||||
neo.fs.v2.refs.Signature parent_signature = 3[json_name = "parentSignature"];
|
||||
|
||||
// `header` field of the parent object. Used to reconstruct parent.
|
||||
Header parent_header = 4 [json_name = "header"];
|
||||
Header parent_header = 4 [json_name = "parentHeader"];
|
||||
|
||||
// List of identifiers of the objects generated by splitting current one.
|
||||
repeated neo.fs.v2.refs.ObjectID children = 5 [json_name = "children"];
|
||||
}
|
||||
// Position of the object in the split hierarchy
|
||||
Split split = 11 [json_name = "Split"];
|
||||
Split split = 11 [json_name = "split"];
|
||||
}
|
||||
|
||||
// Object structure. Object is immutable and content-addressed. It means
|
||||
|
@ -129,7 +130,7 @@ message Header {
|
|||
// hash of header field, which contains hash of object's payload.
|
||||
message Object {
|
||||
// Object's unique identifier.
|
||||
neo.fs.v2.refs.ObjectID object_id = 1 [json_name = "id"];
|
||||
neo.fs.v2.refs.ObjectID object_id = 1 [json_name = "objectID"];
|
||||
|
||||
// Signed object_id
|
||||
neo.fs.v2.refs.Signature signature = 2 [json_name = "signature"];
|
||||
|
|
Loading…
Reference in a new issue