[#32] Rename fields according to Protobuf Style Guide

Signed-off-by: Stanislav Bogatyrev <stanislav@nspcc.ru>
This commit is contained in:
Stanislav Bogatyrev 2020-08-07 00:59:50 +03:00 committed by Stanislav Bogatyrev
parent 5fe4c2734e
commit e75ef53793
12 changed files with 236 additions and 239 deletions

View file

@ -5,8 +5,6 @@ package accounting;
option go_package = "github.com/nspcc-dev/neofs-api-go/accounting"; option go_package = "github.com/nspcc-dev/neofs-api-go/accounting";
option csharp_namespace = "NeoFS.API.Accounting"; option csharp_namespace = "NeoFS.API.Accounting";
import "service/meta.proto";
import "service/verify.proto";
import "refs/types.proto"; import "refs/types.proto";
// The service provides methods for obtaining information // The service provides methods for obtaining information
@ -18,22 +16,22 @@ service Accounting {
// Message defines the request body of Balance method. // Message defines the request body of Balance method.
// //
// To indicate the account for which the balance is requested, its identifier is used. // To indicate the account for which the balance is requested, it's identifier is used.
// //
// To gain access to the requested information, the request body must be formed according // To gain access to the requested information, the request body must be formed according
// to the requirements from the system specification. // to the requirements from the system specification.
message BalanceRequest { message BalanceRequest {
// Carries user identifier in NeoFS system for which the balance is requested. // Carries user identifier in NeoFS system for which the balance is requested.
refs.OwnerID OwnerID = 1; refs.OwnerID owner_id = 1;
} }
// Decimal represents the decimal numbers. // Decimal represents the decimal numbers.
message Decimal { message Decimal {
// Value carries number value. // value carries number value.
int64 Value = 1; int64 value = 1;
// Precision carries value precision. // precision carries value precision.
uint32 Precision = 2; uint32 precision = 2;
} }
// Message defines the response body of Balance method. // Message defines the response body of Balance method.
@ -41,5 +39,5 @@ message Decimal {
// The amount of funds is calculated in decimal numbers. // The amount of funds is calculated in decimal numbers.
message BalanceResponse { message BalanceResponse {
// Carries the amount of funds on the account. // Carries the amount of funds on the account.
Decimal Balance = 1; Decimal balance = 1;
} }

View file

@ -10,17 +10,17 @@ import "refs/types.proto";
// Target of the access control rule in access control list. // Target of the access control rule in access control list.
enum Target { enum Target {
// Unknown target, default value. // Unknown target, default value.
Unknown = 0; UNKNOWN = 0;
// User target rule is applied if sender is the owner of the container. // User target rule is applied if sender is the owner of the container.
User = 1; USER = 1;
// System target rule is applied if sender is the storage node within the // System target rule is applied if sender is the storage node within the
// container or inner ring node. // container or inner ring node.
System = 2; SYSTEM = 2;
// Others target rule is applied if sender is not user or system target. // Others target rule is applied if sender is not user or system target.
Others = 3; OTHERS = 3;
} }
// EACLRecord groups information about extended ACL rule. // EACLRecord groups information about extended ACL rule.
@ -42,9 +42,9 @@ message EACLRecord {
// Action is an enumeration of EACL actions. // Action is an enumeration of EACL actions.
enum Action { enum Action {
ActionUnknown = 0; ACTION_UNKNOWN = 0;
Allow = 1; ALLOW = 1;
Deny = 2; DENY = 2;
} }
// Action carries ACL target action. // Action carries ACL target action.
@ -54,10 +54,10 @@ message EACLRecord {
message FilterInfo { message FilterInfo {
// Header is an enumeration of filtering header types. // Header is an enumeration of filtering header types.
enum Header { enum Header {
HeaderUnknown = 0; HEADER_UNKNOWN = 0;
Request = 1; REQUEST = 1;
ObjectSystem = 2; OBJECT_SYSTEM = 2;
ObjectUser = 3; OBJECT_USER = 3;
} }
// Header carries type of header. // Header carries type of header.
@ -65,42 +65,42 @@ message EACLRecord {
// MatchType is an enumeration of match types. // MatchType is an enumeration of match types.
enum MatchType { enum MatchType {
MatchUnknown = 0; MATCH_UNKNOWN = 0;
StringEqual = 1; STRING_EQUAL = 1;
StringNotEqual = 2; STRING_NOT_EQUAL = 2;
} }
// MatchType carries type of match. // MatchType carries type of match.
MatchType matchType = 2 [json_name = "MatchType"]; MatchType match_type = 2 [json_name = "MatchType"];
// HeaderName carries name of filtering header. // header_name carries name of filtering header.
string HeaderName = 3 [json_name="Name"]; string header_name = 3 [json_name="Name"];
// HeaderVal carries value of filtering header. // header_val carries value of filtering header.
string HeaderVal = 4 [json_name="Value"]; string header_val = 4 [json_name="Value"];
} }
// Filters carries set of filters. // filters carries set of filters.
repeated FilterInfo Filters = 3 [json_name="Filters"]; repeated FilterInfo filters = 3 [json_name="Filters"];
// TargetInfo groups information about extended ACL target. // TargetInfo groups information about extended ACL target.
message TargetInfo { message TargetInfo {
// Target carries target of ACL rule. // target carries target of ACL rule.
acl.Target Target = 1 [json_name="Role"]; acl.Target target = 1 [json_name="Role"];
// KeyList carries public keys of ACL target. // key_list carries public keys of ACL target.
repeated bytes KeyList = 2 [json_name="Keys"]; repeated bytes key_list = 2 [json_name="Keys"];
} }
// Targets carries information about extended ACL target list. // targets carries information about extended ACL target list.
repeated TargetInfo Targets = 4 [json_name="Targets"]; repeated TargetInfo targets = 4 [json_name="Targets"];
} }
// EACLRecord carries the information about extended ACL rules. // EACLRecord carries the information about extended ACL rules.
message EACLTable { message EACLTable {
// Carries identifier of the container that should use given access control rules. // Carries identifier of the container that should use given access control rules.
refs.ContainerID ContainerID = 1 [json_name="ContainerID"]; refs.ContainerID container_id = 1 [json_name="ContainerID"];
// Records carries list of extended ACL rule records. // Records carries list of extended ACL rule records.
repeated EACLRecord Records = 2 [json_name="Records"]; repeated EACLRecord records = 2 [json_name="Records"];
} }

View file

@ -43,73 +43,72 @@ service Service {
message PutRequest { message PutRequest {
// Container to create in NeoFS. // Container to create in NeoFS.
container.Container Container = 1; container.Container container = 1;
// Public Key of container owner. It can be public key of the owner // Public Key of container owner. It can be public key of the owner
// or it can be public key that bound in neofs.id smart-contract. // or it can be public key that bound in neofs.id smart-contract.
bytes PublicKey = 2; bytes public_key = 2;
// Signature of stable-marshalled container according to RFC-6979. // Signature of stable-marshalled container according to RFC-6979.
bytes Signature = 3; bytes signature = 3;
} }
message PutResponse { message PutResponse {
// ContainerID carries identifier of the new container. // container_id carries identifier of the new container.
refs.ContainerID ContainerID = 1; refs.ContainerID container_id = 1;
} }
message DeleteRequest { message DeleteRequest {
// ContainerID carries identifier of the container to delete from NeoFS. // container_id carries identifier of the container to delete from NeoFS.
refs.ContainerID ContainerID = 1; refs.ContainerID container_id = 1;
// Signature of container id according to RFC-6979. // Signature of container id according to RFC-6979.
bytes Signature = 2; bytes signature = 2;
} }
// DeleteResponse is empty because delete operation is asynchronous and done // DeleteResponse is empty because delete operation is asynchronous and done
// via consensus in inner ring nodes // via consensus in inner ring nodes
message DeleteResponse {} message DeleteResponse {}
message GetRequest { message GetRequest {
// ContainerID carries identifier of the container to get. // container_id carries identifier of the container to get.
refs.ContainerID ContainerID = 1; refs.ContainerID container_id = 1;
} }
message GetResponse { message GetResponse {
// Container that has been requested. // Container that has been requested.
container.Container Container = 1; container.Container container = 1;
} }
message ListRequest { message ListRequest {
// OwnerID carries identifier of the container owner. // owner_id carries identifier of the container owner.
refs.OwnerID OwnerID = 1; refs.OwnerID owner_id = 1;
} }
message ListResponse { message ListResponse {
// ContainerIDs carries list of identifiers of the containers that belong to the owner. // ContainerIDs carries list of identifiers of the containers that belong to the owner.
repeated refs.ContainerID ContainerIDs = 1; repeated refs.ContainerID container_ids = 1;
} }
message SetExtendedACLRequest { message SetExtendedACLRequest {
// EACL to set for the container. // Extended ACL to set for the container.
acl.EACLTable EACL = 1; acl.EACLTable eacl = 1;
// Signature of stable-marshalled Extended ACL according to RFC-6979. // Signature of stable-marshalled Extended ACL according to RFC-6979.
bytes Signature = 2; bytes signature = 2;
} }
message SetExtendedACLResponse {} message SetExtendedACLResponse {}
message GetExtendedACLRequest { message GetExtendedACLRequest {
// ContainerID carries identifier of the container that has Extended ACL. // container_id carries identifier of the container that has Extended ACL.
refs.ContainerID ContainerID = 1; refs.ContainerID container_id = 1;
} }
message GetExtendedACLResponse { message GetExtendedACLResponse {
// EACL that has been requested if it was set up. // Extended ACL that has been requested if it was set up.
acl.EACLTable EACL = 1; acl.EACLTable eacl = 1;
// Signature of stable-marshalled Extended ACL according to RFC-6979. // Signature of stable-marshalled Extended ACL according to RFC-6979.
bytes Signature = 2; bytes signature = 2;
} }

View file

@ -14,27 +14,27 @@ import "netmap/types.proto";
// SHA256 hash of stable-marshalled container message. // SHA256 hash of stable-marshalled container message.
message Container { message Container {
// OwnerID carries identifier of the container owner. // OwnerID carries identifier of the container owner.
refs.OwnerID OwnerID = 1; refs.OwnerID owner_id = 1;
// Nonce is a 16 byte UUID, used to avoid collisions of container id. // Nonce is a 16 byte UUID, used to avoid collisions of container id.
bytes Nonce = 2; bytes nonce = 2;
// BasicACL contains access control rules for owner, system, others groups and // BasicACL contains access control rules for owner, system, others groups and
// permission bits for bearer token and Extended ACL. // permission bits for bearer token and Extended ACL.
uint32 BasicACL = 3; uint32 basic_acl = 3;
// Attribute is a key-value pair of strings. // Attribute is a key-value pair of strings.
message Attribute { message Attribute {
// Key of immutable container attribute. // Key of immutable container attribute.
string Key = 1; string key = 1;
// Value of immutable container attribute. // Value of immutable container attribute.
string Value = 2; string value = 2;
} }
// Attributes define any immutable characteristics of container. // Attributes define any immutable characteristics of container.
repeated Attribute Attributes = 4; repeated Attribute attributes = 4;
// Rules define storage policy for the object inside the container. // Rules define storage policy for the object inside the container.
netmap.PlacementRule Rules = 5; netmap.PlacementRule rules = 5;
} }

View file

@ -6,14 +6,14 @@ option go_package = "github.com/nspcc-dev/neofs-api-go/netmap";
option csharp_namespace = "NeoFS.API.Netmap"; option csharp_namespace = "NeoFS.API.Netmap";
message PlacementRule { message PlacementRule {
uint32 ReplFactor = 1; uint32 repl_factor = 1;
message SFGroup { message SFGroup {
message Filter { message Filter {
string Key = 1; string key = 1;
message SimpleFilters { message SimpleFilters {
repeated SimpleFilter Filters = 1; repeated SimpleFilter filters = 1;
} }
message SimpleFilter { message SimpleFilter {
@ -29,62 +29,62 @@ message PlacementRule {
AND = 8; AND = 8;
} }
Operation Op = 1; Operation op = 1;
oneof Args { oneof Args {
string Value = 2; string value = 2;
SimpleFilters FArgs = 3; SimpleFilters f_args = 3;
} }
} }
SimpleFilter F = 2; SimpleFilter f = 2;
} }
repeated Filter Filters = 1; repeated Filter filters = 1;
message Selector { message Selector {
uint32 Count = 1; uint32 count = 1;
string Key = 2; string key = 2;
} }
repeated Selector Selectors = 2; repeated Selector selectors = 2;
repeated uint32 Exclude = 3; repeated uint32 exclude = 3;
} }
repeated SFGroup SFGroups = 2; repeated SFGroup sf_groups = 2;
} }
// Groups the information about the NeoFS node. // Groups the information about the NeoFS node.
message NodeInfo { message NodeInfo {
// Carries network address of the NeoFS node. // Carries network address of the NeoFS node.
string Address = 1; string address = 1;
// Carries public key of the NeoFS node in a binary format. // Carries public key of the NeoFS node in a binary format.
bytes PublicKey = 2; bytes public_key = 2;
// Groups attributes of the NeoFS node. // Groups attributes of the NeoFS node.
message Attribute { message Attribute {
// Carries string key to the node attribute. // Carries string key to the node attribute.
string Key = 1; string key = 1;
// Carries string value of the node attribute. // Carries string value of the node attribute.
string Value = 2; string value = 2;
} }
// // Carries list of the NeoFS node attributes in a string key-value format. // Carries list of the NeoFS node attributes in a string key-value format.
repeated Attribute Attributes = 3; repeated Attribute attributes = 3;
// Represents the enumeration of various states of the NeoFS node. // Represents the enumeration of various states of the NeoFS node.
enum State { enum State {
// Undefined state. // Undefined state.
Unknown = 0; UNKNOWN = 0;
// Active state on the network. // Active state in the network.
Online = 1; ONLINE = 1;
// Network unavailable state. // Network unavailable state.
Offline = 2; OFFLINE = 2;
} }
// Carries state of the NeoFS node. // Carries state of the NeoFS node.

View file

@ -54,30 +54,30 @@ service Service {
message GetRequest { message GetRequest {
// Carries the address of the requested object. // Carries the address of the requested object.
refs.Address Address = 1; refs.Address address = 1;
// Carries the raw option flag of the request. // Carries the raw option flag of the request.
// Raw request is sent to receive only the objects // Raw request is sent to receive only the objects
// that are physically stored on the server. // 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 // Carries request meta information. Header data is used only to regulate message
// transport and does not affect request execution. // 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 // Carries request verification information. This header is used to authenticate
// the nodes of the message route and check the correctness of transmission. // the nodes of the message route and check the correctness of transmission.
service.RequestVerificationHeader VerifyHeader = 99; service.RequestVerificationHeader verify_header = 99;
} }
message GetResponse { message GetResponse {
// Carries the single message of the response stream. // Carries the single message of the response stream.
oneof ObjectPart { oneof ObjectPart {
// Carries the object header. // Carries the object header.
Header Header = 1; Header header = 1;
// Carries part of the object payload. // 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. // Groups initialization parameters of object placement in NeoFS.
message Init { message Init {
// Carries the header of the object to save in the system. // 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 // Carries the number of the object copies to store
// within the RPC call. Default zero value is processed according // within the RPC call. Default zero value is processed according
// to the container placement rules. // to the container placement rules.
uint32 CopiesNumber = 2; uint32 copies_number = 2;
} }
// Carries the single part of the query stream. // Carries the single part of the query stream.
@ -99,38 +99,38 @@ message PutRequest {
Init init = 1; Init init = 1;
// Carries part of the object payload. // Carries part of the object payload.
bytes Chunk = 2; bytes chunk = 2;
} }
// Carries request meta information. Header data is used only to regulate message // Carries request meta information. Header data is used only to regulate message
// transport and does not affect request execution. // 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 // Carries request verification information. This header is used to authenticate
// the nodes of the message route and check the correctness of transmission. // the nodes of the message route and check the correctness of transmission.
service.RequestVerificationHeader VerifyHeader = 99; service.RequestVerificationHeader verify_header = 99;
} }
message PutResponse { message PutResponse {
// Carries identifier of the saved object. // Carries identifier of the saved object.
// It is used to access an object in the container. // It is used to access an object in the container.
refs.ObjectID ObjectID = 1; refs.ObjectID object_id = 1;
} }
message DeleteRequest { message DeleteRequest {
// Carries the address of the object to be deleted. // Carries the address of the object to be deleted.
refs.Address Address = 1; refs.Address address = 1;
// Carries identifier the object owner. // 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 // Carries request meta information. Header data is used only to regulate message
// transport and does not affect request execution. // 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 // Carries request verification information. This header is used to authenticate
// the nodes of the message route and check the correctness of transmission. // 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 // DeleteResponse is empty because we cannot guarantee permanent object removal
@ -140,120 +140,120 @@ message DeleteResponse {
message HeadRequest { message HeadRequest {
// Carries the address of the object with the requested header. // 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. // Carries the option to crop header to main part.
bool MainOnly = 2; bool main_only = 2;
// Carries the raw option flag of the request. // Carries the raw option flag of the request.
// Raw request is sent to receive only the headers of the objects // Raw request is sent to receive only the headers of the objects
// that are physically stored on the server. // 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 // Carries request meta information. Header data is used only to regulate message
// transport and does not affect request execution. // 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 // Carries request verification information. This header is used to authenticate
// the nodes of the message route and check the correctness of transmission. // the nodes of the message route and check the correctness of transmission.
service.RequestVerificationHeader VerifyHeader = 99; service.RequestVerificationHeader verify_header = 99;
} }
message HeadResponse { message HeadResponse {
// Carries the requested object header. // Carries the requested object header.
Header Header = 1; Header header = 1;
} }
message SearchRequest { message SearchRequest {
// Carries search container identifier. // Carries search container identifier.
refs.ContainerID ContainerID = 1; refs.ContainerID container_id = 1;
message Query { message Query {
uint32 Version = 1; uint32 version = 1;
message Filter { message Filter {
enum MatchType { enum MatchType {
MatchUnknown = 0; MATCH_UNKNOWN = 0;
StringEqual = 1; 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; Query query = 2;
// Carries request meta information. Header data is used only to regulate message // Carries request meta information. Header data is used only to regulate message
// transport and does not affect request execution. // 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 // Carries request verification information. This header is used to authenticate
// the nodes of the message route and check the correctness of transmission. // the nodes of the message route and check the correctness of transmission.
service.RequestVerificationHeader VerifyHeader = 99; service.RequestVerificationHeader verify_header = 99;
} }
message SearchResponse { message SearchResponse {
// Carries list of object identifiers that match the search query. // 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. // Range groups the parameters of object payload range.
message Range { message Range {
// Carries the offset of the range from the object payload start. // 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. // Carries the length of the object payload range.
uint64 Length = 2; uint64 length = 2;
} }
message GetRangeRequest { message GetRangeRequest {
// Address carries address of the object that contains the requested payload range. // 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 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 // Carries request meta information. Header data is used only to regulate message
// transport and does not affect request execution. // 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 // Carries request verification information. This header is used to authenticate
// the nodes of the message route and check the correctness of transmission. // the nodes of the message route and check the correctness of transmission.
service.RequestVerificationHeader VerifyHeader = 99; service.RequestVerificationHeader verify_header = 99;
} }
message GetRangeResponse { message GetRangeResponse {
// Carries part of the object payload. // Carries part of the object payload.
bytes Chunk = 1; bytes chunk = 1;
} }
message GetRangeHashRequest { message GetRangeHashRequest {
// Carries address of the object that contains the requested payload range. // 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. // 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. // 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 // Carries request meta information. Header data is used only to regulate message
// transport and does not affect request execution. // 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 // Carries request verification information. This header is used to authenticate
// the nodes of the message route and check the correctness of transmission. // the nodes of the message route and check the correctness of transmission.
service.RequestVerificationHeader VerifyHeader = 99; service.RequestVerificationHeader verify_header = 99;
} }
message GetRangeHashResponse { message GetRangeHashResponse {
// Carries list of homomorphic hashes in a binary format. // Carries list of homomorphic hashes in a binary format.
repeated bytes HashList = 1; repeated bytes hash_list = 1;
} }

View file

@ -13,14 +13,14 @@ message Header {
// Main groups mandatory information about the object. // Main groups mandatory information about the object.
// Message fields are presented in all NeoFS objects. // Message fields are presented in all NeoFS objects.
message Main { 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. // Each object has a fixed payload length since it's immutable.
uint64 PayloadLength = 1; uint64 payload_length = 1;
// Address carries object address in the NeoFS system. // address carries object address in the NeoFS system.
// It encapsulates the object and the container identifiers. // It encapsulates the object and the container identifiers.
refs.Address Address = 2; refs.Address address = 2;
// OwnerID carries identifier of the object owner. // owner_id carries identifier of the object owner.
refs.OwnerID OwnerID = 3; refs.OwnerID owner_id = 3;
} }
// Main carries the main part of the header. // Main carries the main part of the header.
@ -33,49 +33,49 @@ message Header {
message Extended { message Extended {
// Integrity groups evidence of the integrity of an object's structure. // Integrity groups evidence of the integrity of an object's structure.
message Integrity { 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. // Changing any byte of the payload changes the checksum.
// It is calculated as a SHA-256 hash over payload bytes. // 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 // It covers all object attributes. Changing any field of the object except
// CreatorKey and ChecksumSignature changes the checksum. // 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). // 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 // It is calculated as a SHA-256 hash over marshaled object header
// with cut CreatorKey and ChecksumSignature. // with cut creator_key and checksum_signature.
bytes HeaderChecksum = 2; 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 // If session token is presented in object, it acts as the user's proof of the
// correctness of the CreatorKey. // correctness of the creator_key.
service.Token SessionToken = 3; service.Token session_token = 3;
// CreatorKey carries public key of the object creator in a binary format. // creator_key carries public key of the object creator in a binary format.
bytes CreatorKey = 4; bytes creator_key = 4;
// ChecksumSignature carries signature of the structure checksum by the object creator. // checksum_signature carries signature of the structure checksum by the object creator.
bytes ChecksumSignature = 5; bytes checksum_signature = 5;
} }
// Integrity carries object integrity evidence. // integrity carries object integrity evidence.
Integrity integrity = 1; Integrity integrity = 1;
// Attribute groups the parameters of the object attributes. // Attribute groups the parameters of the object attributes.
message Attribute { message Attribute {
// Key carries the string key to the object attribute. // key carries the string key to the object attribute.
string Key = 1; string key = 1;
// Value carries the string value of the object attribute. // value carries the string value of the object attribute.
string Value = 2; string value = 2;
} }
// Attributes carries list of the object attributes in a string key-value format. // attributes carries list of the object attributes in a string key-value format.
repeated Attribute Attributes = 2; repeated Attribute attributes = 2;
// CreationEpoch carries number of NeoFS epoch on which the object was created. // creation_epoch carries number of NeoFS epoch on which the object was created.
uint64 CreationEpoch = 3; uint64 creation_epoch = 3;
// Tombstone groups the options for deleting an object. // Tombstone groups the options for deleting an object.
message Tombstone { message Tombstone {
@ -84,32 +84,32 @@ message Header {
// Tombstone marks the object to be deleted. // Tombstone marks the object to be deleted.
Tombstone tombstone = 4; Tombstone tombstone = 4;
// HomomorphicHash carries homomorphic hash of the object payload. // homomorphic_hash carries homomorphic hash of the object payload.
bytes HomomorphicHash = 5; bytes homomorphic_hash = 5;
// StorageGroup groups meta information about a storage group. // StorageGroup groups meta information about a storage group.
message StorageGroup { message StorageGroup {
} }
// StorageGroup marks an object containing information about a storage group. // 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. // Split groups information about spawning the object through a payload splitting.
message Split { message Split {
// Parent carries identifier of the origin object. // Parent carries identifier of the origin object.
refs.ObjectID Parent = 1; refs.ObjectID parent = 1;
// Previous carries identifier of the left split neighbor. // Previous carries identifier of the left split neighbor.
refs.ObjectID Previous = 2; refs.ObjectID previous = 2;
// Previous carries identifier of the right split neighbor. // Next carries identifier of the right split neighbor.
refs.ObjectID Next = 3; refs.ObjectID next = 3;
// Children carries list of identifiers of the objects generated by splitting the current. // 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. // 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. // 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. // It consists of payload data with additional service information.
message Object { message Object {
// Header carries the object header. // Header carries the object header.
Header Header = 1; Header header = 1;
// Payload carries the object payload bytes. // Payload carries the object payload bytes.
bytes Payload = 2; bytes payload = 2;
} }

View file

@ -7,27 +7,27 @@ option csharp_namespace = "NeoFS.API.Refs";
// Address of object (container id + object id) // Address of object (container id + object id)
message Address { message Address {
// ContainerID carries container identifier. // container_id carries container identifier.
ContainerID ContainerID = 1; ContainerID container_id = 1;
// ObjectID carries object identifier. // object_id carries object identifier.
ObjectID ObjectID = 2; ObjectID object_id = 2;
} }
// ObjectID groups information about the NeoFS object identifier. // ObjectID groups information about the NeoFS object identifier.
message ObjectID { message ObjectID {
// Value carries the object identifier in a binary format. // value carries the object identifier in a binary format.
bytes Value = 1; bytes value = 1;
} }
// ContainerID groups information about the NeoFS container identifier. // ContainerID groups information about the NeoFS container identifier.
message ContainerID { message ContainerID {
// Value carries the container identifier in a binary format. // value carries the container identifier in a binary format.
bytes Value = 1; bytes value = 1;
} }
// OwnerID group information about the owner of the NeoFS container. // OwnerID group information about the owner of the NeoFS container.
message OwnerID { message OwnerID {
// Value carries the identifier of the container owner in a binary format. // value carries the identifier of the container owner in a binary format.
bytes Value = 1; bytes value = 1;
} }

View file

@ -8,16 +8,16 @@ option csharp_namespace = "NeoFS.API.Service";
// RequestMetaHeader contains information about request meta headers. // RequestMetaHeader contains information about request meta headers.
message RequestMetaHeader { message RequestMetaHeader {
// Carries maximum number of nodes in the request route. // Carries maximum number of nodes in the request route.
uint32 TTL = 1; uint32 ttl = 1;
message XHeader { message XHeader {
// Carries key to the X-Header. // Carries key to the X-Header.
string Key = 1; string key = 1;
// Carries value of the X-Header. // Carries value of the X-Header.
string Value = 2; string value = 2;
} }
// Carries request X-Headers. // Carries request X-Headers.
repeated XHeader XHeaders = 2; repeated XHeader x_headers = 2;
} }

View file

@ -12,100 +12,100 @@ import "refs/types.proto";
message RequestVerificationHeader { message RequestVerificationHeader {
message Signature { message Signature {
// Key is compressed public key used for signature. // Key is compressed public key used for signature.
bytes Key = 1; bytes key = 1;
// Sign is signature of the request or session key. // Sign is signature of the request or session key.
bytes Sign = 2; bytes sign = 2;
} }
// Signatures is a set of signatures of every passed NeoFS Node // Signatures is a set of signatures of every passed NeoFS Node
repeated Signature Signatures = 1; repeated Signature signatures = 1;
// Token is a token of the session within which the request is sent // Token is a token of the session within which the request is sent
Token Token = 2; Token token = 2;
// Bearer is a Bearer token of the request // Bearer is a Bearer token of the request
BearerTokenMsg Bearer = 3; BearerTokenMsg bearer = 3;
} }
// User token granting rights for object manipulation // User token granting rights for object manipulation
message Token { message Token {
message Info { message Info {
// ID is a token identifier. valid UUIDv4 represented in bytes // ID is a token identifier. valid UUIDv4 represented in bytes
bytes ID = 1; bytes id = 1;
// OwnerID carries identifier of the manipulation object owner. // OwnerID carries identifier of the manipulation object owner.
refs.OwnerID OwnerID = 2; refs.OwnerID owner_id = 2;
// Verb is an enumeration of session request types // Verb is an enumeration of session request types
enum Verb { enum Verb {
// Put refers to object.Put RPC call // Put refers to object.Put RPC call
Put = 0; PUT = 0;
// Get refers to object.Get RPC call // Get refers to object.Get RPC call
Get = 1; GET = 1;
// Head refers to object.Head RPC call // Head refers to object.Head RPC call
Head = 2; HEAD = 2;
// Search refers to object.Search RPC call // Search refers to object.Search RPC call
Search = 3; SEARCH = 3;
// Delete refers to object.Delete RPC call // Delete refers to object.Delete RPC call
Delete = 4; DELETE = 4;
// Range refers to object.GetRange RPC call // Range refers to object.GetRange RPC call
Range = 5; RANGE = 5;
// RangeHash refers to object.GetRangeHash RPC call // RangeHash refers to object.GetRangeHash RPC call
RangeHash = 6; RANGEHASH = 6;
} }
// Verb is a type of request for which the token is issued // Verb is a type of request for which the token is issued
Verb verb = 3; Verb verb = 3;
// Address is an object address for which token is issued // Address is an object address for which token is issued
refs.Address Address = 4; refs.Address address = 4;
// Lifetime is a lifetime of the session // Lifetime is a lifetime of the session
TokenLifetime Lifetime = 5; TokenLifetime lifetime = 5;
// SessionKey is a public key of session key // SessionKey is a public key of session key
bytes SessionKey = 6; bytes session_key = 6;
// OwnerKey is a public key of the token owner // OwnerKey is a public key of the token owner
bytes OwnerKey = 7; bytes owner_key = 7;
} }
// TokenInfo is a grouped information about token // token_info is a grouped information about token
Info TokenInfo = 1; Info token_info = 1;
// Signature is a signature of session token information // Signature is a signature of session token information
bytes Signature = 8; bytes signature = 8;
} }
// TokenLifetime carries a group of lifetime parameters of the token // TokenLifetime carries a group of lifetime parameters of the token
message TokenLifetime { message TokenLifetime {
// Created carries an initial epoch of token lifetime // created carries an initial epoch of token lifetime
uint64 Created = 1; uint64 created = 1;
// ValidUntil carries a last epoch of token lifetime // valid_until carries a last epoch of token lifetime
uint64 ValidUntil = 2; uint64 valid_until = 2;
} }
// BearerTokenMsg carries information about request ACL rules with limited lifetime // BearerTokenMsg carries information about request ACL rules with limited lifetime
message BearerTokenMsg { message BearerTokenMsg {
message Info { message Info {
// EACLTable carries table of extended ACL rules. // EACLTable carries table of extended ACL rules.
acl.EACLTable EACLTable = 1; acl.EACLTable eacl_table = 1;
// OwnerID carries identifier of the token owner. // OwnerID carries identifier of the token owner.
refs.OwnerID OwnerID = 2; refs.OwnerID owner_id = 2;
// ValidUntil carries a last epoch of token lifetime // ValidUntil carries a last epoch of token lifetime
uint64 ValidUntil = 3; uint64 valid_until = 3;
} }
// TokenInfo is a grouped information about token // token_info is a grouped information about token
Info TokenInfo = 1; Info token_info = 1;
// OwnerKey is a public key of the token owner // owner_key is a public key of the token owner
bytes OwnerKey = 2; bytes owner_key = 2;
// Signature is a signature of token information // Signature is a signature of token information
bytes Signature = 3; bytes signature = 3;
} }

View file

@ -17,25 +17,25 @@ service Session {
// CreateRequest carries an information necessary for opening a session. // CreateRequest carries an information necessary for opening a session.
message CreateRequest { message CreateRequest {
// Carries an identifier of a session initiator. // Carries an identifier of a session initiator.
refs.OwnerID OwnerID = 1; refs.OwnerID owner_id = 1;
// Carries a lifetime of the session. // Carries a lifetime of the session.
service.TokenLifetime Lifetime = 2; service.TokenLifetime lifetime = 2;
// Carries request meta information. Header data is used only to regulate message // Carries request meta information. Header data is used only to regulate message
// transport and does not affect request execution. // 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 // Carries request verification information. This header is used to authenticate
// the nodes of the message route and check the correctness of transmission. // the nodes of the message route and check the correctness of transmission.
service.RequestVerificationHeader VerifyHeader = 99; service.RequestVerificationHeader verify_header = 99;
} }
// CreateResponse carries an information about the opened session. // CreateResponse carries an information about the opened session.
message CreateResponse { message CreateResponse {
// ID carries an identifier of session token. // id carries an identifier of session token.
bytes ID = 1; bytes id = 1;
// SessionKey carries a session public key. // session_key carries a session public key.
bytes SessionKey = 2; bytes session_key = 2;
} }

View file

@ -10,17 +10,17 @@ import "refs/types.proto";
// StorageGroup groups the information about the NeoFS storage group. // StorageGroup groups the information about the NeoFS storage group.
// The storage group consists of objects from single container. // The storage group consists of objects from single container.
message StorageGroup { message StorageGroup {
// ValidationDataSize carries the total size of the payloads of the storage group members. // validation_data_size carries the total size of the payloads of the storage group members.
uint64 ValidationDataSize = 1; uint64 validation_data_size = 1;
// ValidationHash carries homomorphic hash from the concatenation of the payloads of the storage group members. // validation_hash carries homomorphic hash from the concatenation of the payloads of the storage group members.
// The order of concatenation is the same as the order of the members in the Members field. // The order of concatenation is the same as the order of the members in the Members field.
bytes ValidationHash = 2; bytes validation_hash = 2;
// ExpirationEpoch carries last NeoFS epoch number of the storage group lifetime. // expiration_epoch carries last NeoFS epoch number of the storage group lifetime.
uint64 ExpirationEpoch = 3; uint64 expiration_epoch = 3;
// Members carries the list of identifiers of the object storage group members. // Members carries the list of identifiers of the object storage group members.
// The list is strictly ordered. // The list is strictly ordered.
repeated refs.ObjectID Members = 4; repeated refs.ObjectID members = 4;
} }