forked from TrueCloudLab/frostfs-api
[#32] Rename fields according to Protobuf Style Guide
Signed-off-by: Stanislav Bogatyrev <stanislav@nspcc.ru>
This commit is contained in:
parent
5fe4c2734e
commit
e75ef53793
12 changed files with 236 additions and 239 deletions
|
@ -54,30 +54,30 @@ service Service {
|
|||
|
||||
message GetRequest {
|
||||
// Carries the address of the requested object.
|
||||
refs.Address Address = 1;
|
||||
refs.Address address = 1;
|
||||
|
||||
// Carries the raw option flag of the request.
|
||||
// Raw request is sent to receive only the objects
|
||||
// that are physically stored on the server.
|
||||
bool Raw = 2;
|
||||
bool raw = 2;
|
||||
|
||||
// Carries request meta information. Header data is used only to regulate message
|
||||
// transport and does not affect request execution.
|
||||
service.RequestMetaHeader MetaHeader = 98;
|
||||
service.RequestMetaHeader meta_header = 98;
|
||||
|
||||
// Carries request verification information. This header is used to authenticate
|
||||
// the nodes of the message route and check the correctness of transmission.
|
||||
service.RequestVerificationHeader VerifyHeader = 99;
|
||||
service.RequestVerificationHeader verify_header = 99;
|
||||
}
|
||||
|
||||
message GetResponse {
|
||||
// Carries the single message of the response stream.
|
||||
oneof ObjectPart {
|
||||
// Carries the object header.
|
||||
Header Header = 1;
|
||||
Header header = 1;
|
||||
|
||||
// Carries part of the object payload.
|
||||
bytes Chunk = 2;
|
||||
bytes chunk = 2;
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -85,12 +85,12 @@ message PutRequest {
|
|||
// Groups initialization parameters of object placement in NeoFS.
|
||||
message Init {
|
||||
// Carries the header of the object to save in the system.
|
||||
Header Header = 1;
|
||||
Header header = 1;
|
||||
|
||||
// Carries the number of the object copies to store
|
||||
// within the RPC call. Default zero value is processed according
|
||||
// to the container placement rules.
|
||||
uint32 CopiesNumber = 2;
|
||||
uint32 copies_number = 2;
|
||||
}
|
||||
|
||||
// Carries the single part of the query stream.
|
||||
|
@ -99,38 +99,38 @@ message PutRequest {
|
|||
Init init = 1;
|
||||
|
||||
// Carries part of the object payload.
|
||||
bytes Chunk = 2;
|
||||
bytes chunk = 2;
|
||||
}
|
||||
|
||||
// Carries request meta information. Header data is used only to regulate message
|
||||
// transport and does not affect request execution.
|
||||
service.RequestMetaHeader MetaHeader = 98;
|
||||
service.RequestMetaHeader meta_header = 98;
|
||||
|
||||
// Carries request verification information. This header is used to authenticate
|
||||
// the nodes of the message route and check the correctness of transmission.
|
||||
service.RequestVerificationHeader VerifyHeader = 99;
|
||||
service.RequestVerificationHeader verify_header = 99;
|
||||
}
|
||||
|
||||
message PutResponse {
|
||||
// Carries identifier of the saved object.
|
||||
// It is used to access an object in the container.
|
||||
refs.ObjectID ObjectID = 1;
|
||||
refs.ObjectID object_id = 1;
|
||||
}
|
||||
|
||||
message DeleteRequest {
|
||||
// Carries the address of the object to be deleted.
|
||||
refs.Address Address = 1;
|
||||
refs.Address address = 1;
|
||||
|
||||
// Carries identifier the object owner.
|
||||
refs.OwnerID OwnerID = 2;
|
||||
refs.OwnerID owner_id = 2;
|
||||
|
||||
// Carries request meta information. Header data is used only to regulate message
|
||||
// transport and does not affect request execution.
|
||||
service.RequestMetaHeader MetaHeader = 98;
|
||||
service.RequestMetaHeader meta_header = 98;
|
||||
|
||||
// Carries request verification information. This header is used to authenticate
|
||||
// the nodes of the message route and check the correctness of transmission.
|
||||
service.RequestVerificationHeader VerifyHeader = 99;
|
||||
service.RequestVerificationHeader verify_header = 99;
|
||||
}
|
||||
|
||||
// DeleteResponse is empty because we cannot guarantee permanent object removal
|
||||
|
@ -140,120 +140,120 @@ message DeleteResponse {
|
|||
|
||||
message HeadRequest {
|
||||
// Carries the address of the object with the requested header.
|
||||
refs.Address Address = 1;
|
||||
refs.Address address = 1;
|
||||
|
||||
// Carries the option to crop header to main part.
|
||||
bool MainOnly = 2;
|
||||
bool main_only = 2;
|
||||
|
||||
// Carries the raw option flag of the request.
|
||||
// Raw request is sent to receive only the headers of the objects
|
||||
// that are physically stored on the server.
|
||||
bool Raw = 3;
|
||||
bool raw = 3;
|
||||
|
||||
// Carries request meta information. Header data is used only to regulate message
|
||||
// transport and does not affect request execution.
|
||||
service.RequestMetaHeader MetaHeader = 98;
|
||||
service.RequestMetaHeader meta_header = 98;
|
||||
|
||||
// Carries request verification information. This header is used to authenticate
|
||||
// the nodes of the message route and check the correctness of transmission.
|
||||
service.RequestVerificationHeader VerifyHeader = 99;
|
||||
service.RequestVerificationHeader verify_header = 99;
|
||||
}
|
||||
|
||||
message HeadResponse {
|
||||
// Carries the requested object header.
|
||||
Header Header = 1;
|
||||
Header header = 1;
|
||||
}
|
||||
|
||||
message SearchRequest {
|
||||
// Carries search container identifier.
|
||||
refs.ContainerID ContainerID = 1;
|
||||
refs.ContainerID container_id = 1;
|
||||
|
||||
message Query {
|
||||
uint32 Version = 1;
|
||||
uint32 version = 1;
|
||||
|
||||
message Filter {
|
||||
enum MatchType {
|
||||
MatchUnknown = 0;
|
||||
StringEqual = 1;
|
||||
MATCH_UNKNOWN = 0;
|
||||
STRING_EQUAL = 1;
|
||||
}
|
||||
|
||||
MatchType matchType = 1;
|
||||
MatchType match_type = 1;
|
||||
|
||||
string Name = 2;
|
||||
string name = 2;
|
||||
|
||||
string Value = 3;
|
||||
string value = 3;
|
||||
}
|
||||
|
||||
repeated Filter Filters = 2;
|
||||
repeated Filter filters = 2;
|
||||
}
|
||||
|
||||
Query query = 2;
|
||||
|
||||
// Carries request meta information. Header data is used only to regulate message
|
||||
// transport and does not affect request execution.
|
||||
service.RequestMetaHeader MetaHeader = 98;
|
||||
service.RequestMetaHeader meta_header = 98;
|
||||
|
||||
// Carries request verification information. This header is used to authenticate
|
||||
// the nodes of the message route and check the correctness of transmission.
|
||||
service.RequestVerificationHeader VerifyHeader = 99;
|
||||
service.RequestVerificationHeader verify_header = 99;
|
||||
}
|
||||
|
||||
message SearchResponse {
|
||||
// Carries list of object identifiers that match the search query.
|
||||
repeated refs.ObjectID IDList = 1;
|
||||
repeated refs.ObjectID id_list = 1;
|
||||
}
|
||||
|
||||
// Range groups the parameters of object payload range.
|
||||
message Range {
|
||||
// Carries the offset of the range from the object payload start.
|
||||
uint64 Offset = 1;
|
||||
uint64 offset = 1;
|
||||
|
||||
// Carries the length of the object payload range.
|
||||
uint64 Length = 2;
|
||||
uint64 length = 2;
|
||||
}
|
||||
|
||||
message GetRangeRequest {
|
||||
// Address carries address of the object that contains the requested payload range.
|
||||
refs.Address Address = 1;
|
||||
refs.Address address = 1;
|
||||
|
||||
// Range carries the parameters of the requested payload range.
|
||||
Range Range = 2;
|
||||
Range range = 2;
|
||||
|
||||
// Carries request meta information. Header data is used only to regulate message
|
||||
// transport and does not affect request execution.
|
||||
service.RequestMetaHeader MetaHeader = 98;
|
||||
service.RequestMetaHeader meta_header = 98;
|
||||
|
||||
// Carries request verification information. This header is used to authenticate
|
||||
// the nodes of the message route and check the correctness of transmission.
|
||||
service.RequestVerificationHeader VerifyHeader = 99;
|
||||
service.RequestVerificationHeader verify_header = 99;
|
||||
}
|
||||
|
||||
message GetRangeResponse {
|
||||
// Carries part of the object payload.
|
||||
bytes Chunk = 1;
|
||||
bytes chunk = 1;
|
||||
}
|
||||
|
||||
message GetRangeHashRequest {
|
||||
// Carries address of the object that contains the requested payload range.
|
||||
refs.Address Address = 1;
|
||||
refs.Address address = 1;
|
||||
|
||||
// Carries the list of object payload range to calculate homomorphic hash.
|
||||
repeated Range Ranges = 2;
|
||||
repeated Range ranges = 2;
|
||||
|
||||
// Carries binary salt to XOR object payload ranges before hash calculation.
|
||||
bytes Salt = 3;
|
||||
bytes salt = 3;
|
||||
|
||||
// Carries request meta information. Header data is used only to regulate message
|
||||
// transport and does not affect request execution.
|
||||
service.RequestMetaHeader MetaHeader = 98;
|
||||
service.RequestMetaHeader meta_header = 98;
|
||||
|
||||
// Carries request verification information. This header is used to authenticate
|
||||
// the nodes of the message route and check the correctness of transmission.
|
||||
service.RequestVerificationHeader VerifyHeader = 99;
|
||||
service.RequestVerificationHeader verify_header = 99;
|
||||
}
|
||||
|
||||
message GetRangeHashResponse {
|
||||
// Carries list of homomorphic hashes in a binary format.
|
||||
repeated bytes HashList = 1;
|
||||
repeated bytes hash_list = 1;
|
||||
}
|
||||
|
||||
|
|
|
@ -13,14 +13,14 @@ message Header {
|
|||
// Main groups mandatory information about the object.
|
||||
// Message fields are presented in all NeoFS objects.
|
||||
message Main {
|
||||
// PayloadLength carries length of the object payload.
|
||||
// payload_length carries length of the object payload.
|
||||
// Each object has a fixed payload length since it's immutable.
|
||||
uint64 PayloadLength = 1;
|
||||
// Address carries object address in the NeoFS system.
|
||||
uint64 payload_length = 1;
|
||||
// address carries object address in the NeoFS system.
|
||||
// It encapsulates the object and the container identifiers.
|
||||
refs.Address Address = 2;
|
||||
// OwnerID carries identifier of the object owner.
|
||||
refs.OwnerID OwnerID = 3;
|
||||
refs.Address address = 2;
|
||||
// owner_id carries identifier of the object owner.
|
||||
refs.OwnerID owner_id = 3;
|
||||
}
|
||||
|
||||
// Main carries the main part of the header.
|
||||
|
@ -33,49 +33,49 @@ message Header {
|
|||
message Extended {
|
||||
// Integrity groups evidence of the integrity of an object's structure.
|
||||
message Integrity {
|
||||
// PayloadChecksum carries the checksum of object payload bytes.
|
||||
// payload_checksum carries the checksum of object payload bytes.
|
||||
// Changing any byte of the payload changes the checksum.
|
||||
// It is calculated as a SHA-256 hash over payload bytes.
|
||||
bytes PayloadChecksum = 1;
|
||||
bytes payload_checksum = 1;
|
||||
|
||||
// HeaderChecksum carries checksum of the object header structure.
|
||||
// header_checksum carries checksum of the object header structure.
|
||||
// It covers all object attributes. Changing any field of the object except
|
||||
// CreatorKey and ChecksumSignature changes the checksum.
|
||||
// PayloadChecksum and HeaderChecksum cannot be merged due to the need
|
||||
// payload_checksum and header_checksum cannot be merged due to the need
|
||||
// to verify the header in the absence of a payload (e.g. in object.Head rpc).
|
||||
// It is calculated as a SHA-256 hash over marshaled object header
|
||||
// with cut CreatorKey and ChecksumSignature.
|
||||
bytes HeaderChecksum = 2;
|
||||
// with cut creator_key and checksum_signature.
|
||||
bytes header_checksum = 2;
|
||||
|
||||
// SessionToken carries token of the session within which the object was created.
|
||||
// session_token carries token of the session within which the object was created.
|
||||
// If session token is presented in object, it acts as the user's proof of the
|
||||
// correctness of the CreatorKey.
|
||||
service.Token SessionToken = 3;
|
||||
// correctness of the creator_key.
|
||||
service.Token session_token = 3;
|
||||
|
||||
// CreatorKey carries public key of the object creator in a binary format.
|
||||
bytes CreatorKey = 4;
|
||||
// creator_key carries public key of the object creator in a binary format.
|
||||
bytes creator_key = 4;
|
||||
|
||||
// ChecksumSignature carries signature of the structure checksum by the object creator.
|
||||
bytes ChecksumSignature = 5;
|
||||
// checksum_signature carries signature of the structure checksum by the object creator.
|
||||
bytes checksum_signature = 5;
|
||||
}
|
||||
|
||||
// Integrity carries object integrity evidence.
|
||||
// integrity carries object integrity evidence.
|
||||
Integrity integrity = 1;
|
||||
|
||||
// Attribute groups the parameters of the object attributes.
|
||||
message Attribute {
|
||||
// Key carries the string key to the object attribute.
|
||||
string Key = 1;
|
||||
// key carries the string key to the object attribute.
|
||||
string key = 1;
|
||||
|
||||
// Value carries the string value of the object attribute.
|
||||
string Value = 2;
|
||||
// value carries the string value of the object attribute.
|
||||
string value = 2;
|
||||
}
|
||||
|
||||
// Attributes carries list of the object attributes in a string key-value format.
|
||||
repeated Attribute Attributes = 2;
|
||||
// attributes carries list of the object attributes in a string key-value format.
|
||||
repeated Attribute attributes = 2;
|
||||
|
||||
// CreationEpoch carries number of NeoFS epoch on which the object was created.
|
||||
uint64 CreationEpoch = 3;
|
||||
// creation_epoch carries number of NeoFS epoch on which the object was created.
|
||||
uint64 creation_epoch = 3;
|
||||
|
||||
// Tombstone groups the options for deleting an object.
|
||||
message Tombstone {
|
||||
|
@ -84,32 +84,32 @@ message Header {
|
|||
// Tombstone marks the object to be deleted.
|
||||
Tombstone tombstone = 4;
|
||||
|
||||
// HomomorphicHash carries homomorphic hash of the object payload.
|
||||
bytes HomomorphicHash = 5;
|
||||
// homomorphic_hash carries homomorphic hash of the object payload.
|
||||
bytes homomorphic_hash = 5;
|
||||
|
||||
// StorageGroup groups meta information about a storage group.
|
||||
message StorageGroup {
|
||||
}
|
||||
|
||||
// StorageGroup marks an object containing information about a storage group.
|
||||
StorageGroup storageGroup = 6;
|
||||
StorageGroup storage_group = 6;
|
||||
|
||||
// Split groups information about spawning the object through a payload splitting.
|
||||
message Split {
|
||||
// Parent carries identifier of the origin object.
|
||||
refs.ObjectID Parent = 1;
|
||||
refs.ObjectID parent = 1;
|
||||
|
||||
// Previous carries identifier of the left split neighbor.
|
||||
refs.ObjectID Previous = 2;
|
||||
refs.ObjectID previous = 2;
|
||||
|
||||
// Previous carries identifier of the right split neighbor.
|
||||
refs.ObjectID Next = 3;
|
||||
// Next 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;
|
||||
repeated refs.ObjectID children = 4;
|
||||
|
||||
// Origin carries the header of the origin object.
|
||||
Header Origin = 5;
|
||||
Header origin = 5;
|
||||
}
|
||||
|
||||
// Split carries the position of the object in the split hierarchy.
|
||||
|
@ -124,8 +124,8 @@ message Header {
|
|||
// It consists of payload data with additional service information.
|
||||
message Object {
|
||||
// Header carries the object header.
|
||||
Header Header = 1;
|
||||
Header header = 1;
|
||||
|
||||
// Payload carries the object payload bytes.
|
||||
bytes Payload = 2;
|
||||
bytes payload = 2;
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue