[#41] Reindent according to Google Style Guide

Just a minor change to follow 2-space indent declared in Google Style Guide

Signed-off-by: Stanislav Bogatyrev <stanislav@nspcc.ru>
This commit is contained in:
Stanislav Bogatyrev 2020-08-11 12:03:50 +03:00 committed by Stanislav Bogatyrev
parent 35774d4ef7
commit 327c476ecf
12 changed files with 607 additions and 597 deletions

View file

@ -10,34 +10,35 @@ import "refs/types.proto";
// The service provides methods for obtaining information
// about the account balance in NeoFS system.
service Accounting {
// Returns the amount of funds for the requested NeoFS account.
rpc Balance (BalanceRequest) returns (BalanceResponse);
// Returns the amount of funds for the requested NeoFS account.
rpc Balance (BalanceRequest) returns (BalanceResponse);
}
// Message defines the request body of Balance method.
//
// To indicate the account for which the balance is requested, it's 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.
// 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 owner_id = 1;
// Carries user identifier in NeoFS system for which the balance is requested.
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.
//
// The amount of funds is calculated in decimal numbers.
message BalanceResponse {
// Carries the amount of funds on the account.
Decimal balance = 1;
// Carries the amount of funds on the account.
Decimal balance = 1;
}

View file

@ -9,98 +9,99 @@ import "refs/types.proto";
// Target of the access control rule in access control list.
enum Target {
// Unknown target, default value.
UNKNOWN = 0;
// Unknown target, default value.
UNKNOWN = 0;
// User target rule is applied if sender is the owner of the container.
USER = 1;
// User target rule is applied if sender is the owner of the container.
USER = 1;
// System target rule is applied if sender is the storage node within the
// container or inner ring node.
SYSTEM = 2;
// System target rule is applied if sender is the storage node within the
// container or inner ring node.
SYSTEM = 2;
// Others target rule is applied if sender is not user or system target.
OTHERS = 3;
// Others target rule is applied if sender is not user or system target.
OTHERS = 3;
}
// EACLRecord groups information about extended ACL rule.
message EACLRecord {
// Operation is an enumeration of operation types.
enum Operation {
OPERATION_UNKNOWN = 0;
GET = 1;
HEAD = 2;
PUT = 3;
DELETE = 4;
SEARCH = 5;
GETRANGE = 6;
GETRANGEHASH = 7;
// Operation is an enumeration of operation types.
enum Operation {
OPERATION_UNKNOWN = 0;
GET = 1;
HEAD = 2;
PUT = 3;
DELETE = 4;
SEARCH = 5;
GETRANGE = 6;
GETRANGEHASH = 7;
}
// Operation carries type of operation.
Operation operation = 1 [json_name = "Operation"];
// Action is an enumeration of EACL actions.
enum Action {
ACTION_UNKNOWN = 0;
ALLOW = 1;
DENY = 2;
}
// Action carries ACL target action.
Action action = 2 [json_name = "Action"];
// FilterInfo groups information about filter.
message FilterInfo {
// Header is an enumeration of filtering header types.
enum Header {
HEADER_UNKNOWN = 0;
REQUEST = 1;
OBJECT_SYSTEM = 2;
OBJECT_USER = 3;
}
// Operation carries type of operation.
Operation operation = 1 [json_name = "Operation"];
// Header carries type of header.
Header header = 1 [json_name = "HeaderType"];
// Action is an enumeration of EACL actions.
enum Action {
ACTION_UNKNOWN = 0;
ALLOW = 1;
DENY = 2;
// MatchType is an enumeration of match types.
enum MatchType {
MATCH_UNKNOWN = 0;
STRING_EQUAL = 1;
STRING_NOT_EQUAL = 2;
}
// Action carries ACL target action.
Action action = 2 [json_name = "Action"];
// MatchType carries type of match.
MatchType match_type = 2 [json_name = "MatchType"];
// FilterInfo groups information about filter.
message FilterInfo {
// Header is an enumeration of filtering header types.
enum Header {
HEADER_UNKNOWN = 0;
REQUEST = 1;
OBJECT_SYSTEM = 2;
OBJECT_USER = 3;
}
// header_name carries name of filtering header.
string header_name = 3 [json_name="Name"];
// Header carries type of header.
Header header = 1 [json_name = "HeaderType"];
// header_val carries value of filtering header.
string header_val = 4 [json_name="Value"];
}
// MatchType is an enumeration of match types.
enum MatchType {
MATCH_UNKNOWN = 0;
STRING_EQUAL = 1;
STRING_NOT_EQUAL = 2;
}
// filters carries set of filters.
repeated FilterInfo filters = 3 [json_name="Filters"];
// MatchType carries type of match.
MatchType match_type = 2 [json_name = "MatchType"];
// TargetInfo groups information about extended ACL target.
message TargetInfo {
// target carries target of ACL rule.
acl.Target target = 1 [json_name="Role"];
// header_name carries name of filtering header.
string header_name = 3 [json_name="Name"];
// key_list carries public keys of ACL target.
repeated bytes key_list = 2 [json_name="Keys"];
}
// 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"];
// TargetInfo groups information about extended ACL target.
message TargetInfo {
// target carries target of ACL rule.
acl.Target target = 1 [json_name="Role"];
// 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 container_id = 1 [json_name="ContainerID"];
// Carries identifier of the container that should use given
// access control rules.
refs.ContainerID container_id = 1 [json_name="ContainerID"];
// Records carries list of extended ACL rule records.
repeated EACLRecord records = 2 [json_name="Records"];
// Records carries list of extended ACL rule records.
repeated EACLRecord records = 2 [json_name="Records"];
}

View file

@ -12,58 +12,58 @@ import "refs/types.proto";
// Service provides API to access container smart-contract in morph chain
// via NeoFS node.
service Service {
// Put invokes 'Put' method in container smart-contract and returns
// response immediately. After new block in morph chain, request is verified
// by inner ring nodes. After one more block in morph chain, container
// added into smart-contract storage.
rpc Put(PutRequest) returns (PutResponse);
// Put invokes 'Put' method in container smart-contract and returns
// response immediately. After new block in morph chain, request is verified
// by inner ring nodes. After one more block in morph chain, container
// added into smart-contract storage.
rpc Put(PutRequest) returns (PutResponse);
// Delete invokes 'Delete' method in container smart-contract and returns
// response immediately. After new block in morph chain, request is verified
// by inner ring nodes. After one more block in morph chain, container
// removed from smart-contract storage.
rpc Delete(DeleteRequest) returns (DeleteResponse);
// Delete invokes 'Delete' method in container smart-contract and returns
// response immediately. After new block in morph chain, request is verified
// by inner ring nodes. After one more block in morph chain, container
// removed from smart-contract storage.
rpc Delete(DeleteRequest) returns (DeleteResponse);
// Get returns container from container smart-contract storage.
rpc Get(GetRequest) returns (GetResponse);
// Get returns container from container smart-contract storage.
rpc Get(GetRequest) returns (GetResponse);
// List returns all owner's containers from container smart-contract
// storage.
rpc List(ListRequest) returns (ListResponse);
// List returns all owner's containers from container smart-contract
// storage.
rpc List(ListRequest) returns (ListResponse);
// SetExtendedACL invokes 'SetEACL' method in container smart-contract and
// returns response immediately. After new block in morph chain,
// Extended ACL added into smart-contract storage.
rpc SetExtendedACL(SetExtendedACLRequest) returns (SetExtendedACLResponse);
// SetExtendedACL invokes 'SetEACL' method in container smart-contract and
// returns response immediately. After new block in morph chain,
// Extended ACL added into smart-contract storage.
rpc SetExtendedACL(SetExtendedACLRequest) returns (SetExtendedACLResponse);
// GetExtendedACL returns Extended ACL table and signature from container
// smart-contract storage.
rpc GetExtendedACL(GetExtendedACLRequest) returns (GetExtendedACLResponse);
// GetExtendedACL returns Extended ACL table and signature from container
// smart-contract storage.
rpc GetExtendedACL(GetExtendedACLRequest) returns (GetExtendedACLResponse);
}
message PutRequest {
// Container to create in NeoFS.
container.Container container = 1;
// Container to create in NeoFS.
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 public_key = 2;
// 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 public_key = 2;
// Signature of stable-marshalled container according to RFC-6979.
bytes signature = 3;
// Signature of stable-marshalled container according to RFC-6979.
bytes signature = 3;
}
message PutResponse {
// container_id carries identifier of the new container.
refs.ContainerID container_id = 1;
// container_id carries identifier of the new container.
refs.ContainerID container_id = 1;
}
message DeleteRequest {
// container_id carries identifier of the container to delete from NeoFS.
refs.ContainerID container_id = 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;
// Signature of container id according to RFC-6979.
bytes signature = 2;
}
// DeleteResponse is empty because delete operation is asynchronous and done
@ -71,44 +71,45 @@ message DeleteRequest {
message DeleteResponse {}
message GetRequest {
// container_id carries identifier of the container to get.
refs.ContainerID container_id = 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 that has been requested.
container.Container container = 1;
}
message ListRequest {
// owner_id carries identifier of the container owner.
refs.OwnerID owner_id = 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 container_ids = 1;
// ContainerIDs carries list of identifiers of the containers that belong
// to the owner.
repeated refs.ContainerID container_ids = 1;
}
message SetExtendedACLRequest {
// Extended ACL 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;
// Signature of stable-marshalled Extended ACL according to RFC-6979.
bytes signature = 2;
}
message SetExtendedACLResponse {}
message GetExtendedACLRequest {
// container_id carries identifier of the container that has Extended ACL.
refs.ContainerID container_id = 1;
// container_id carries identifier of the container that has Extended ACL.
refs.ContainerID container_id = 1;
}
message GetExtendedACLResponse {
// Extended ACL 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;
// Signature of stable-marshalled Extended ACL according to RFC-6979.
bytes signature = 2;
}

View file

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

View file

@ -6,87 +6,87 @@ option go_package = "github.com/nspcc-dev/neofs-api-go/netmap";
option csharp_namespace = "NeoFS.API.Netmap";
message PlacementRule {
uint32 repl_factor = 1;
uint32 repl_factor = 1;
message SFGroup {
message Filter {
string key = 1;
message SFGroup {
message Filter {
string key = 1;
message SimpleFilters {
repeated SimpleFilter filters = 1;
}
message SimpleFilters {
repeated SimpleFilter filters = 1;
}
message SimpleFilter {
enum Operation {
NP = 0;
EQ = 1;
NE = 2;
GT = 3;
GE = 4;
LT = 5;
LE = 6;
OR = 7;
AND = 8;
}
Operation op = 1;
oneof Args {
string value = 2;
SimpleFilters f_args = 3;
}
}
SimpleFilter f = 2;
message SimpleFilter {
enum Operation {
NP = 0;
EQ = 1;
NE = 2;
GT = 3;
GE = 4;
LT = 5;
LE = 6;
OR = 7;
AND = 8;
}
repeated Filter filters = 1;
Operation op = 1;
message Selector {
uint32 count = 1;
string key = 2;
oneof Args {
string value = 2;
SimpleFilters f_args = 3;
}
}
repeated Selector selectors = 2;
repeated uint32 exclude = 3;
SimpleFilter f = 2;
}
repeated SFGroup sf_groups = 2;
repeated Filter filters = 1;
message Selector {
uint32 count = 1;
string key = 2;
}
repeated Selector selectors = 2;
repeated uint32 exclude = 3;
}
repeated SFGroup sf_groups = 2;
}
// Groups the information about the NeoFS node.
message NodeInfo {
// Carries network address of the NeoFS node.
string address = 1;
// Carries network address of the NeoFS node.
string address = 1;
// Carries public key of the NeoFS node in a binary format.
bytes public_key = 2;
// Carries public key of the NeoFS node in a binary format.
bytes public_key = 2;
// Groups attributes of the NeoFS node.
message Attribute {
// Carries string key to the node attribute.
string key = 1;
// Groups attributes of the NeoFS node.
message Attribute {
// Carries string key to the node attribute.
string key = 1;
// Carries string value of the node attribute.
string value = 2;
}
// Carries string value of the node attribute.
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;
// Represents the enumeration of various states of the NeoFS node.
enum State {
// Undefined state.
UNKNOWN = 0;
// Active state in the network.
ONLINE = 1;
// Active state in the network.
ONLINE = 1;
// Network unavailable state.
OFFLINE = 2;
}
// Network unavailable state.
OFFLINE = 2;
}
// Carries state of the NeoFS node.
State state = 4;
// Carries state of the NeoFS node.
State state = 4;
}

View file

@ -12,125 +12,125 @@ import "service/verify.proto";
// Object service provides API for manipulating with the object.
service Service {
// Get the object from container. Response uses gRPC stream. First response
// message carry object of requested address. Chunk messages are parts of
// the object's payload if it is needed. All messages except first carry
// chunks. Requested object can be restored by concatenation of object
// message payload and all chunks keeping receiving order.
rpc Get(GetRequest) returns (stream GetResponse);
// Get the object from container. Response uses gRPC stream. First response
// message carry object of requested address. Chunk messages are parts of
// the object's payload if it is needed. All messages except first carry
// chunks. Requested object can be restored by concatenation of object
// message payload and all chunks keeping receiving order.
rpc Get(GetRequest) returns (stream GetResponse);
// Put the object into container. Request uses gRPC stream. First message
// SHOULD BE type of PutHeader. Container id and Owner id of object SHOULD
// BE set. Session token SHOULD BE obtained before put operation (see
// session package). Chunk messages considered by server as part of object
// payload. All messages except first SHOULD BE chunks. Chunk messages
// SHOULD BE sent in direct order of fragmentation.
rpc Put(stream PutRequest) returns (PutResponse);
// Put the object into container. Request uses gRPC stream. First message
// SHOULD BE type of PutHeader. Container id and Owner id of object SHOULD
// BE set. Session token SHOULD BE obtained before put operation (see
// session package). Chunk messages considered by server as part of object
// payload. All messages except first SHOULD BE chunks. Chunk messages
// SHOULD BE sent in direct order of fragmentation.
rpc Put(stream PutRequest) returns (PutResponse);
// Delete the object from a container
rpc Delete(DeleteRequest) returns (DeleteResponse);
// Delete the object from a container
rpc Delete(DeleteRequest) returns (DeleteResponse);
// Head returns the object without data payload. Object in the
// response has system header only. If full headers flag is set, extended
// headers are also present.
rpc Head(HeadRequest) returns (HeadResponse);
// Head returns the object without data payload. Object in the
// response has system header only. If full headers flag is set, extended
// headers are also present.
rpc Head(HeadRequest) returns (HeadResponse);
// Search objects in container. Version of query language format SHOULD BE
// set to 1. Search query represented in serialized format (see query
// package).
rpc Search(SearchRequest) returns (stream SearchResponse);
// Search objects in container. Version of query language format SHOULD BE
// set to 1. Search query represented in serialized format (see query
// package).
rpc Search(SearchRequest) returns (stream SearchResponse);
// GetRange of data payload. Range is a pair (offset, length).
// Requested range can be restored by concatenation of all chunks
// keeping receiving order.
rpc GetRange(GetRangeRequest) returns (stream GetRangeResponse);
// GetRange of data payload. Range is a pair (offset, length).
// Requested range can be restored by concatenation of all chunks
// keeping receiving order.
rpc GetRange(GetRangeRequest) returns (stream GetRangeResponse);
// GetRangeHash returns homomorphic hash of object payload range after XOR
// operation. Ranges are set of pairs (offset, length). Hashes order in
// response corresponds to ranges order in request. Homomorphic hash is
// calculated for XORed data.
rpc GetRangeHash(GetRangeHashRequest) returns (GetRangeHashResponse);
// GetRangeHash returns homomorphic hash of object payload range after XOR
// operation. Ranges are set of pairs (offset, length). Hashes order in
// response corresponds to ranges order in request. Homomorphic hash is
// calculated for XORed data.
rpc GetRangeHash(GetRangeHashRequest) returns (GetRangeHashResponse);
}
message GetRequest {
// Carries the address of the requested object.
refs.Address address = 1;
// Carries the address of the requested object.
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;
// 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;
// Carries request meta information. Header data is used only to regulate message
// transport and does not affect request execution.
service.RequestMetaHeader meta_header = 98;
// Carries request meta information. Header data is used only to regulate message
// transport and does not affect request execution.
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 verify_header = 99;
// Carries request verification information. This header is used to authenticate
// the nodes of the message route and check the correctness of transmission.
service.RequestVerificationHeader verify_header = 99;
}
message GetResponse {
// Carries the single message of the response stream.
oneof ObjectPart {
// Carries the object header.
Header header = 1;
// Carries the single message of the response stream.
oneof ObjectPart {
// Carries the object header.
Header header = 1;
// Carries part of the object payload.
bytes chunk = 2;
}
// Carries part of the object payload.
bytes chunk = 2;
}
}
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;
// Groups initialization parameters of object placement in NeoFS.
message Init {
// Carries the header of the object to save in the system.
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 copies_number = 2;
}
// 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 copies_number = 2;
}
// Carries the single part of the query stream.
oneof Part {
// Carries the initialization parameters of the object stream.
Init init = 1;
// Carries the single part of the query stream.
oneof Part {
// Carries the initialization parameters of the object stream.
Init init = 1;
// Carries part of the object payload.
bytes chunk = 2;
}
// Carries part of the object payload.
bytes chunk = 2;
}
// Carries request meta information. Header data is used only to regulate message
// transport and does not affect request execution.
service.RequestMetaHeader meta_header = 98;
// Carries request meta information. Header data is used only to regulate message
// transport and does not affect request execution.
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 verify_header = 99;
// Carries request verification information. This header is used to authenticate
// the nodes of the message route and check the correctness of transmission.
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 object_id = 1;
// Carries identifier of the saved object.
// It is used to access an object in the container.
refs.ObjectID object_id = 1;
}
message DeleteRequest {
// Carries the address of the object to be deleted.
refs.Address address = 1;
// Carries the address of the object to be deleted.
refs.Address address = 1;
// Carries identifier the object owner.
refs.OwnerID owner_id = 2;
// Carries identifier the object owner.
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 meta_header = 98;
// Carries request meta information. Header data is used only to regulate message
// transport and does not affect request execution.
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 verify_header = 99;
// Carries request verification information. This header is used to authenticate
// the nodes of the message route and check the correctness of transmission.
service.RequestVerificationHeader verify_header = 99;
}
// DeleteResponse is empty because we cannot guarantee permanent object removal
@ -139,121 +139,121 @@ message DeleteResponse {
}
message HeadRequest {
// Carries the address of the object with the requested header.
refs.Address address = 1;
// Carries the address of the object with the requested header.
refs.Address address = 1;
// Carries the option to crop header to main part.
bool main_only = 2;
// Carries the option to crop header to main part.
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;
// 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;
// Carries request meta information. Header data is used only to regulate message
// transport and does not affect request execution.
service.RequestMetaHeader meta_header = 98;
// Carries request meta information. Header data is used only to regulate message
// transport and does not affect request execution.
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 verify_header = 99;
// Carries request verification information. This header is used to authenticate
// the nodes of the message route and check the correctness of transmission.
service.RequestVerificationHeader verify_header = 99;
}
message HeadResponse {
// Carries the requested object header.
Header header = 1;
// Carries the requested object header.
Header header = 1;
}
message SearchRequest {
// Carries search container identifier.
refs.ContainerID container_id = 1;
// Carries search container identifier.
refs.ContainerID container_id = 1;
message Query {
uint32 version = 1;
message Query {
uint32 version = 1;
message Filter {
enum MatchType {
MATCH_UNKNOWN = 0;
STRING_EQUAL = 1;
}
message Filter {
enum MatchType {
MATCH_UNKNOWN = 0;
STRING_EQUAL = 1;
}
MatchType match_type = 1;
MatchType match_type = 1;
string name = 2;
string name = 2;
string value = 3;
}
repeated Filter filters = 2;
string value = 3;
}
Query query = 2;
repeated Filter filters = 2;
}
// Carries request meta information. Header data is used only to regulate message
// transport and does not affect request execution.
service.RequestMetaHeader meta_header = 98;
Query query = 2;
// Carries request verification information. This header is used to authenticate
// the nodes of the message route and check the correctness of transmission.
service.RequestVerificationHeader verify_header = 99;
// Carries request meta information. Header data is used only to regulate message
// transport and does not affect request execution.
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 verify_header = 99;
}
message SearchResponse {
// Carries list of object identifiers that match the search query.
repeated refs.ObjectID id_list = 1;
// Carries list of object identifiers that match the search query.
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;
// Carries the offset of the range from the object payload start.
uint64 offset = 1;
// Carries the length of the object payload range.
uint64 length = 2;
// Carries the length of the object payload range.
uint64 length = 2;
}
message GetRangeRequest {
// Address carries address of the object that contains the requested payload range.
refs.Address address = 1;
// Address carries address of the object that contains the requested payload range.
refs.Address address = 1;
// Range carries the parameters of the requested payload range.
Range range = 2;
// Range carries the parameters of the requested payload range.
Range range = 2;
// Carries request meta information. Header data is used only to regulate message
// transport and does not affect request execution.
service.RequestMetaHeader meta_header = 98;
// Carries request meta information. Header data is used only to regulate message
// transport and does not affect request execution.
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 verify_header = 99;
// Carries request verification information. This header is used to authenticate
// the nodes of the message route and check the correctness of transmission.
service.RequestVerificationHeader verify_header = 99;
}
message GetRangeResponse {
// Carries part of the object payload.
bytes chunk = 1;
// Carries part of the object payload.
bytes chunk = 1;
}
message GetRangeHashRequest {
// Carries address of the object that contains the requested payload range.
refs.Address address = 1;
// Carries address of the object that contains the requested payload range.
refs.Address address = 1;
// Carries the list of object payload range to calculate homomorphic hash.
repeated Range ranges = 2;
// Carries the list of object payload range to calculate homomorphic hash.
repeated Range ranges = 2;
// Carries binary salt to XOR object payload ranges before hash calculation.
bytes salt = 3;
// Carries binary salt to XOR object payload ranges before hash calculation.
bytes salt = 3;
// Carries request meta information. Header data is used only to regulate message
// transport and does not affect request execution.
service.RequestMetaHeader meta_header = 98;
// Carries request meta information. Header data is used only to regulate message
// transport and does not affect request execution.
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 verify_header = 99;
// Carries request verification information. This header is used to authenticate
// the nodes of the message route and check the correctness of transmission.
service.RequestVerificationHeader verify_header = 99;
}
message GetRangeHashResponse {
// Carries list of homomorphic hashes in a binary format.
repeated bytes hash_list = 1;
// Carries list of homomorphic hashes in a binary format.
repeated bytes hash_list = 1;
}

View file

@ -10,122 +10,124 @@ import "service/verify.proto";
// Header groups the information about the NeoFS object.
message Header {
// Main groups mandatory information about the object.
// Message fields are presented in all NeoFS objects.
message Main {
// payload_length carries length of the object payload.
// Each object has a fixed payload length since it's immutable.
uint64 payload_length = 1;
// address carries object address in the NeoFS system.
// It encapsulates the object and the container identifiers.
refs.Address address = 2;
// owner_id carries identifier of the object owner.
refs.OwnerID owner_id = 3;
// Main groups mandatory information about the object.
// Message fields are presented in all NeoFS objects.
message Main {
// payload_length carries length of the object payload.
// Each object has a fixed payload length since it's immutable.
uint64 payload_length = 1;
// address carries object address in the NeoFS system.
// It encapsulates the object and the container identifiers.
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.
// Main MUST NOT be NULL.
Main main = 1;
// Extended groups additional information about the object.
// It encapsulates both user and system attributes needed to regulate
// the NeoFS sub-systems.
message Extended {
// Integrity groups evidence of the integrity of an object's structure.
message Integrity {
// 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 payload_checksum = 1;
// 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.
// 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 creator_key and checksum_signature.
bytes header_checksum = 2;
// 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 creator_key.
service.SessionToken session_token = 3;
// creator_key carries public key of the object creator in a binary format.
bytes creator_key = 4;
// checksum_signature carries signature of the structure checksum by the object creator.
bytes checksum_signature = 5;
}
// Main carries the main part of the header.
// Main MUST NOT be NULL.
Main main = 1;
// integrity carries object integrity evidence.
Integrity integrity = 1;
// Extended groups additional information about the object.
// It encapsulates both user and system attributes needed to regulate
// the NeoFS sub-systems.
message Extended {
// Integrity groups evidence of the integrity of an object's structure.
message Integrity {
// 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 payload_checksum = 1;
// Attribute groups the parameters of the object attributes.
message Attribute {
// key carries the string key to the object attribute.
string key = 1;
// 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.
// 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 creator_key and checksum_signature.
bytes header_checksum = 2;
// 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 creator_key.
service.SessionToken session_token = 3;
// creator_key carries public key of the object creator in a binary format.
bytes creator_key = 4;
// checksum_signature carries signature of the structure checksum by the object creator.
bytes checksum_signature = 5;
}
// 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;
// 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;
// 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 {
}
// Tombstone marks the object to be deleted.
Tombstone tombstone = 4;
// 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 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;
// Previous carries identifier of the left split neighbor.
refs.ObjectID previous = 2;
// 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;
// Origin carries the header of the origin object.
Header origin = 5;
}
// Split carries the position of the object in the split hierarchy.
Split split = 7;
// value carries the string value of the object attribute.
string value = 2;
}
// Extended carries the additional part of the header.
Extended extended = 2;
// attributes carries list of the object attributes in a string key-value format.
repeated Attribute attributes = 2;
// 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 {
}
// Tombstone marks the object to be deleted.
Tombstone tombstone = 4;
// 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 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;
// Previous carries identifier of the left split neighbor.
refs.ObjectID previous = 2;
// 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;
// Origin carries the header of the origin object.
Header origin = 5;
}
// Split carries the position of the object in the split hierarchy.
Split split = 7;
}
// Extended carries the additional part of the header.
Extended extended = 2;
}
// Object groups the information about the NeoFS object.
// It consists of payload data with additional service information.
message Object {
// Header carries the object header.
Header header = 1;
// Header carries the object header.
Header header = 1;
// Payload carries the object payload bytes.
bytes payload = 2;
// Payload carries the object payload bytes.
bytes payload = 2;
}

View file

@ -7,27 +7,27 @@ option csharp_namespace = "NeoFS.API.Refs";
// Address of object (container id + object id)
message Address {
// container_id carries container identifier.
ContainerID container_id = 1;
// container_id carries container identifier.
ContainerID container_id = 1;
// object_id carries object identifier.
ObjectID object_id = 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;
}

View file

@ -7,17 +7,17 @@ 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;
// Carries maximum number of nodes in the request route.
uint32 ttl = 1;
message XHeader {
// Carries key to the X-Header.
string key = 1;
message XHeader {
// Carries key to the X-Header.
string key = 1;
// Carries value of the X-Header.
string value = 2;
}
// Carries value of the X-Header.
string value = 2;
}
// Carries request X-Headers.
repeated XHeader x_headers = 2;
// Carries request X-Headers.
repeated XHeader x_headers = 2;
}

View file

@ -8,107 +8,108 @@ option csharp_namespace = "NeoFS.API.Service";
import "acl/types.proto";
import "refs/types.proto";
// RequestVerificationHeader is a set of signatures of every NeoFS Node that processed request.
// RequestVerificationHeader is a set of signatures of every NeoFS Node that
// processed request.
message RequestVerificationHeader {
message Signature {
// Key is compressed public key used for signature.
bytes key = 1;
message Signature {
// Key is compressed public key used for signature.
bytes key = 1;
// Sign is signature of the request or session key.
bytes sign = 2;
}
// Sign is signature of the request or session key.
bytes sign = 2;
}
// Signatures is a set of signatures of every passed NeoFS Node
repeated Signature signatures = 1;
// Signatures is a set of signatures of every passed NeoFS Node
repeated Signature signatures = 1;
// Token is a token of the session within which the request is sent
SessionToken token = 2;
// Token is a token of the session within which the request is sent
SessionToken token = 2;
// Bearer is a Bearer token of the request
BearerTokenMsg bearer = 3;
// Bearer is a Bearer token of the request
BearerTokenMsg bearer = 3;
}
// Represents the NeoFS session token.
message SessionToken {
message Info {
// ID is a token identifier. valid UUIDv4 represented in bytes
bytes id = 1;
message Info {
// ID is a token identifier. valid UUIDv4 represented in bytes
bytes id = 1;
// OwnerID carries identifier of the session initiator.
refs.OwnerID owner_id = 2;
// OwnerID carries identifier of the session initiator.
refs.OwnerID owner_id = 2;
// Verb is an enumeration of session request types
enum Verb {
// Refers to object.Put RPC call
OBJECT_PUT = 0;
// Refers to object.Get RPC call
OBJECT_GET = 1;
// Refers to object.Head RPC call
OBJECT_HEAD = 2;
// Refers to object.Search RPC call
OBJECT_SEARCH = 3;
// Refers to object.Delete RPC call
OBJECT_DELETE = 4;
// Refers to object.GetRange RPC call
OBJECT_RANGE = 5;
// Refers to object.GetRangeHash RPC call
OBJECT_RANGEHASH = 6;
}
// Verb is a type of request for which the token is issued
Verb verb = 3;
// Lifetime is a lifetime of the session
TokenLifetime lifetime = 4;
// SessionKey is a public key of session key
bytes session_key = 5;
// OwnerKey is a public key of the token owner
bytes owner_key = 6;
// Carries context of the session.
oneof context {
// object_address represents the object session context.
refs.Address object_address = 7;
}
// Verb is an enumeration of session request types
enum Verb {
// Refers to object.Put RPC call
OBJECT_PUT = 0;
// Refers to object.Get RPC call
OBJECT_GET = 1;
// Refers to object.Head RPC call
OBJECT_HEAD = 2;
// Refers to object.Search RPC call
OBJECT_SEARCH = 3;
// Refers to object.Delete RPC call
OBJECT_DELETE = 4;
// Refers to object.GetRange RPC call
OBJECT_RANGE = 5;
// Refers to object.GetRangeHash RPC call
OBJECT_RANGEHASH = 6;
}
// token_info is a grouped information about token
Info token_info = 1;
// Verb is a type of request for which the token is issued
Verb verb = 3;
// Signature is a signature of session token information
bytes signature = 2;
// Lifetime is a lifetime of the session
TokenLifetime lifetime = 4;
// SessionKey is a public key of session key
bytes session_key = 5;
// OwnerKey is a public key of the token owner
bytes owner_key = 6;
// Carries context of the session.
oneof context {
// object_address represents the object session context.
refs.Address object_address = 7;
}
}
// token_info is a grouped information about token
Info token_info = 1;
// Signature is a signature of session token information
bytes signature = 2;
}
// 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;
// valid_until carries a last epoch of token lifetime
uint64 valid_until = 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 eacl_table = 1;
message Info {
// EACLTable carries table of extended ACL rules.
acl.EACLTable eacl_table = 1;
// OwnerID carries identifier of the token owner.
refs.OwnerID owner_id = 2;
// OwnerID carries identifier of the token owner.
refs.OwnerID owner_id = 2;
// ValidUntil carries a last epoch of token lifetime
uint64 valid_until = 3;
}
// ValidUntil carries a last epoch of token lifetime
uint64 valid_until = 3;
}
// token_info is a grouped information about token
Info token_info = 1;
// token_info is a grouped information about token
Info token_info = 1;
// owner_key is a public key of the token owner
bytes owner_key = 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;
// Signature is a signature of token information
bytes signature = 3;
}

View file

@ -10,32 +10,32 @@ import "service/verify.proto";
import "refs/types.proto";
service Session {
// Create opens new session between the client and the server.
rpc Create (CreateRequest) returns (CreateResponse);
// Create opens new session between the client and the server.
rpc Create (CreateRequest) returns (CreateResponse);
}
// CreateRequest carries an information necessary for opening a session.
message CreateRequest {
// Carries an identifier of a session initiator.
refs.OwnerID owner_id = 1;
// Carries an identifier of a session initiator.
refs.OwnerID owner_id = 1;
// Carries a lifetime of the session.
service.TokenLifetime lifetime = 2;
// Carries a lifetime of the session.
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 meta_header = 98;
// Carries request meta information. Header data is used only to regulate
// message transport and does not affect request execution.
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 verify_header = 99;
// Carries request verification information. This header is used to authenticate
// the nodes of the message route and check the correctness of transmission.
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;
// session_key carries a session public key.
bytes session_key = 2;
// session_key carries a session public key.
bytes session_key = 2;
}

View file

@ -10,17 +10,21 @@ import "refs/types.proto";
// StorageGroup groups the information about the NeoFS storage group.
// The storage group consists of objects from single container.
message StorageGroup {
// validation_data_size carries the total size of the payloads of the storage group members.
uint64 validation_data_size = 1;
// validation_data_size carries the total size of the payloads of the storage
// group members.
uint64 validation_data_size = 1;
// 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 validation_hash = 2;
// 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 validation_hash = 2;
// expiration_epoch carries last NeoFS epoch number of the storage group lifetime.
uint64 expiration_epoch = 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;
// Members carries the list of identifiers of the object storage group members.
// The list is strictly ordered.
repeated refs.ObjectID members = 4;
}