[#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:
parent
35774d4ef7
commit
327c476ecf
12 changed files with 607 additions and 597 deletions
|
@ -10,34 +10,35 @@ import "refs/types.proto";
|
||||||
// The service provides methods for obtaining information
|
// The service provides methods for obtaining information
|
||||||
// about the account balance in NeoFS system.
|
// about the account balance in NeoFS system.
|
||||||
service Accounting {
|
service Accounting {
|
||||||
// Returns the amount of funds for the requested NeoFS account.
|
// Returns the amount of funds for the requested NeoFS account.
|
||||||
rpc Balance (BalanceRequest) returns (BalanceResponse);
|
rpc Balance (BalanceRequest) returns (BalanceResponse);
|
||||||
}
|
}
|
||||||
|
|
||||||
// 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, 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 gain access to the requested information, the request body must be formed
|
||||||
// to the requirements from the system specification.
|
// according 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 owner_id = 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.
|
||||||
//
|
//
|
||||||
// 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;
|
||||||
}
|
}
|
||||||
|
|
143
acl/types.proto
143
acl/types.proto
|
@ -9,98 +9,99 @@ 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.
|
||||||
message EACLRecord {
|
message EACLRecord {
|
||||||
// Operation is an enumeration of operation types.
|
// Operation is an enumeration of operation types.
|
||||||
enum Operation {
|
enum Operation {
|
||||||
OPERATION_UNKNOWN = 0;
|
OPERATION_UNKNOWN = 0;
|
||||||
GET = 1;
|
GET = 1;
|
||||||
HEAD = 2;
|
HEAD = 2;
|
||||||
PUT = 3;
|
PUT = 3;
|
||||||
DELETE = 4;
|
DELETE = 4;
|
||||||
SEARCH = 5;
|
SEARCH = 5;
|
||||||
GETRANGE = 6;
|
GETRANGE = 6;
|
||||||
GETRANGEHASH = 7;
|
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.
|
// Header carries type of header.
|
||||||
Operation operation = 1 [json_name = "Operation"];
|
Header header = 1 [json_name = "HeaderType"];
|
||||||
|
|
||||||
// Action is an enumeration of EACL actions.
|
// MatchType is an enumeration of match types.
|
||||||
enum Action {
|
enum MatchType {
|
||||||
ACTION_UNKNOWN = 0;
|
MATCH_UNKNOWN = 0;
|
||||||
ALLOW = 1;
|
STRING_EQUAL = 1;
|
||||||
DENY = 2;
|
STRING_NOT_EQUAL = 2;
|
||||||
}
|
}
|
||||||
|
|
||||||
// Action carries ACL target action.
|
// MatchType carries type of match.
|
||||||
Action action = 2 [json_name = "Action"];
|
MatchType match_type = 2 [json_name = "MatchType"];
|
||||||
|
|
||||||
// FilterInfo groups information about filter.
|
// header_name carries name of filtering header.
|
||||||
message FilterInfo {
|
string header_name = 3 [json_name="Name"];
|
||||||
// Header is an enumeration of filtering header types.
|
|
||||||
enum Header {
|
|
||||||
HEADER_UNKNOWN = 0;
|
|
||||||
REQUEST = 1;
|
|
||||||
OBJECT_SYSTEM = 2;
|
|
||||||
OBJECT_USER = 3;
|
|
||||||
}
|
|
||||||
|
|
||||||
// Header carries type of header.
|
// header_val carries value of filtering header.
|
||||||
Header header = 1 [json_name = "HeaderType"];
|
string header_val = 4 [json_name="Value"];
|
||||||
|
}
|
||||||
|
|
||||||
// MatchType is an enumeration of match types.
|
// filters carries set of filters.
|
||||||
enum MatchType {
|
repeated FilterInfo filters = 3 [json_name="Filters"];
|
||||||
MATCH_UNKNOWN = 0;
|
|
||||||
STRING_EQUAL = 1;
|
|
||||||
STRING_NOT_EQUAL = 2;
|
|
||||||
}
|
|
||||||
|
|
||||||
// MatchType carries type of match.
|
// TargetInfo groups information about extended ACL target.
|
||||||
MatchType match_type = 2 [json_name = "MatchType"];
|
message TargetInfo {
|
||||||
|
// target carries target of ACL rule.
|
||||||
|
acl.Target target = 1 [json_name="Role"];
|
||||||
|
|
||||||
// header_name carries name of filtering header.
|
// key_list carries public keys of ACL target.
|
||||||
string header_name = 3 [json_name="Name"];
|
repeated bytes key_list = 2 [json_name="Keys"];
|
||||||
|
}
|
||||||
|
|
||||||
// header_val carries value of filtering header.
|
// targets carries information about extended ACL target list.
|
||||||
string header_val = 4 [json_name="Value"];
|
repeated TargetInfo targets = 4 [json_name="Targets"];
|
||||||
}
|
|
||||||
|
|
||||||
// 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"];
|
|
||||||
}
|
}
|
||||||
|
|
||||||
// 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
|
||||||
refs.ContainerID container_id = 1 [json_name="ContainerID"];
|
// access control rules.
|
||||||
|
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"];
|
||||||
}
|
}
|
||||||
|
|
|
@ -12,58 +12,58 @@ import "refs/types.proto";
|
||||||
// Service provides API to access container smart-contract in morph chain
|
// Service provides API to access container smart-contract in morph chain
|
||||||
// via NeoFS node.
|
// via NeoFS node.
|
||||||
service Service {
|
service Service {
|
||||||
// Put invokes 'Put' method in container smart-contract and returns
|
// Put invokes 'Put' method in container smart-contract and returns
|
||||||
// response immediately. After new block in morph chain, request is verified
|
// response immediately. After new block in morph chain, request is verified
|
||||||
// by inner ring nodes. After one more block in morph chain, container
|
// by inner ring nodes. After one more block in morph chain, container
|
||||||
// added into smart-contract storage.
|
// added into smart-contract storage.
|
||||||
rpc Put(PutRequest) returns (PutResponse);
|
rpc Put(PutRequest) returns (PutResponse);
|
||||||
|
|
||||||
// Delete invokes 'Delete' method in container smart-contract and returns
|
// Delete invokes 'Delete' method in container smart-contract and returns
|
||||||
// response immediately. After new block in morph chain, request is verified
|
// response immediately. After new block in morph chain, request is verified
|
||||||
// by inner ring nodes. After one more block in morph chain, container
|
// by inner ring nodes. After one more block in morph chain, container
|
||||||
// removed from smart-contract storage.
|
// removed from smart-contract storage.
|
||||||
rpc Delete(DeleteRequest) returns (DeleteResponse);
|
rpc Delete(DeleteRequest) returns (DeleteResponse);
|
||||||
|
|
||||||
// Get returns container from container smart-contract storage.
|
// Get returns container from container smart-contract storage.
|
||||||
rpc Get(GetRequest) returns (GetResponse);
|
rpc Get(GetRequest) returns (GetResponse);
|
||||||
|
|
||||||
// List returns all owner's containers from container smart-contract
|
// List returns all owner's containers from container smart-contract
|
||||||
// storage.
|
// storage.
|
||||||
rpc List(ListRequest) returns (ListResponse);
|
rpc List(ListRequest) returns (ListResponse);
|
||||||
|
|
||||||
// SetExtendedACL invokes 'SetEACL' method in container smart-contract and
|
// SetExtendedACL invokes 'SetEACL' method in container smart-contract and
|
||||||
// returns response immediately. After new block in morph chain,
|
// returns response immediately. After new block in morph chain,
|
||||||
// Extended ACL added into smart-contract storage.
|
// Extended ACL added into smart-contract storage.
|
||||||
rpc SetExtendedACL(SetExtendedACLRequest) returns (SetExtendedACLResponse);
|
rpc SetExtendedACL(SetExtendedACLRequest) returns (SetExtendedACLResponse);
|
||||||
|
|
||||||
// GetExtendedACL returns Extended ACL table and signature from container
|
// GetExtendedACL returns Extended ACL table and signature from container
|
||||||
// smart-contract storage.
|
// smart-contract storage.
|
||||||
rpc GetExtendedACL(GetExtendedACLRequest) returns (GetExtendedACLResponse);
|
rpc GetExtendedACL(GetExtendedACLRequest) returns (GetExtendedACLResponse);
|
||||||
}
|
}
|
||||||
|
|
||||||
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 public_key = 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 {
|
||||||
// container_id carries identifier of the new container.
|
// container_id carries identifier of the new container.
|
||||||
refs.ContainerID container_id = 1;
|
refs.ContainerID container_id = 1;
|
||||||
}
|
}
|
||||||
|
|
||||||
message DeleteRequest {
|
message DeleteRequest {
|
||||||
// container_id carries identifier of the container to delete from NeoFS.
|
// container_id carries identifier of the container to delete from NeoFS.
|
||||||
refs.ContainerID container_id = 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
|
||||||
|
@ -71,44 +71,45 @@ message DeleteRequest {
|
||||||
message DeleteResponse {}
|
message DeleteResponse {}
|
||||||
|
|
||||||
message GetRequest {
|
message GetRequest {
|
||||||
// container_id carries identifier of the container to get.
|
// container_id carries identifier of the container to get.
|
||||||
refs.ContainerID container_id = 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 {
|
||||||
// owner_id carries identifier of the container owner.
|
// owner_id carries identifier of the container owner.
|
||||||
refs.OwnerID owner_id = 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
|
||||||
repeated refs.ContainerID container_ids = 1;
|
// to the owner.
|
||||||
|
repeated refs.ContainerID container_ids = 1;
|
||||||
}
|
}
|
||||||
|
|
||||||
message SetExtendedACLRequest {
|
message SetExtendedACLRequest {
|
||||||
// Extended ACL 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 {
|
||||||
// container_id carries identifier of the container that has Extended ACL.
|
// container_id carries identifier of the container that has Extended ACL.
|
||||||
refs.ContainerID container_id = 1;
|
refs.ContainerID container_id = 1;
|
||||||
}
|
}
|
||||||
|
|
||||||
message GetExtendedACLResponse {
|
message GetExtendedACLResponse {
|
||||||
// Extended ACL 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;
|
||||||
}
|
}
|
||||||
|
|
|
@ -13,28 +13,28 @@ import "netmap/types.proto";
|
||||||
// and access control information. ID of the container is a 32 byte long
|
// and access control information. ID of the container is a 32 byte long
|
||||||
// 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 owner_id = 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 basic_acl = 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;
|
||||||
}
|
}
|
||||||
|
|
|
@ -6,87 +6,87 @@ 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 repl_factor = 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 {
|
||||||
enum Operation {
|
enum Operation {
|
||||||
NP = 0;
|
NP = 0;
|
||||||
EQ = 1;
|
EQ = 1;
|
||||||
NE = 2;
|
NE = 2;
|
||||||
GT = 3;
|
GT = 3;
|
||||||
GE = 4;
|
GE = 4;
|
||||||
LT = 5;
|
LT = 5;
|
||||||
LE = 6;
|
LE = 6;
|
||||||
OR = 7;
|
OR = 7;
|
||||||
AND = 8;
|
AND = 8;
|
||||||
}
|
|
||||||
|
|
||||||
Operation op = 1;
|
|
||||||
|
|
||||||
oneof Args {
|
|
||||||
string value = 2;
|
|
||||||
SimpleFilters f_args = 3;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
SimpleFilter f = 2;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
repeated Filter filters = 1;
|
Operation op = 1;
|
||||||
|
|
||||||
message Selector {
|
oneof Args {
|
||||||
uint32 count = 1;
|
string value = 2;
|
||||||
string key = 2;
|
SimpleFilters f_args = 3;
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
|
||||||
repeated Selector selectors = 2;
|
SimpleFilter f = 2;
|
||||||
|
|
||||||
repeated uint32 exclude = 3;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
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.
|
// 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 public_key = 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 in 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.
|
||||||
State state = 4;
|
State state = 4;
|
||||||
}
|
}
|
|
@ -12,125 +12,125 @@ import "service/verify.proto";
|
||||||
|
|
||||||
// Object service provides API for manipulating with the object.
|
// Object service provides API for manipulating with the object.
|
||||||
service Service {
|
service Service {
|
||||||
// Get the object from container. Response uses gRPC stream. First response
|
// Get the object from container. Response uses gRPC stream. First response
|
||||||
// message carry object of requested address. Chunk messages are parts of
|
// message carry object of requested address. Chunk messages are parts of
|
||||||
// the object's payload if it is needed. All messages except first carry
|
// the object's payload if it is needed. All messages except first carry
|
||||||
// chunks. Requested object can be restored by concatenation of object
|
// chunks. Requested object can be restored by concatenation of object
|
||||||
// message payload and all chunks keeping receiving order.
|
// message payload and all chunks keeping receiving order.
|
||||||
rpc Get(GetRequest) returns (stream GetResponse);
|
rpc Get(GetRequest) returns (stream GetResponse);
|
||||||
|
|
||||||
// Put the object into container. Request uses gRPC stream. First message
|
// Put the object into container. Request uses gRPC stream. First message
|
||||||
// SHOULD BE type of PutHeader. Container id and Owner id of object SHOULD
|
// SHOULD BE type of PutHeader. Container id and Owner id of object SHOULD
|
||||||
// BE set. Session token SHOULD BE obtained before put operation (see
|
// BE set. Session token SHOULD BE obtained before put operation (see
|
||||||
// session package). Chunk messages considered by server as part of object
|
// session package). Chunk messages considered by server as part of object
|
||||||
// payload. All messages except first SHOULD BE chunks. Chunk messages
|
// payload. All messages except first SHOULD BE chunks. Chunk messages
|
||||||
// SHOULD BE sent in direct order of fragmentation.
|
// SHOULD BE sent in direct order of fragmentation.
|
||||||
rpc Put(stream PutRequest) returns (PutResponse);
|
rpc Put(stream PutRequest) returns (PutResponse);
|
||||||
|
|
||||||
// Delete the object from a container
|
// Delete the object from a container
|
||||||
rpc Delete(DeleteRequest) returns (DeleteResponse);
|
rpc Delete(DeleteRequest) returns (DeleteResponse);
|
||||||
|
|
||||||
// Head returns the object without data payload. Object in the
|
// Head returns the object without data payload. Object in the
|
||||||
// response has system header only. If full headers flag is set, extended
|
// response has system header only. If full headers flag is set, extended
|
||||||
// headers are also present.
|
// headers are also present.
|
||||||
rpc Head(HeadRequest) returns (HeadResponse);
|
rpc Head(HeadRequest) returns (HeadResponse);
|
||||||
|
|
||||||
// Search objects in container. Version of query language format SHOULD BE
|
// Search objects in container. Version of query language format SHOULD BE
|
||||||
// set to 1. Search query represented in serialized format (see query
|
// set to 1. Search query represented in serialized format (see query
|
||||||
// package).
|
// package).
|
||||||
rpc Search(SearchRequest) returns (stream SearchResponse);
|
rpc Search(SearchRequest) returns (stream SearchResponse);
|
||||||
|
|
||||||
// GetRange of data payload. Range is a pair (offset, length).
|
// GetRange of data payload. Range is a pair (offset, length).
|
||||||
// Requested range can be restored by concatenation of all chunks
|
// Requested range can be restored by concatenation of all chunks
|
||||||
// keeping receiving order.
|
// keeping receiving order.
|
||||||
rpc GetRange(GetRangeRequest) returns (stream GetRangeResponse);
|
rpc GetRange(GetRangeRequest) returns (stream GetRangeResponse);
|
||||||
|
|
||||||
// GetRangeHash returns homomorphic hash of object payload range after XOR
|
// GetRangeHash returns homomorphic hash of object payload range after XOR
|
||||||
// operation. Ranges are set of pairs (offset, length). Hashes order in
|
// operation. Ranges are set of pairs (offset, length). Hashes order in
|
||||||
// response corresponds to ranges order in request. Homomorphic hash is
|
// response corresponds to ranges order in request. Homomorphic hash is
|
||||||
// calculated for XORed data.
|
// calculated for XORed data.
|
||||||
rpc GetRangeHash(GetRangeHashRequest) returns (GetRangeHashResponse);
|
rpc GetRangeHash(GetRangeHashRequest) returns (GetRangeHashResponse);
|
||||||
}
|
}
|
||||||
|
|
||||||
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 meta_header = 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 verify_header = 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;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
message PutRequest {
|
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 copies_number = 2;
|
uint32 copies_number = 2;
|
||||||
}
|
}
|
||||||
|
|
||||||
// Carries the single part of the query stream.
|
// Carries the single part of the query stream.
|
||||||
oneof Part {
|
oneof Part {
|
||||||
// Carries the initialization parameters of the object stream.
|
// Carries the initialization parameters of the object stream.
|
||||||
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 meta_header = 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 verify_header = 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 object_id = 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 owner_id = 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 meta_header = 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 verify_header = 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
|
||||||
|
@ -139,121 +139,121 @@ 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 main_only = 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 meta_header = 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 verify_header = 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 container_id = 1;
|
refs.ContainerID container_id = 1;
|
||||||
|
|
||||||
message Query {
|
message Query {
|
||||||
uint32 version = 1;
|
uint32 version = 1;
|
||||||
|
|
||||||
message Filter {
|
message Filter {
|
||||||
enum MatchType {
|
enum MatchType {
|
||||||
MATCH_UNKNOWN = 0;
|
MATCH_UNKNOWN = 0;
|
||||||
STRING_EQUAL = 1;
|
STRING_EQUAL = 1;
|
||||||
}
|
}
|
||||||
|
|
||||||
MatchType match_type = 1;
|
MatchType match_type = 1;
|
||||||
|
|
||||||
string name = 2;
|
string name = 2;
|
||||||
|
|
||||||
string value = 3;
|
string value = 3;
|
||||||
}
|
|
||||||
|
|
||||||
repeated Filter filters = 2;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
Query query = 2;
|
repeated Filter filters = 2;
|
||||||
|
}
|
||||||
|
|
||||||
// Carries request meta information. Header data is used only to regulate message
|
Query query = 2;
|
||||||
// transport and does not affect request execution.
|
|
||||||
service.RequestMetaHeader meta_header = 98;
|
|
||||||
|
|
||||||
// Carries request verification information. This header is used to authenticate
|
// Carries request meta information. Header data is used only to regulate message
|
||||||
// the nodes of the message route and check the correctness of transmission.
|
// transport and does not affect request execution.
|
||||||
service.RequestVerificationHeader verify_header = 99;
|
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 {
|
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 id_list = 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 meta_header = 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 verify_header = 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 meta_header = 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 verify_header = 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 hash_list = 1;
|
repeated bytes hash_list = 1;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -10,122 +10,124 @@ import "service/verify.proto";
|
||||||
|
|
||||||
// Header groups the information about the NeoFS object.
|
// Header groups the information about the NeoFS object.
|
||||||
message Header {
|
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 {
|
||||||
// payload_length 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 payload_length = 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;
|
||||||
// owner_id carries identifier of the object owner.
|
// owner_id carries identifier of the object owner.
|
||||||
refs.OwnerID owner_id = 3;
|
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.
|
// integrity carries object integrity evidence.
|
||||||
// Main MUST NOT be NULL.
|
Integrity integrity = 1;
|
||||||
Main main = 1;
|
|
||||||
|
|
||||||
// Extended groups additional information about the object.
|
// Attribute groups the parameters of the object attributes.
|
||||||
// It encapsulates both user and system attributes needed to regulate
|
message Attribute {
|
||||||
// the NeoFS sub-systems.
|
// key carries the string key to the object attribute.
|
||||||
message Extended {
|
string key = 1;
|
||||||
// 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.
|
// value carries the string value of the object attribute.
|
||||||
// It covers all object attributes. Changing any field of the object except
|
string value = 2;
|
||||||
// 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;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
// Extended carries the additional part of the header.
|
// attributes carries list of the object attributes in a string key-value format.
|
||||||
Extended extended = 2;
|
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.
|
// Object groups the information about the NeoFS object.
|
||||||
// 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;
|
||||||
}
|
}
|
||||||
|
|
|
@ -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 {
|
||||||
// container_id carries container identifier.
|
// container_id carries container identifier.
|
||||||
ContainerID container_id = 1;
|
ContainerID container_id = 1;
|
||||||
|
|
||||||
// object_id carries object identifier.
|
// object_id carries object identifier.
|
||||||
ObjectID object_id = 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;
|
||||||
}
|
}
|
|
@ -7,17 +7,17 @@ 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 x_headers = 2;
|
repeated XHeader x_headers = 2;
|
||||||
}
|
}
|
||||||
|
|
|
@ -8,107 +8,108 @@ option csharp_namespace = "NeoFS.API.Service";
|
||||||
import "acl/types.proto";
|
import "acl/types.proto";
|
||||||
import "refs/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 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
|
||||||
SessionToken token = 2;
|
SessionToken token = 2;
|
||||||
|
|
||||||
// Bearer is a Bearer token of the request
|
// Bearer is a Bearer token of the request
|
||||||
BearerTokenMsg bearer = 3;
|
BearerTokenMsg bearer = 3;
|
||||||
}
|
}
|
||||||
|
|
||||||
// Represents the NeoFS session token.
|
// Represents the NeoFS session token.
|
||||||
message SessionToken {
|
message SessionToken {
|
||||||
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 session initiator.
|
// OwnerID carries identifier of the session initiator.
|
||||||
refs.OwnerID owner_id = 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 {
|
||||||
// Refers to object.Put RPC call
|
// Refers to object.Put RPC call
|
||||||
OBJECT_PUT = 0;
|
OBJECT_PUT = 0;
|
||||||
// Refers to object.Get RPC call
|
// Refers to object.Get RPC call
|
||||||
OBJECT_GET = 1;
|
OBJECT_GET = 1;
|
||||||
// Refers to object.Head RPC call
|
// Refers to object.Head RPC call
|
||||||
OBJECT_HEAD = 2;
|
OBJECT_HEAD = 2;
|
||||||
// Refers to object.Search RPC call
|
// Refers to object.Search RPC call
|
||||||
OBJECT_SEARCH = 3;
|
OBJECT_SEARCH = 3;
|
||||||
// Refers to object.Delete RPC call
|
// Refers to object.Delete RPC call
|
||||||
OBJECT_DELETE = 4;
|
OBJECT_DELETE = 4;
|
||||||
// Refers to object.GetRange RPC call
|
// Refers to object.GetRange RPC call
|
||||||
OBJECT_RANGE = 5;
|
OBJECT_RANGE = 5;
|
||||||
// Refers to object.GetRangeHash RPC call
|
// Refers to object.GetRangeHash RPC call
|
||||||
OBJECT_RANGEHASH = 6;
|
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;
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
// token_info is a grouped information about token
|
// Verb is a type of request for which the token is issued
|
||||||
Info token_info = 1;
|
Verb verb = 3;
|
||||||
|
|
||||||
// Signature is a signature of session token information
|
// Lifetime is a lifetime of the session
|
||||||
bytes signature = 2;
|
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
|
// 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;
|
||||||
|
|
||||||
// valid_until carries a last epoch of token lifetime
|
// valid_until carries a last epoch of token lifetime
|
||||||
uint64 valid_until = 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 eacl_table = 1;
|
acl.EACLTable eacl_table = 1;
|
||||||
|
|
||||||
// OwnerID carries identifier of the token owner.
|
// OwnerID carries identifier of the token owner.
|
||||||
refs.OwnerID owner_id = 2;
|
refs.OwnerID owner_id = 2;
|
||||||
|
|
||||||
// ValidUntil carries a last epoch of token lifetime
|
// ValidUntil carries a last epoch of token lifetime
|
||||||
uint64 valid_until = 3;
|
uint64 valid_until = 3;
|
||||||
}
|
}
|
||||||
|
|
||||||
// token_info is a grouped information about token
|
// token_info is a grouped information about token
|
||||||
Info token_info = 1;
|
Info token_info = 1;
|
||||||
|
|
||||||
// owner_key is a public key of the token owner
|
// owner_key is a public key of the token owner
|
||||||
bytes owner_key = 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;
|
||||||
}
|
}
|
||||||
|
|
|
@ -10,32 +10,32 @@ import "service/verify.proto";
|
||||||
import "refs/types.proto";
|
import "refs/types.proto";
|
||||||
|
|
||||||
service Session {
|
service Session {
|
||||||
// Create opens new session between the client and the server.
|
// Create opens new session between the client and the server.
|
||||||
rpc Create (CreateRequest) returns (CreateResponse);
|
rpc Create (CreateRequest) returns (CreateResponse);
|
||||||
}
|
}
|
||||||
|
|
||||||
// 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 owner_id = 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
|
||||||
// transport and does not affect request execution.
|
// message transport and does not affect request execution.
|
||||||
service.RequestMetaHeader meta_header = 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 verify_header = 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;
|
||||||
|
|
||||||
// session_key carries a session public key.
|
// session_key carries a session public key.
|
||||||
bytes session_key = 2;
|
bytes session_key = 2;
|
||||||
}
|
}
|
||||||
|
|
|
@ -10,17 +10,21 @@ 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 {
|
||||||
// validation_data_size 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
|
||||||
uint64 validation_data_size = 1;
|
// group members.
|
||||||
|
uint64 validation_data_size = 1;
|
||||||
|
|
||||||
// validation_hash carries homomorphic hash from the concatenation of the payloads of the storage group members.
|
// validation_hash carries homomorphic hash from the concatenation of the
|
||||||
// The order of concatenation is the same as the order of the members in the Members field.
|
// payloads of the storage group members
|
||||||
bytes validation_hash = 2;
|
// 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.
|
// expiration_epoch carries last NeoFS epoch number of the storage group
|
||||||
uint64 expiration_epoch = 3;
|
// lifetime.
|
||||||
|
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;
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue