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
|
@ -5,8 +5,6 @@ package accounting;
|
|||
option go_package = "github.com/nspcc-dev/neofs-api-go/accounting";
|
||||
option csharp_namespace = "NeoFS.API.Accounting";
|
||||
|
||||
import "service/meta.proto";
|
||||
import "service/verify.proto";
|
||||
import "refs/types.proto";
|
||||
|
||||
// The service provides methods for obtaining information
|
||||
|
@ -18,22 +16,22 @@ service Accounting {
|
|||
|
||||
// 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 the requirements from the system specification.
|
||||
message BalanceRequest {
|
||||
// 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.
|
||||
message Decimal {
|
||||
// Value carries number value.
|
||||
int64 Value = 1;
|
||||
// value carries number value.
|
||||
int64 value = 1;
|
||||
|
||||
// Precision carries value precision.
|
||||
uint32 Precision = 2;
|
||||
// precision carries value precision.
|
||||
uint32 precision = 2;
|
||||
}
|
||||
|
||||
// Message defines the response body of Balance method.
|
||||
|
@ -41,5 +39,5 @@ message Decimal {
|
|||
// The amount of funds is calculated in decimal numbers.
|
||||
message BalanceResponse {
|
||||
// Carries the amount of funds on the account.
|
||||
Decimal Balance = 1;
|
||||
Decimal balance = 1;
|
||||
}
|
||||
|
|
|
@ -10,17 +10,17 @@ import "refs/types.proto";
|
|||
// Target of the access control rule in access control list.
|
||||
enum Target {
|
||||
// Unknown target, default value.
|
||||
Unknown = 0;
|
||||
UNKNOWN = 0;
|
||||
|
||||
// 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
|
||||
// container or inner ring node.
|
||||
System = 2;
|
||||
SYSTEM = 2;
|
||||
|
||||
// Others target rule is applied if sender is not user or system target.
|
||||
Others = 3;
|
||||
OTHERS = 3;
|
||||
}
|
||||
|
||||
// EACLRecord groups information about extended ACL rule.
|
||||
|
@ -42,9 +42,9 @@ message EACLRecord {
|
|||
|
||||
// Action is an enumeration of EACL actions.
|
||||
enum Action {
|
||||
ActionUnknown = 0;
|
||||
Allow = 1;
|
||||
Deny = 2;
|
||||
ACTION_UNKNOWN = 0;
|
||||
ALLOW = 1;
|
||||
DENY = 2;
|
||||
}
|
||||
|
||||
// Action carries ACL target action.
|
||||
|
@ -54,10 +54,10 @@ message EACLRecord {
|
|||
message FilterInfo {
|
||||
// Header is an enumeration of filtering header types.
|
||||
enum Header {
|
||||
HeaderUnknown = 0;
|
||||
Request = 1;
|
||||
ObjectSystem = 2;
|
||||
ObjectUser = 3;
|
||||
HEADER_UNKNOWN = 0;
|
||||
REQUEST = 1;
|
||||
OBJECT_SYSTEM = 2;
|
||||
OBJECT_USER = 3;
|
||||
}
|
||||
|
||||
// Header carries type of header.
|
||||
|
@ -65,42 +65,42 @@ message EACLRecord {
|
|||
|
||||
// MatchType is an enumeration of match types.
|
||||
enum MatchType {
|
||||
MatchUnknown = 0;
|
||||
StringEqual = 1;
|
||||
StringNotEqual = 2;
|
||||
MATCH_UNKNOWN = 0;
|
||||
STRING_EQUAL = 1;
|
||||
STRING_NOT_EQUAL = 2;
|
||||
}
|
||||
|
||||
// MatchType carries type of match.
|
||||
MatchType matchType = 2 [json_name = "MatchType"];
|
||||
MatchType match_type = 2 [json_name = "MatchType"];
|
||||
|
||||
// HeaderName carries name of filtering header.
|
||||
string HeaderName = 3 [json_name="Name"];
|
||||
// header_name carries name of filtering header.
|
||||
string header_name = 3 [json_name="Name"];
|
||||
|
||||
// HeaderVal carries value of filtering header.
|
||||
string HeaderVal = 4 [json_name="Value"];
|
||||
// header_val carries value of filtering header.
|
||||
string header_val = 4 [json_name="Value"];
|
||||
}
|
||||
|
||||
// Filters carries set of filters.
|
||||
repeated FilterInfo Filters = 3 [json_name="Filters"];
|
||||
// filters carries set of filters.
|
||||
repeated FilterInfo filters = 3 [json_name="Filters"];
|
||||
|
||||
// TargetInfo groups information about extended ACL target.
|
||||
message TargetInfo {
|
||||
// Target carries target of ACL rule.
|
||||
acl.Target Target = 1 [json_name="Role"];
|
||||
// target carries target of ACL rule.
|
||||
acl.Target target = 1 [json_name="Role"];
|
||||
|
||||
// KeyList carries public keys of ACL target.
|
||||
repeated bytes KeyList = 2 [json_name="Keys"];
|
||||
// key_list carries public keys of ACL target.
|
||||
repeated bytes key_list = 2 [json_name="Keys"];
|
||||
}
|
||||
|
||||
// Targets carries information about extended ACL target list.
|
||||
repeated TargetInfo Targets = 4 [json_name="Targets"];
|
||||
// targets carries information about extended ACL target list.
|
||||
repeated TargetInfo targets = 4 [json_name="Targets"];
|
||||
}
|
||||
|
||||
// EACLRecord carries the information about extended ACL rules.
|
||||
message EACLTable {
|
||||
// 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.
|
||||
repeated EACLRecord Records = 2 [json_name="Records"];
|
||||
repeated EACLRecord records = 2 [json_name="Records"];
|
||||
}
|
||||
|
|
|
@ -43,73 +43,72 @@ service Service {
|
|||
|
||||
message PutRequest {
|
||||
// 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
|
||||
// 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.
|
||||
bytes Signature = 3;
|
||||
bytes signature = 3;
|
||||
}
|
||||
|
||||
message PutResponse {
|
||||
// ContainerID carries identifier of the new container.
|
||||
refs.ContainerID ContainerID = 1;
|
||||
// container_id carries identifier of the new container.
|
||||
refs.ContainerID container_id = 1;
|
||||
}
|
||||
|
||||
message DeleteRequest {
|
||||
// ContainerID carries identifier of the container to delete from NeoFS.
|
||||
refs.ContainerID ContainerID = 1;
|
||||
// container_id carries identifier of the container to delete from NeoFS.
|
||||
refs.ContainerID container_id = 1;
|
||||
|
||||
// Signature of container id according to RFC-6979.
|
||||
bytes Signature = 2;
|
||||
bytes signature = 2;
|
||||
}
|
||||
|
||||
// DeleteResponse is empty because delete operation is asynchronous and done
|
||||
// via consensus in inner ring nodes
|
||||
message DeleteResponse {}
|
||||
|
||||
|
||||
message GetRequest {
|
||||
// ContainerID carries identifier of the container to get.
|
||||
refs.ContainerID ContainerID = 1;
|
||||
// container_id carries identifier of the container to get.
|
||||
refs.ContainerID container_id = 1;
|
||||
}
|
||||
|
||||
message GetResponse {
|
||||
// Container that has been requested.
|
||||
container.Container Container = 1;
|
||||
container.Container container = 1;
|
||||
}
|
||||
|
||||
message ListRequest {
|
||||
// OwnerID carries identifier of the container owner.
|
||||
refs.OwnerID OwnerID = 1;
|
||||
// owner_id carries identifier of the container owner.
|
||||
refs.OwnerID owner_id = 1;
|
||||
}
|
||||
|
||||
message ListResponse {
|
||||
// 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 {
|
||||
// EACL to set for the container.
|
||||
acl.EACLTable EACL = 1;
|
||||
// Extended ACL to set for the container.
|
||||
acl.EACLTable eacl = 1;
|
||||
|
||||
// Signature of stable-marshalled Extended ACL according to RFC-6979.
|
||||
bytes Signature = 2;
|
||||
bytes signature = 2;
|
||||
}
|
||||
|
||||
message SetExtendedACLResponse {}
|
||||
|
||||
message GetExtendedACLRequest {
|
||||
// ContainerID carries identifier of the container that has Extended ACL.
|
||||
refs.ContainerID ContainerID = 1;
|
||||
// container_id carries identifier of the container that has Extended ACL.
|
||||
refs.ContainerID container_id = 1;
|
||||
}
|
||||
|
||||
message GetExtendedACLResponse {
|
||||
// EACL that has been requested if it was set up.
|
||||
acl.EACLTable EACL = 1;
|
||||
// Extended ACL that has been requested if it was set up.
|
||||
acl.EACLTable eacl = 1;
|
||||
|
||||
// Signature of stable-marshalled Extended ACL according to RFC-6979.
|
||||
bytes Signature = 2;
|
||||
bytes signature = 2;
|
||||
}
|
||||
|
|
|
@ -14,27 +14,27 @@ import "netmap/types.proto";
|
|||
// SHA256 hash of stable-marshalled container message.
|
||||
message Container {
|
||||
// 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.
|
||||
bytes Nonce = 2;
|
||||
bytes nonce = 2;
|
||||
|
||||
// BasicACL contains access control rules for owner, system, others groups and
|
||||
// permission bits for bearer token and Extended ACL.
|
||||
uint32 BasicACL = 3;
|
||||
uint32 basic_acl = 3;
|
||||
|
||||
// Attribute is a key-value pair of strings.
|
||||
message Attribute {
|
||||
// Key of immutable container attribute.
|
||||
string Key = 1;
|
||||
string key = 1;
|
||||
|
||||
// Value of immutable container attribute.
|
||||
string Value = 2;
|
||||
string value = 2;
|
||||
}
|
||||
|
||||
// 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.
|
||||
netmap.PlacementRule Rules = 5;
|
||||
netmap.PlacementRule rules = 5;
|
||||
}
|
||||
|
|
|
@ -6,14 +6,14 @@ option go_package = "github.com/nspcc-dev/neofs-api-go/netmap";
|
|||
option csharp_namespace = "NeoFS.API.Netmap";
|
||||
|
||||
message PlacementRule {
|
||||
uint32 ReplFactor = 1;
|
||||
uint32 repl_factor = 1;
|
||||
|
||||
message SFGroup {
|
||||
message Filter {
|
||||
string Key = 1;
|
||||
string key = 1;
|
||||
|
||||
message SimpleFilters {
|
||||
repeated SimpleFilter Filters = 1;
|
||||
repeated SimpleFilter filters = 1;
|
||||
}
|
||||
|
||||
message SimpleFilter {
|
||||
|
@ -29,62 +29,62 @@ message PlacementRule {
|
|||
AND = 8;
|
||||
}
|
||||
|
||||
Operation Op = 1;
|
||||
Operation op = 1;
|
||||
|
||||
oneof Args {
|
||||
string Value = 2;
|
||||
SimpleFilters FArgs = 3;
|
||||
string value = 2;
|
||||
SimpleFilters f_args = 3;
|
||||
}
|
||||
}
|
||||
|
||||
SimpleFilter F = 2;
|
||||
SimpleFilter f = 2;
|
||||
}
|
||||
|
||||
repeated Filter Filters = 1;
|
||||
repeated Filter filters = 1;
|
||||
|
||||
message Selector {
|
||||
uint32 Count = 1;
|
||||
string Key = 2;
|
||||
uint32 count = 1;
|
||||
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.
|
||||
message NodeInfo {
|
||||
// Carries network address of the NeoFS node.
|
||||
string Address = 1;
|
||||
string address = 1;
|
||||
|
||||
// Carries public key of the NeoFS node in a binary format.
|
||||
bytes PublicKey = 2;
|
||||
bytes public_key = 2;
|
||||
|
||||
// Groups attributes of the NeoFS node.
|
||||
message Attribute {
|
||||
// Carries string key to the node attribute.
|
||||
string Key = 1;
|
||||
string key = 1;
|
||||
|
||||
// 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.
|
||||
repeated Attribute Attributes = 3;
|
||||
// Carries list of the NeoFS node attributes in a string key-value format.
|
||||
repeated Attribute attributes = 3;
|
||||
|
||||
// Represents the enumeration of various states of the NeoFS node.
|
||||
enum State {
|
||||
// Undefined state.
|
||||
Unknown = 0;
|
||||
UNKNOWN = 0;
|
||||
|
||||
// Active state on the network.
|
||||
Online = 1;
|
||||
// Active state in the network.
|
||||
ONLINE = 1;
|
||||
|
||||
// Network unavailable state.
|
||||
Offline = 2;
|
||||
OFFLINE = 2;
|
||||
}
|
||||
|
||||
// Carries state of the NeoFS node.
|
||||
|
|
|
@ -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;
|
||||
}
|
||||
|
|
|
@ -7,27 +7,27 @@ option csharp_namespace = "NeoFS.API.Refs";
|
|||
|
||||
// Address of object (container id + object id)
|
||||
message Address {
|
||||
// ContainerID carries container identifier.
|
||||
ContainerID ContainerID = 1;
|
||||
// container_id carries container identifier.
|
||||
ContainerID container_id = 1;
|
||||
|
||||
// ObjectID carries object identifier.
|
||||
ObjectID ObjectID = 2;
|
||||
// object_id carries object identifier.
|
||||
ObjectID object_id = 2;
|
||||
}
|
||||
|
||||
// ObjectID groups information about the NeoFS object identifier.
|
||||
message ObjectID {
|
||||
// Value carries the object identifier in a binary format.
|
||||
bytes Value = 1;
|
||||
// value carries the object identifier in a binary format.
|
||||
bytes value = 1;
|
||||
}
|
||||
|
||||
// ContainerID groups information about the NeoFS container identifier.
|
||||
message ContainerID {
|
||||
// Value carries the container identifier in a binary format.
|
||||
bytes Value = 1;
|
||||
// value carries the container identifier in a binary format.
|
||||
bytes value = 1;
|
||||
}
|
||||
|
||||
// OwnerID group information about the owner of the NeoFS container.
|
||||
message OwnerID {
|
||||
// Value carries the identifier of the container owner in a binary format.
|
||||
bytes Value = 1;
|
||||
// value carries the identifier of the container owner in a binary format.
|
||||
bytes value = 1;
|
||||
}
|
|
@ -8,16 +8,16 @@ option csharp_namespace = "NeoFS.API.Service";
|
|||
// RequestMetaHeader contains information about request meta headers.
|
||||
message RequestMetaHeader {
|
||||
// Carries maximum number of nodes in the request route.
|
||||
uint32 TTL = 1;
|
||||
uint32 ttl = 1;
|
||||
|
||||
message XHeader {
|
||||
// Carries key to the X-Header.
|
||||
string Key = 1;
|
||||
string key = 1;
|
||||
|
||||
// Carries value of the X-Header.
|
||||
string Value = 2;
|
||||
string value = 2;
|
||||
}
|
||||
|
||||
// Carries request X-Headers.
|
||||
repeated XHeader XHeaders = 2;
|
||||
repeated XHeader x_headers = 2;
|
||||
}
|
||||
|
|
|
@ -12,100 +12,100 @@ import "refs/types.proto";
|
|||
message RequestVerificationHeader {
|
||||
message Signature {
|
||||
// Key is compressed public key used for signature.
|
||||
bytes Key = 1;
|
||||
bytes key = 1;
|
||||
|
||||
// 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
|
||||
repeated Signature Signatures = 1;
|
||||
repeated Signature signatures = 1;
|
||||
|
||||
// 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
|
||||
BearerTokenMsg Bearer = 3;
|
||||
BearerTokenMsg bearer = 3;
|
||||
}
|
||||
|
||||
// User token granting rights for object manipulation
|
||||
message Token {
|
||||
message Info {
|
||||
// ID is a token identifier. valid UUIDv4 represented in bytes
|
||||
bytes ID = 1;
|
||||
bytes id = 1;
|
||||
|
||||
// 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
|
||||
enum Verb {
|
||||
// Put refers to object.Put RPC call
|
||||
Put = 0;
|
||||
PUT = 0;
|
||||
// Get refers to object.Get RPC call
|
||||
Get = 1;
|
||||
GET = 1;
|
||||
// Head refers to object.Head RPC call
|
||||
Head = 2;
|
||||
HEAD = 2;
|
||||
// Search refers to object.Search RPC call
|
||||
Search = 3;
|
||||
SEARCH = 3;
|
||||
// Delete refers to object.Delete RPC call
|
||||
Delete = 4;
|
||||
DELETE = 4;
|
||||
// Range refers to object.GetRange RPC call
|
||||
Range = 5;
|
||||
RANGE = 5;
|
||||
// RangeHash refers to object.GetRangeHash RPC call
|
||||
RangeHash = 6;
|
||||
RANGEHASH = 6;
|
||||
}
|
||||
|
||||
// Verb is a type of request for which the token is issued
|
||||
Verb verb = 3;
|
||||
|
||||
// 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
|
||||
TokenLifetime Lifetime = 5;
|
||||
TokenLifetime lifetime = 5;
|
||||
|
||||
// SessionKey is a public key of session key
|
||||
bytes SessionKey = 6;
|
||||
bytes session_key = 6;
|
||||
|
||||
// OwnerKey is a public key of the token owner
|
||||
bytes OwnerKey = 7;
|
||||
bytes owner_key = 7;
|
||||
}
|
||||
|
||||
// TokenInfo is a grouped information about token
|
||||
Info TokenInfo = 1;
|
||||
// token_info is a grouped information about token
|
||||
Info token_info = 1;
|
||||
|
||||
// Signature is a signature of session token information
|
||||
bytes Signature = 8;
|
||||
bytes signature = 8;
|
||||
}
|
||||
|
||||
// TokenLifetime carries a group of lifetime parameters of the token
|
||||
message TokenLifetime {
|
||||
// Created carries an initial epoch of token lifetime
|
||||
uint64 Created = 1;
|
||||
// created carries an initial epoch of token lifetime
|
||||
uint64 created = 1;
|
||||
|
||||
// ValidUntil carries a last epoch of token lifetime
|
||||
uint64 ValidUntil = 2;
|
||||
// valid_until carries a last epoch of token lifetime
|
||||
uint64 valid_until = 2;
|
||||
}
|
||||
|
||||
// BearerTokenMsg carries information about request ACL rules with limited lifetime
|
||||
message BearerTokenMsg {
|
||||
message Info {
|
||||
// EACLTable carries table of extended ACL rules.
|
||||
acl.EACLTable EACLTable = 1;
|
||||
acl.EACLTable eacl_table = 1;
|
||||
|
||||
// OwnerID carries identifier of the token owner.
|
||||
refs.OwnerID OwnerID = 2;
|
||||
refs.OwnerID owner_id = 2;
|
||||
|
||||
// ValidUntil carries a last epoch of token lifetime
|
||||
uint64 ValidUntil = 3;
|
||||
uint64 valid_until = 3;
|
||||
}
|
||||
|
||||
// TokenInfo is a grouped information about token
|
||||
Info TokenInfo = 1;
|
||||
// token_info is a grouped information about token
|
||||
Info token_info = 1;
|
||||
|
||||
// OwnerKey is a public key of the token owner
|
||||
bytes OwnerKey = 2;
|
||||
// owner_key is a public key of the token owner
|
||||
bytes owner_key = 2;
|
||||
|
||||
// Signature is a signature of token information
|
||||
bytes Signature = 3;
|
||||
bytes signature = 3;
|
||||
}
|
||||
|
|
|
@ -17,25 +17,25 @@ service Session {
|
|||
// CreateRequest carries an information necessary for opening a session.
|
||||
message CreateRequest {
|
||||
// Carries an identifier of a session initiator.
|
||||
refs.OwnerID OwnerID = 1;
|
||||
refs.OwnerID owner_id = 1;
|
||||
|
||||
// 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
|
||||
// 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;
|
||||
}
|
||||
|
||||
// CreateResponse carries an information about the opened session.
|
||||
message CreateResponse {
|
||||
// ID carries an identifier of session token.
|
||||
bytes ID = 1;
|
||||
// id carries an identifier of session token.
|
||||
bytes id = 1;
|
||||
|
||||
// SessionKey carries a session public key.
|
||||
bytes SessionKey = 2;
|
||||
// session_key carries a session public key.
|
||||
bytes session_key = 2;
|
||||
}
|
||||
|
|
|
@ -10,17 +10,17 @@ import "refs/types.proto";
|
|||
// StorageGroup groups the information about the NeoFS storage group.
|
||||
// The storage group consists of objects from single container.
|
||||
message StorageGroup {
|
||||
// ValidationDataSize carries the total size of the payloads of the storage group members.
|
||||
uint64 ValidationDataSize = 1;
|
||||
// validation_data_size carries the total size of the payloads of the storage group members.
|
||||
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.
|
||||
bytes ValidationHash = 2;
|
||||
bytes validation_hash = 2;
|
||||
|
||||
// ExpirationEpoch carries last NeoFS epoch number of the storage group lifetime.
|
||||
uint64 ExpirationEpoch = 3;
|
||||
// expiration_epoch carries last NeoFS epoch number of the storage group lifetime.
|
||||
uint64 expiration_epoch = 3;
|
||||
|
||||
// Members carries the list of identifiers of the object storage group members.
|
||||
// The list is strictly ordered.
|
||||
repeated refs.ObjectID Members = 4;
|
||||
repeated refs.ObjectID members = 4;
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue