forked from TrueCloudLab/frostfs-api
[#45] Fix linter errors
- Changed package names adding version - Added documentation descriptions (sometimes useless) for all fields - Changed enum format - Made SessionToken and BearerToken field names more clear Signed-off-by: Stanislav Bogatyrev <stanislav@nspcc.ru>
This commit is contained in:
parent
35d1d34ee0
commit
42e35fefff
13 changed files with 393 additions and 224 deletions
2
Makefile
2
Makefile
|
@ -1,7 +1,7 @@
|
||||||
#!/usr/bin/make -f
|
#!/usr/bin/make -f
|
||||||
SHELL=bash
|
SHELL=bash
|
||||||
|
|
||||||
# BRanch to match for BRaking changes
|
# BRanch to match for BReaking changes
|
||||||
BRBR?=master
|
BRBR?=master
|
||||||
|
|
||||||
.PHONY: lint
|
.PHONY: lint
|
||||||
|
|
|
@ -1,9 +1,9 @@
|
||||||
syntax = "proto3";
|
syntax = "proto3";
|
||||||
|
|
||||||
package accounting;
|
package neo.fs.v2.accounting;
|
||||||
|
|
||||||
option go_package = "github.com/nspcc-dev/neofs-api-go/accounting";
|
option go_package = "github.com/nspcc-dev/neofs-api-go/v2/accounting;accounting";
|
||||||
option csharp_namespace = "NeoFS.API.Accounting";
|
option csharp_namespace = "NeoFS.API.v2.Accounting";
|
||||||
|
|
||||||
import "refs/types.proto";
|
import "refs/types.proto";
|
||||||
import "service/meta.proto";
|
import "service/meta.proto";
|
||||||
|
@ -11,7 +11,7 @@ import "service/verify.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 AccountingService {
|
||||||
// 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);
|
||||||
}
|
}
|
||||||
|
@ -24,23 +24,23 @@ service Accounting {
|
||||||
// To gain access to the requested information, the request body must be formed
|
// To gain access to the requested information, the request body must be formed
|
||||||
// according to the requirements from the system specification.
|
// according to the requirements from the system specification.
|
||||||
message BalanceRequest {
|
message BalanceRequest {
|
||||||
|
//Request body
|
||||||
message Body {
|
message Body {
|
||||||
// Carries user identifier in NeoFS system for which the balance
|
// Carries user identifier in NeoFS system for which the balance
|
||||||
// is requested.
|
// is requested.
|
||||||
refs.OwnerID owner_id = 1;
|
neo.fs.v2.refs.OwnerID owner_id = 1;
|
||||||
}
|
}
|
||||||
|
|
||||||
// Body of the balance request message.
|
// Body of the balance request message.
|
||||||
Body body = 1;
|
Body body = 1;
|
||||||
|
|
||||||
// Carries request meta information. Header data is used only to regulate
|
// Carries request meta information. Header data is used only to regulate
|
||||||
// message transport and does not affect request execution.
|
// message transport and does not affect request execution.
|
||||||
service.RequestMetaHeader meta_header = 2;
|
neo.fs.v2.service.RequestMetaHeader meta_header = 2;
|
||||||
|
|
||||||
// Carries request verification information. This header is used to
|
// Carries request verification information. This header is used to
|
||||||
// authenticate the nodes of the message route and check the correctness
|
// authenticate the nodes of the message route and check the correctness
|
||||||
// of transmission.
|
// of transmission.
|
||||||
service.RequestVerificationHeader verify_header = 3;
|
neo.fs.v2.service.RequestVerificationHeader verify_header = 3;
|
||||||
}
|
}
|
||||||
|
|
||||||
// Decimal represents the decimal numbers.
|
// Decimal represents the decimal numbers.
|
||||||
|
@ -56,20 +56,20 @@ message Decimal {
|
||||||
//
|
//
|
||||||
// The amount of funds is calculated in decimal numbers.
|
// The amount of funds is calculated in decimal numbers.
|
||||||
message BalanceResponse {
|
message BalanceResponse {
|
||||||
|
//Request body
|
||||||
message Body {
|
message Body {
|
||||||
// Carries the amount of funds on the account.
|
// Carries the amount of funds on the account.
|
||||||
Decimal balance = 1;
|
Decimal balance = 1;
|
||||||
}
|
}
|
||||||
|
|
||||||
// Body of the balance response message.
|
// Body of the balance response message.
|
||||||
Body body = 1;
|
Body body = 1;
|
||||||
|
|
||||||
// Carries response meta information. Header data is used only to regulate
|
// Carries response meta information. Header data is used only to regulate
|
||||||
// message transport and does not affect request execution.
|
// message transport and does not affect request execution.
|
||||||
service.ResponseMetaHeader meta_header = 2;
|
neo.fs.v2.service.ResponseMetaHeader meta_header = 2;
|
||||||
|
|
||||||
// Carries response verification information. This header is used to
|
// Carries response verification information. This header is used to
|
||||||
// authenticate the nodes of the message route and check the correctness
|
// authenticate the nodes of the message route and check the correctness
|
||||||
// of transmission.
|
// of transmission.
|
||||||
service.ResponseVerificationHeader verify_header = 3;
|
neo.fs.v2.service.ResponseVerificationHeader verify_header = 3;
|
||||||
}
|
}
|
||||||
|
|
|
@ -1,16 +1,16 @@
|
||||||
syntax = "proto3";
|
syntax = "proto3";
|
||||||
|
|
||||||
package acl;
|
package neo.fs.v2.acl;
|
||||||
|
|
||||||
option go_package = "github.com/nspcc-dev/neofs-api-go/acl";
|
option go_package = "github.com/nspcc-dev/neofs-api-go/v2/acl;acl";
|
||||||
option csharp_namespace = "NeoFS.API.Acl";
|
option csharp_namespace = "NeoFS.API.v2.Acl";
|
||||||
|
|
||||||
import "refs/types.proto";
|
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.
|
// Unspecified target, default value.
|
||||||
UNKNOWN = 0;
|
TARGET_UNSPECIFIED= 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;
|
||||||
|
@ -27,13 +27,28 @@ enum Target {
|
||||||
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;
|
// Unspecified operation, default value.
|
||||||
|
OPERATION_UNSPECIFIED = 0;
|
||||||
|
|
||||||
|
// Get
|
||||||
GET = 1;
|
GET = 1;
|
||||||
|
|
||||||
|
// Head
|
||||||
HEAD = 2;
|
HEAD = 2;
|
||||||
|
|
||||||
|
// Put
|
||||||
PUT = 3;
|
PUT = 3;
|
||||||
|
|
||||||
|
// Delete
|
||||||
DELETE = 4;
|
DELETE = 4;
|
||||||
|
|
||||||
|
// Search
|
||||||
SEARCH = 5;
|
SEARCH = 5;
|
||||||
|
|
||||||
|
// GetRange
|
||||||
GETRANGE = 6;
|
GETRANGE = 6;
|
||||||
|
|
||||||
|
// GetRangeHash
|
||||||
GETRANGEHASH = 7;
|
GETRANGEHASH = 7;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -42,8 +57,13 @@ message EACLRecord {
|
||||||
|
|
||||||
// Action is an enumeration of EACL actions.
|
// Action is an enumeration of EACL actions.
|
||||||
enum Action {
|
enum Action {
|
||||||
ACTION_UNKNOWN = 0;
|
// Unspecified action, default value.
|
||||||
|
ACTION_UNSPECIFIED = 0;
|
||||||
|
|
||||||
|
// Allow action
|
||||||
ALLOW = 1;
|
ALLOW = 1;
|
||||||
|
|
||||||
|
// Deny action
|
||||||
DENY = 2;
|
DENY = 2;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -54,8 +74,13 @@ message EACLRecord {
|
||||||
message FilterInfo {
|
message FilterInfo {
|
||||||
// Header is an enumeration of filtering header types.
|
// Header is an enumeration of filtering header types.
|
||||||
enum Header {
|
enum Header {
|
||||||
HEADER_UNKNOWN = 0;
|
// Unspecified header, default value.
|
||||||
|
HEADER_UNSPECIFIED = 0;
|
||||||
|
|
||||||
|
// Filter request headers
|
||||||
REQUEST = 1;
|
REQUEST = 1;
|
||||||
|
|
||||||
|
// Filter object headers
|
||||||
OBJECT = 2;
|
OBJECT = 2;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -64,11 +89,15 @@ message EACLRecord {
|
||||||
|
|
||||||
// MatchType is an enumeration of match types.
|
// MatchType is an enumeration of match types.
|
||||||
enum MatchType {
|
enum MatchType {
|
||||||
MATCH_UNKNOWN = 0;
|
// Unspecified match type, default value.
|
||||||
|
MATCH_TYPE_UNSPECIFIED = 0;
|
||||||
|
|
||||||
|
// Return true if strings are equal
|
||||||
STRING_EQUAL = 1;
|
STRING_EQUAL = 1;
|
||||||
|
|
||||||
|
// Return true if strings are different
|
||||||
STRING_NOT_EQUAL = 2;
|
STRING_NOT_EQUAL = 2;
|
||||||
}
|
}
|
||||||
|
|
||||||
// MatchType carries type of match.
|
// MatchType carries type of match.
|
||||||
MatchType match_type = 2 [json_name = "MatchType"];
|
MatchType match_type = 2 [json_name = "MatchType"];
|
||||||
|
|
||||||
|
@ -90,7 +119,6 @@ message EACLRecord {
|
||||||
// key_list carries public keys of ACL target.
|
// key_list carries public keys of ACL target.
|
||||||
repeated bytes key_list = 2 [json_name="Keys"];
|
repeated bytes key_list = 2 [json_name="Keys"];
|
||||||
}
|
}
|
||||||
|
|
||||||
// targets carries information about extended ACL target list.
|
// targets carries information about extended ACL target list.
|
||||||
repeated TargetInfo targets = 4 [json_name="Targets"];
|
repeated TargetInfo targets = 4 [json_name="Targets"];
|
||||||
}
|
}
|
||||||
|
@ -99,7 +127,7 @@ message EACLRecord {
|
||||||
message EACLTable {
|
message EACLTable {
|
||||||
// Carries identifier of the container that should use given
|
// Carries identifier of the container that should use given
|
||||||
// access control rules.
|
// access control rules.
|
||||||
refs.ContainerID container_id = 1 [json_name="ContainerID"];
|
neo.fs.v2.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"];
|
||||||
|
|
|
@ -1,9 +1,9 @@
|
||||||
syntax = "proto3";
|
syntax = "proto3";
|
||||||
|
|
||||||
package container;
|
package neo.fs.v2.container;
|
||||||
|
|
||||||
option go_package = "github.com/nspcc-dev/neofs-api-go/container";
|
option go_package = "github.com/nspcc-dev/neofs-api-go/v2/container;container";
|
||||||
option csharp_namespace = "NeoFS.API.Container";
|
option csharp_namespace = "NeoFS.API.v2.Container";
|
||||||
|
|
||||||
import "acl/types.proto";
|
import "acl/types.proto";
|
||||||
import "container/types.proto";
|
import "container/types.proto";
|
||||||
|
@ -11,9 +11,9 @@ import "refs/types.proto";
|
||||||
import "service/meta.proto";
|
import "service/meta.proto";
|
||||||
import "service/verify.proto";
|
import "service/verify.proto";
|
||||||
|
|
||||||
// Service provides API to access container smart-contract in morph chain
|
// ContainerService provides API to access container smart-contract in morph chain
|
||||||
// via NeoFS node.
|
// via NeoFS node.
|
||||||
service Service {
|
service ContainerService {
|
||||||
// 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
|
||||||
|
@ -43,7 +43,9 @@ service Service {
|
||||||
rpc GetExtendedACL(GetExtendedACLRequest) returns (GetExtendedACLResponse);
|
rpc GetExtendedACL(GetExtendedACLRequest) returns (GetExtendedACLResponse);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// New NeoFS Container creation request
|
||||||
message PutRequest {
|
message PutRequest {
|
||||||
|
// Request body
|
||||||
message Body {
|
message Body {
|
||||||
// Container to create in NeoFS.
|
// Container to create in NeoFS.
|
||||||
container.Container container = 1;
|
container.Container container = 1;
|
||||||
|
@ -55,138 +57,144 @@ message PutRequest {
|
||||||
// Signature of stable-marshalled container according to RFC-6979.
|
// Signature of stable-marshalled container according to RFC-6979.
|
||||||
bytes signature = 3;
|
bytes signature = 3;
|
||||||
}
|
}
|
||||||
|
|
||||||
// Body of container put request message.
|
// Body of container put request message.
|
||||||
Body body = 1;
|
Body body = 1;
|
||||||
|
|
||||||
// Carries request meta information. Header data is used only to regulate
|
// Carries request meta information. Header data is used only to regulate
|
||||||
// message transport and does not affect request execution.
|
// message transport and does not affect request execution.
|
||||||
service.RequestMetaHeader meta_header = 2;
|
neo.fs.v2.service.RequestMetaHeader meta_header = 2;
|
||||||
|
|
||||||
// Carries request verification information. This header is used to
|
// Carries request verification information. This header is used to
|
||||||
// authenticate the nodes of the message route and check the correctness
|
// authenticate the nodes of the message route and check the correctness
|
||||||
// of transmission.
|
// of transmission.
|
||||||
service.RequestVerificationHeader verify_header = 3;
|
neo.fs.v2.service.RequestVerificationHeader verify_header = 3;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// New NeoFS Container creation response
|
||||||
message PutResponse {
|
message PutResponse {
|
||||||
|
// Response body
|
||||||
message Body {
|
message Body {
|
||||||
// container_id carries identifier of the new container.
|
// container_id carries identifier of the new container.
|
||||||
refs.ContainerID container_id = 1;
|
neo.fs.v2.refs.ContainerID container_id = 1;
|
||||||
}
|
}
|
||||||
|
|
||||||
// Body of container put response message.
|
// Body of container put response message.
|
||||||
Body body = 1;
|
Body body = 1;
|
||||||
|
|
||||||
// Carries response meta information. Header data is used only to regulate
|
// Carries response meta information. Header data is used only to regulate
|
||||||
// message transport and does not affect request execution.
|
// message transport and does not affect request execution.
|
||||||
service.ResponseMetaHeader meta_header = 2;
|
neo.fs.v2.service.ResponseMetaHeader meta_header = 2;
|
||||||
|
|
||||||
// Carries response verification information. This header is used to
|
// Carries response verification information. This header is used to
|
||||||
// authenticate the nodes of the message route and check the correctness
|
// authenticate the nodes of the message route and check the correctness
|
||||||
// of transmission.
|
// of transmission.
|
||||||
service.ResponseVerificationHeader verify_header = 3;
|
neo.fs.v2.service.ResponseVerificationHeader verify_header = 3;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// Container removal request
|
||||||
message DeleteRequest {
|
message DeleteRequest {
|
||||||
|
// Request body
|
||||||
message Body {
|
message Body {
|
||||||
// container_id carries identifier of the container to delete
|
// container_id carries identifier of the container to delete
|
||||||
// from NeoFS.
|
// from NeoFS.
|
||||||
refs.ContainerID container_id = 1;
|
neo.fs.v2.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;
|
||||||
}
|
}
|
||||||
|
|
||||||
// Body of container delete request message.
|
// Body of container delete request message.
|
||||||
Body body = 1;
|
Body body = 1;
|
||||||
|
|
||||||
// Carries request meta information. Header data is used only to regulate
|
// Carries request meta information. Header data is used only to regulate
|
||||||
// message transport and does not affect request execution.
|
// message transport and does not affect request execution.
|
||||||
service.RequestMetaHeader meta_header = 2;
|
neo.fs.v2.service.RequestMetaHeader meta_header = 2;
|
||||||
|
|
||||||
// Carries request verification information. This header is used to
|
// Carries request verification information. This header is used to
|
||||||
// authenticate the nodes of the message route and check the correctness
|
// authenticate the nodes of the message route and check the correctness
|
||||||
// of transmission.
|
// of transmission.
|
||||||
service.RequestVerificationHeader verify_header = 3;
|
neo.fs.v2.service.RequestVerificationHeader verify_header = 3;
|
||||||
}
|
}
|
||||||
|
|
||||||
// DeleteResponse is empty because delete operation is asynchronous and done
|
// DeleteResponse is empty because delete operation is asynchronous and done
|
||||||
// via consensus in inner ring nodes
|
// via consensus in inner ring nodes
|
||||||
message DeleteResponse {
|
message DeleteResponse {
|
||||||
|
// Response body
|
||||||
message Body {}
|
message Body {}
|
||||||
|
|
||||||
// Body of container delete response message.
|
// Body of container delete response message.
|
||||||
Body body = 1;
|
Body body = 1;
|
||||||
|
|
||||||
// Carries response meta information. Header data is used only to regulate
|
// Carries response meta information. Header data is used only to regulate
|
||||||
// message transport and does not affect request execution.
|
// message transport and does not affect request execution.
|
||||||
service.ResponseMetaHeader meta_header = 2;
|
neo.fs.v2.service.ResponseMetaHeader meta_header = 2;
|
||||||
|
|
||||||
// Carries response verification information. This header is used to
|
// Carries response verification information. This header is used to
|
||||||
// authenticate the nodes of the message route and check the correctness
|
// authenticate the nodes of the message route and check the correctness
|
||||||
// of transmission.
|
// of transmission.
|
||||||
service.ResponseVerificationHeader verify_header = 3;
|
neo.fs.v2.service.ResponseVerificationHeader verify_header = 3;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// Get container structure
|
||||||
message GetRequest {
|
message GetRequest {
|
||||||
|
// Request body
|
||||||
message Body {
|
message Body {
|
||||||
// container_id carries identifier of the container to get.
|
// container_id carries identifier of the container to get.
|
||||||
refs.ContainerID container_id = 1;
|
neo.fs.v2.refs.ContainerID container_id = 1;
|
||||||
}
|
}
|
||||||
|
|
||||||
// Body of container get request message.
|
// Body of container get request message.
|
||||||
Body body = 1;
|
Body body = 1;
|
||||||
|
|
||||||
// Carries request meta information. Header data is used only to regulate
|
// Carries request meta information. Header data is used only to regulate
|
||||||
// message transport and does not affect request execution.
|
// message transport and does not affect request execution.
|
||||||
service.RequestMetaHeader meta_header = 2;
|
neo.fs.v2.service.RequestMetaHeader meta_header = 2;
|
||||||
|
|
||||||
// Carries request verification information. This header is used to
|
// Carries request verification information. This header is used to
|
||||||
// authenticate the nodes of the message route and check the correctness
|
// authenticate the nodes of the message route and check the correctness
|
||||||
// of transmission.
|
// of transmission.
|
||||||
service.RequestVerificationHeader verify_header = 3;
|
neo.fs.v2.service.RequestVerificationHeader verify_header = 3;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// Get container structure
|
||||||
message GetResponse {
|
message GetResponse {
|
||||||
|
// Response body
|
||||||
message Body {
|
message Body {
|
||||||
// Container that has been requested.
|
// Container that has been requested.
|
||||||
container.Container container = 1;
|
Container container = 1;
|
||||||
}
|
}
|
||||||
|
|
||||||
// Body of container get response message.
|
// Body of container get response message.
|
||||||
Body body = 1;
|
Body body = 1;
|
||||||
|
|
||||||
// Carries response meta information. Header data is used only to regulate
|
// Carries response meta information. Header data is used only to regulate
|
||||||
// message transport and does not affect request execution.
|
// message transport and does not affect request execution.
|
||||||
service.ResponseMetaHeader meta_header = 2;
|
neo.fs.v2.service.ResponseMetaHeader meta_header = 2;
|
||||||
|
|
||||||
// Carries response verification information. This header is used to
|
// Carries response verification information. This header is used to
|
||||||
// authenticate the nodes of the message route and check the correctness
|
// authenticate the nodes of the message route and check the correctness
|
||||||
// of transmission.
|
// of transmission.
|
||||||
service.ResponseVerificationHeader verify_header = 3;
|
neo.fs.v2.service.ResponseVerificationHeader verify_header = 3;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// List containers
|
||||||
message ListRequest {
|
message ListRequest {
|
||||||
|
// Request body
|
||||||
message Body {
|
message Body {
|
||||||
// owner_id carries identifier of the container owner.
|
// owner_id carries identifier of the container owner.
|
||||||
refs.OwnerID owner_id = 1;
|
neo.fs.v2.refs.OwnerID owner_id = 1;
|
||||||
}
|
}
|
||||||
|
|
||||||
// Body of list containers request message.
|
// Body of list containers request message.
|
||||||
Body body = 1;
|
Body body = 1;
|
||||||
|
|
||||||
// Carries request meta information. Header data is used only to regulate
|
// Carries request meta information. Header data is used only to regulate
|
||||||
// message transport and does not affect request execution.
|
// message transport and does not affect request execution.
|
||||||
service.RequestMetaHeader meta_header = 2;
|
neo.fs.v2.service.RequestMetaHeader meta_header = 2;
|
||||||
|
|
||||||
// Carries request verification information. This header is used to
|
// Carries request verification information. This header is used to
|
||||||
// authenticate the nodes of the message route and check the correctness
|
// authenticate the nodes of the message route and check the correctness
|
||||||
// of transmission.
|
// of transmission.
|
||||||
service.RequestVerificationHeader verify_header = 3;
|
neo.fs.v2.service.RequestVerificationHeader verify_header = 3;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// List containers
|
||||||
message ListResponse {
|
message ListResponse {
|
||||||
|
// Response body
|
||||||
message Body {
|
message Body {
|
||||||
// ContainerIDs carries list of identifiers of the containers that belong to the owner.
|
// ContainerIDs carries list of identifiers of the containers that belong to the owner.
|
||||||
repeated refs.ContainerID container_ids = 1;
|
repeated refs.ContainerID container_ids = 1;
|
||||||
|
@ -197,37 +205,40 @@ message ListResponse {
|
||||||
|
|
||||||
// Carries response meta information. Header data is used only to regulate
|
// Carries response meta information. Header data is used only to regulate
|
||||||
// message transport and does not affect request execution.
|
// message transport and does not affect request execution.
|
||||||
service.ResponseMetaHeader meta_header = 2;
|
neo.fs.v2.service.ResponseMetaHeader meta_header = 2;
|
||||||
|
|
||||||
// Carries response verification information. This header is used to
|
// Carries response verification information. This header is used to
|
||||||
// authenticate the nodes of the message route and check the correctness
|
// authenticate the nodes of the message route and check the correctness
|
||||||
// of transmission.
|
// of transmission.
|
||||||
service.ResponseVerificationHeader verify_header = 3;
|
neo.fs.v2.service.ResponseVerificationHeader verify_header = 3;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// Set Extended ACL
|
||||||
message SetExtendedACLRequest {
|
message SetExtendedACLRequest {
|
||||||
|
// Request body
|
||||||
message Body {
|
message Body {
|
||||||
// Extended ACL to set for the container.
|
// Extended ACL to set for the container.
|
||||||
acl.EACLTable eacl = 1;
|
neo.fs.v2.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;
|
||||||
}
|
}
|
||||||
|
|
||||||
// Body of set extended acl request message.
|
// Body of set extended acl request message.
|
||||||
Body body = 1;
|
Body body = 1;
|
||||||
|
|
||||||
// Carries request meta information. Header data is used only to regulate
|
// Carries request meta information. Header data is used only to regulate
|
||||||
// message transport and does not affect request execution.
|
// message transport and does not affect request execution.
|
||||||
service.RequestMetaHeader meta_header = 2;
|
neo.fs.v2.service.RequestMetaHeader meta_header = 2;
|
||||||
|
|
||||||
// Carries request verification information. This header is used to
|
// Carries request verification information. This header is used to
|
||||||
// authenticate the nodes of the message route and check the correctness
|
// authenticate the nodes of the message route and check the correctness
|
||||||
// of transmission.
|
// of transmission.
|
||||||
service.RequestVerificationHeader verify_header = 3;
|
neo.fs.v2.service.RequestVerificationHeader verify_header = 3;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// Set Extended ACL
|
||||||
message SetExtendedACLResponse {
|
message SetExtendedACLResponse {
|
||||||
|
// Response body
|
||||||
message Body { }
|
message Body { }
|
||||||
|
|
||||||
// Body of set extended acl response message.
|
// Body of set extended acl response message.
|
||||||
|
@ -235,18 +246,20 @@ message SetExtendedACLResponse {
|
||||||
|
|
||||||
// Carries response meta information. Header data is used only to regulate
|
// Carries response meta information. Header data is used only to regulate
|
||||||
// message transport and does not affect request execution.
|
// message transport and does not affect request execution.
|
||||||
service.ResponseMetaHeader meta_header = 2;
|
neo.fs.v2.service.ResponseMetaHeader meta_header = 2;
|
||||||
|
|
||||||
// Carries response verification information. This header is used to
|
// Carries response verification information. This header is used to
|
||||||
// authenticate the nodes of the message route and check the correctness
|
// authenticate the nodes of the message route and check the correctness
|
||||||
// of transmission.
|
// of transmission.
|
||||||
service.ResponseVerificationHeader verify_header = 3;
|
neo.fs.v2.service.ResponseVerificationHeader verify_header = 3;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// Get Extended ACL
|
||||||
message GetExtendedACLRequest {
|
message GetExtendedACLRequest {
|
||||||
|
// Request body
|
||||||
message Body {
|
message Body {
|
||||||
// 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;
|
neo.fs.v2.refs.ContainerID container_id = 1;
|
||||||
}
|
}
|
||||||
|
|
||||||
// Body of get extended acl request message.
|
// Body of get extended acl request message.
|
||||||
|
@ -254,32 +267,33 @@ message GetExtendedACLRequest {
|
||||||
|
|
||||||
// Carries request meta information. Header data is used only to regulate
|
// Carries request meta information. Header data is used only to regulate
|
||||||
// message transport and does not affect request execution.
|
// message transport and does not affect request execution.
|
||||||
service.RequestMetaHeader meta_header = 2;
|
neo.fs.v2.service.RequestMetaHeader meta_header = 2;
|
||||||
|
|
||||||
// Carries request verification information. This header is used to
|
// Carries request verification information. This header is used to
|
||||||
// authenticate the nodes of the message route and check the correctness
|
// authenticate the nodes of the message route and check the correctness
|
||||||
// of transmission.
|
// of transmission.
|
||||||
service.RequestVerificationHeader verify_header = 3;
|
neo.fs.v2.service.RequestVerificationHeader verify_header = 3;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// Get Extended ACL
|
||||||
message GetExtendedACLResponse {
|
message GetExtendedACLResponse {
|
||||||
|
// Response body
|
||||||
message Body {
|
message Body {
|
||||||
// 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;
|
neo.fs.v2.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;
|
||||||
}
|
}
|
||||||
|
|
||||||
// Body of get extended acl response message.
|
// Body of get extended acl response message.
|
||||||
Body body = 1;
|
Body body = 1;
|
||||||
|
|
||||||
// Carries response meta information. Header data is used only to regulate
|
// Carries response meta information. Header data is used only to regulate
|
||||||
// message transport and does not affect request execution.
|
// message transport and does not affect request execution.
|
||||||
service.ResponseMetaHeader meta_header = 2;
|
neo.fs.v2.service.ResponseMetaHeader meta_header = 2;
|
||||||
|
|
||||||
// Carries response verification information. This header is used to
|
// Carries response verification information. This header is used to
|
||||||
// authenticate the nodes of the message route and check the correctness
|
// authenticate the nodes of the message route and check the correctness
|
||||||
// of transmission.
|
// of transmission.
|
||||||
service.ResponseVerificationHeader verify_header = 3;
|
neo.fs.v2.service.ResponseVerificationHeader verify_header = 3;
|
||||||
}
|
}
|
||||||
|
|
|
@ -1,9 +1,9 @@
|
||||||
syntax = "proto3";
|
syntax = "proto3";
|
||||||
|
|
||||||
package container;
|
package neo.fs.v2.container;
|
||||||
|
|
||||||
option go_package = "github.com/nspcc-dev/neofs-api-go/container";
|
option go_package = "github.com/nspcc-dev/neofs-api-go/v2/container;container";
|
||||||
option csharp_namespace = "NeoFS.API.Container";
|
option csharp_namespace = "NeoFS.API.v2.Container";
|
||||||
|
|
||||||
import "netmap/types.proto";
|
import "netmap/types.proto";
|
||||||
import "refs/types.proto";
|
import "refs/types.proto";
|
||||||
|
@ -14,7 +14,7 @@ import "refs/types.proto";
|
||||||
// SHA256 hash of stable-marshalled container message.
|
// SHA256 hash of stable-marshalled container message.
|
||||||
message Container {
|
message Container {
|
||||||
// OwnerID carries identifier of the container owner.
|
// OwnerID carries identifier of the container owner.
|
||||||
refs.OwnerID owner_id = 1;
|
neo.fs.v2.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;
|
||||||
|
@ -31,10 +31,9 @@ message Container {
|
||||||
// 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.
|
// Placement policy for the object inside the container.
|
||||||
netmap.PlacementRule rules = 5;
|
neo.fs.v2.netmap.PlacementPolicy placement_policy = 5;
|
||||||
}
|
}
|
||||||
|
|
|
@ -1,84 +1,118 @@
|
||||||
syntax = "proto3";
|
syntax = "proto3";
|
||||||
|
|
||||||
package netmap;
|
package neo.fs.v2.netmap;
|
||||||
|
|
||||||
option go_package = "github.com/nspcc-dev/neofs-api-go/netmap";
|
option go_package = "github.com/nspcc-dev/neofs-api-go/netmap;netmap";
|
||||||
option csharp_namespace = "NeoFS.API.Netmap";
|
option csharp_namespace = "NeoFS.API.v2.Netmap";
|
||||||
|
|
||||||
message PlacementRule {
|
// Set of rules to select a subset of nodes able to store container's objects
|
||||||
|
message PlacementPolicy {
|
||||||
|
// Replication factor
|
||||||
uint32 repl_factor = 1;
|
uint32 repl_factor = 1;
|
||||||
|
|
||||||
message SFGroup {
|
// Filters to apply to Network Map
|
||||||
|
message FilterGroup {
|
||||||
|
// Filter definition
|
||||||
message Filter {
|
message Filter {
|
||||||
|
// Filter identifier
|
||||||
string key = 1;
|
string key = 1;
|
||||||
|
|
||||||
message SimpleFilters {
|
// Minimal simple filter
|
||||||
repeated SimpleFilter filters = 1;
|
|
||||||
}
|
|
||||||
|
|
||||||
message SimpleFilter {
|
message SimpleFilter {
|
||||||
|
// Filtering operation
|
||||||
enum Operation {
|
enum Operation {
|
||||||
NP = 0;
|
// No Operation defined
|
||||||
|
OPERATION_UNSPECIFIED= 0;
|
||||||
|
|
||||||
|
// Equal
|
||||||
EQ = 1;
|
EQ = 1;
|
||||||
|
|
||||||
|
// Not Equal
|
||||||
NE = 2;
|
NE = 2;
|
||||||
|
|
||||||
|
// Greater then
|
||||||
GT = 3;
|
GT = 3;
|
||||||
|
|
||||||
|
// Greater or equal
|
||||||
GE = 4;
|
GE = 4;
|
||||||
|
|
||||||
|
// Less then
|
||||||
LT = 5;
|
LT = 5;
|
||||||
|
|
||||||
|
// Less or equal
|
||||||
LE = 6;
|
LE = 6;
|
||||||
|
|
||||||
|
// Logical OR
|
||||||
OR = 7;
|
OR = 7;
|
||||||
|
|
||||||
|
// Logical AND
|
||||||
AND = 8;
|
AND = 8;
|
||||||
}
|
}
|
||||||
|
// Filtering operation
|
||||||
Operation op = 1;
|
Operation op = 1;
|
||||||
|
|
||||||
|
// List of filters
|
||||||
|
message SimpleFilters {
|
||||||
|
// List of filters
|
||||||
|
repeated SimpleFilter filters = 1;
|
||||||
|
}
|
||||||
|
|
||||||
|
// Filtering operation argument
|
||||||
oneof args {
|
oneof args {
|
||||||
|
// Value
|
||||||
string value = 2;
|
string value = 2;
|
||||||
|
// Result of other filter application
|
||||||
SimpleFilters f_args = 3;
|
SimpleFilters f_args = 3;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
// The rest of filter
|
||||||
SimpleFilter f = 2;
|
SimpleFilter f = 2;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// Resulting filter list
|
||||||
repeated Filter filters = 1;
|
repeated Filter filters = 1;
|
||||||
|
|
||||||
|
// Selector
|
||||||
message Selector {
|
message Selector {
|
||||||
|
// How many to select
|
||||||
uint32 count = 1;
|
uint32 count = 1;
|
||||||
|
// Key to select
|
||||||
string key = 2;
|
string key = 2;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// List of selectors
|
||||||
repeated Selector selectors = 2;
|
repeated Selector selectors = 2;
|
||||||
|
|
||||||
|
// Parts of graph to exclude. Internal use.
|
||||||
repeated uint32 exclude = 3;
|
repeated uint32 exclude = 3;
|
||||||
}
|
}
|
||||||
|
// List of filter groups
|
||||||
repeated SFGroup sf_groups = 2;
|
repeated FilterGroup filter_groups = 2;
|
||||||
}
|
}
|
||||||
|
|
||||||
// Groups the information about the NeoFS node.
|
// NeoFS node description
|
||||||
message NodeInfo {
|
message NodeInfo {
|
||||||
// Carries network address of the NeoFS node.
|
// Ways to connect to a node
|
||||||
string address = 1;
|
string address = 1;
|
||||||
|
|
||||||
// Carries public key of the NeoFS node in a binary format.
|
// Public key of the NeoFS node in a binary format.
|
||||||
bytes public_key = 2;
|
bytes public_key = 2;
|
||||||
|
|
||||||
// Groups attributes of the NeoFS node.
|
// Attributes of the NeoFS node.
|
||||||
message Attribute {
|
message Attribute {
|
||||||
// Carries string key to the node attribute.
|
// Key of the node attribute.
|
||||||
string key = 1;
|
string key = 1;
|
||||||
|
|
||||||
// Carries string value of the node attribute.
|
// 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.
|
// Unknown state.
|
||||||
UNKNOWN = 0;
|
UNSPECIFIED = 0;
|
||||||
|
|
||||||
// Active state in the network.
|
// Active state in the network.
|
||||||
ONLINE = 1;
|
ONLINE = 1;
|
||||||
|
@ -89,4 +123,4 @@ message NodeInfo {
|
||||||
|
|
||||||
// Carries state of the NeoFS node.
|
// Carries state of the NeoFS node.
|
||||||
State state = 4;
|
State state = 4;
|
||||||
}
|
}
|
||||||
|
|
|
@ -1,9 +1,9 @@
|
||||||
syntax = "proto3";
|
syntax = "proto3";
|
||||||
|
|
||||||
package object;
|
package neo.fs.v2.object;
|
||||||
|
|
||||||
option go_package = "github.com/nspcc-dev/neofs-api-go/object";
|
option go_package = "github.com/nspcc-dev/neofs-api-go/v2/object;object";
|
||||||
option csharp_namespace = "NeoFS.API.Object";
|
option csharp_namespace = "NeoFS.API.v2.Object";
|
||||||
|
|
||||||
import "object/types.proto";
|
import "object/types.proto";
|
||||||
import "refs/types.proto";
|
import "refs/types.proto";
|
||||||
|
@ -11,7 +11,7 @@ import "service/meta.proto";
|
||||||
import "service/verify.proto";
|
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 ObjectService {
|
||||||
// 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
|
||||||
|
@ -52,10 +52,12 @@ service Service {
|
||||||
rpc GetRangeHash(GetRangeHashRequest) returns (GetRangeHashResponse);
|
rpc GetRangeHash(GetRangeHashRequest) returns (GetRangeHashResponse);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// Get object request
|
||||||
message GetRequest {
|
message GetRequest {
|
||||||
|
// Request body
|
||||||
message Body {
|
message Body {
|
||||||
// Address of the requested object.
|
// Address of the requested object.
|
||||||
refs.Address address = 1;
|
neo.fs.v2.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
|
||||||
|
@ -67,21 +69,25 @@ message GetRequest {
|
||||||
|
|
||||||
// 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 = 2;
|
neo.fs.v2.service.RequestMetaHeader meta_header = 2;
|
||||||
|
|
||||||
// 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 = 3;
|
neo.fs.v2.service.RequestVerificationHeader verify_header = 3;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// get object response
|
||||||
message GetResponse {
|
message GetResponse {
|
||||||
|
// Response body
|
||||||
message Body {
|
message Body {
|
||||||
// Initialization parameters of the object got from NeoFS.
|
// Initialization parameters of the object got from NeoFS.
|
||||||
message Init {
|
message Init {
|
||||||
// Object ID
|
// Object ID
|
||||||
refs.ObjectID object_id = 1;
|
neo.fs.v2.refs.ObjectID object_id = 1;
|
||||||
|
|
||||||
// Object signature
|
// Object signature
|
||||||
service.Signature signature =2;
|
neo.fs.v2.service.Signature signature =2;
|
||||||
|
|
||||||
// Object header.
|
// Object header.
|
||||||
Header header = 3;
|
Header header = 3;
|
||||||
}
|
}
|
||||||
|
@ -89,6 +95,7 @@ message GetResponse {
|
||||||
oneof object_part {
|
oneof object_part {
|
||||||
// Initialization parameters of the object stream.
|
// Initialization parameters of the object stream.
|
||||||
Init init =1;
|
Init init =1;
|
||||||
|
|
||||||
// Part of the object payload.
|
// Part of the object payload.
|
||||||
bytes chunk = 2;
|
bytes chunk = 2;
|
||||||
}
|
}
|
||||||
|
@ -98,34 +105,39 @@ message GetResponse {
|
||||||
|
|
||||||
// Carries response meta information. Header data is used only to regulate
|
// Carries response meta information. Header data is used only to regulate
|
||||||
// message transport and does not affect request execution.
|
// message transport and does not affect request execution.
|
||||||
service.ResponseMetaHeader meta_header = 2;
|
neo.fs.v2.service.ResponseMetaHeader meta_header = 2;
|
||||||
|
|
||||||
// Carries response verification information. This header is used to
|
// Carries response verification information. This header is used to
|
||||||
// authenticate the nodes of the message route and check the correctness
|
// authenticate the nodes of the message route and check the correctness
|
||||||
// of transmission.
|
// of transmission.
|
||||||
service.ResponseVerificationHeader verify_header = 3;
|
neo.fs.v2.service.ResponseVerificationHeader verify_header = 3;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// Put object request
|
||||||
message PutRequest {
|
message PutRequest {
|
||||||
|
// Request body
|
||||||
message Body {
|
message Body {
|
||||||
// Groups initialization parameters of object placement in NeoFS.
|
// Groups initialization parameters of object placement in NeoFS.
|
||||||
message Init {
|
message Init {
|
||||||
// Object ID, where available
|
// Object ID, where available
|
||||||
refs.ObjectID object_id = 1;
|
neo.fs.v2.refs.ObjectID object_id = 1;
|
||||||
|
|
||||||
// Object signature, were available
|
// Object signature, were available
|
||||||
service.Signature signature =2;
|
neo.fs.v2.service.Signature signature =2;
|
||||||
|
|
||||||
// Header of the object to save in the system.
|
// Header of the object to save in the system.
|
||||||
Header header = 3;
|
Header header = 3;
|
||||||
|
|
||||||
// Number of the object copies to store within the RPC call.
|
// Number of the object copies to store within the RPC call.
|
||||||
// Default zero value is processed according to the
|
// Default zero value is processed according to the
|
||||||
// container placement rules.
|
// container placement rules.
|
||||||
uint32 copies_number = 4;
|
uint32 copies_number = 4;
|
||||||
}
|
}
|
||||||
|
|
||||||
// Carries the single part of the query stream.
|
// Carries the single part of the query stream.
|
||||||
oneof object_part {
|
oneof object_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;
|
||||||
}
|
}
|
||||||
|
@ -135,54 +147,60 @@ message PutRequest {
|
||||||
|
|
||||||
// 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 = 2;
|
neo.fs.v2.service.RequestMetaHeader meta_header = 2;
|
||||||
|
|
||||||
// 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 = 3;
|
neo.fs.v2.service.RequestVerificationHeader verify_header = 3;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// Put object response
|
||||||
message PutResponse {
|
message PutResponse {
|
||||||
|
// Response body
|
||||||
message Body {
|
message Body {
|
||||||
// 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;
|
neo.fs.v2.refs.ObjectID object_id = 1;
|
||||||
}
|
}
|
||||||
// Body of put object response message.
|
// Body of put object response message.
|
||||||
Body body = 1;
|
Body body = 1;
|
||||||
|
|
||||||
// Carries response meta information. Header data is used only to regulate
|
// Carries response meta information. Header data is used only to regulate
|
||||||
// message transport and does not affect request execution.
|
// message transport and does not affect request execution.
|
||||||
service.ResponseMetaHeader meta_header = 2;
|
neo.fs.v2.service.ResponseMetaHeader meta_header = 2;
|
||||||
|
|
||||||
// Carries response verification information. This header is used to
|
// Carries response verification information. This header is used to
|
||||||
// authenticate the nodes of the message route and check the correctness
|
// authenticate the nodes of the message route and check the correctness
|
||||||
// of transmission.
|
// of transmission.
|
||||||
service.ResponseVerificationHeader verify_header = 3;
|
neo.fs.v2.service.ResponseVerificationHeader verify_header = 3;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// Object Delete request
|
||||||
message DeleteRequest {
|
message DeleteRequest {
|
||||||
|
// Request body
|
||||||
message Body {
|
message Body {
|
||||||
// Carries the address of the object to be deleted.
|
// Carries the address of the object to be deleted.
|
||||||
refs.Address address = 1;
|
neo.fs.v2.refs.Address address = 1;
|
||||||
|
|
||||||
// Carries identifier the object owner.
|
// Carries identifier the object owner.
|
||||||
refs.OwnerID owner_id = 2;
|
neo.fs.v2.refs.OwnerID owner_id = 2;
|
||||||
}
|
}
|
||||||
// Body of delete object request message.
|
// Body of delete object request message.
|
||||||
Body body = 1;
|
Body body = 1;
|
||||||
|
|
||||||
// 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 = 2;
|
neo.fs.v2.service.RequestMetaHeader meta_header = 2;
|
||||||
|
|
||||||
// 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 = 3;
|
neo.fs.v2.service.RequestVerificationHeader verify_header = 3;
|
||||||
}
|
}
|
||||||
|
|
||||||
// DeleteResponse is empty because we cannot guarantee permanent object removal
|
// DeleteResponse is empty because we cannot guarantee permanent object removal
|
||||||
// in distributed system.
|
// in distributed system.
|
||||||
message DeleteResponse {
|
message DeleteResponse {
|
||||||
|
// Response body
|
||||||
message Body { }
|
message Body { }
|
||||||
|
|
||||||
// Body of delete object response message.
|
// Body of delete object response message.
|
||||||
|
@ -190,20 +208,24 @@ message DeleteResponse {
|
||||||
|
|
||||||
// Carries response meta information. Header data is used only to regulate
|
// Carries response meta information. Header data is used only to regulate
|
||||||
// message transport and does not affect request execution.
|
// message transport and does not affect request execution.
|
||||||
service.ResponseMetaHeader meta_header = 2;
|
neo.fs.v2.service.ResponseMetaHeader meta_header = 2;
|
||||||
|
|
||||||
// Carries response verification information. This header is used to
|
// Carries response verification information. This header is used to
|
||||||
// authenticate the nodes of the message route and check the correctness
|
// authenticate the nodes of the message route and check the correctness
|
||||||
// of transmission.
|
// of transmission.
|
||||||
service.ResponseVerificationHeader verify_header = 3;
|
neo.fs.v2.service.ResponseVerificationHeader verify_header = 3;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// Object head request
|
||||||
message HeadRequest {
|
message HeadRequest {
|
||||||
|
// Request body
|
||||||
message Body {
|
message Body {
|
||||||
// Address of the object with the requested header.
|
// Address of the object with the requested header.
|
||||||
refs.Address address = 1;
|
neo.fs.v2.refs.Address address = 1;
|
||||||
|
|
||||||
// Return only minimal header subset
|
// Return only minimal header subset
|
||||||
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.
|
||||||
|
@ -214,31 +236,41 @@ message HeadRequest {
|
||||||
|
|
||||||
// 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 = 2;
|
neo.fs.v2.service.RequestMetaHeader meta_header = 2;
|
||||||
|
|
||||||
// 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 = 3;
|
neo.fs.v2.service.RequestVerificationHeader verify_header = 3;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// Head response
|
||||||
message HeadResponse {
|
message HeadResponse {
|
||||||
|
// Response body
|
||||||
message Body {
|
message Body {
|
||||||
|
// Short header fields
|
||||||
message ShortHeader {
|
message ShortHeader {
|
||||||
// Object format version.
|
// Object format version.
|
||||||
service.Version version = 1;
|
neo.fs.v2.service.Version version = 1;
|
||||||
|
|
||||||
// Epoch when the object was created
|
// Epoch when the object was created
|
||||||
uint64 creation_epoch = 2;
|
uint64 creation_epoch = 2;
|
||||||
|
|
||||||
// Object's owner
|
// Object's owner
|
||||||
refs.OwnerID owner_id = 3;
|
neo.fs.v2.refs.OwnerID owner_id = 3;
|
||||||
|
|
||||||
// Type of the object payload content
|
// Type of the object payload content
|
||||||
ObjectType object_type = 4;
|
ObjectType object_type = 4;
|
||||||
|
|
||||||
// Size of payload in bytes.
|
// Size of payload in bytes.
|
||||||
// 0xFFFFFFFFFFFFFFFF means `payload_length` is unknown
|
// 0xFFFFFFFFFFFFFFFF means `payload_length` is unknown
|
||||||
uint64 payload_length = 5;
|
uint64 payload_length = 5;
|
||||||
}
|
}
|
||||||
// Carries the requested object header or it's part
|
// Carries the requested object header or it's part
|
||||||
oneof head{
|
oneof head{
|
||||||
|
// Full object header
|
||||||
Header header = 1;
|
Header header = 1;
|
||||||
|
|
||||||
|
// Short object header
|
||||||
ShortHeader short_header = 2;
|
ShortHeader short_header = 2;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -247,70 +279,74 @@ message HeadResponse {
|
||||||
|
|
||||||
// Carries response meta information. Header data is used only to regulate
|
// Carries response meta information. Header data is used only to regulate
|
||||||
// message transport and does not affect request execution.
|
// message transport and does not affect request execution.
|
||||||
service.ResponseMetaHeader meta_header = 2;
|
neo.fs.v2.service.ResponseMetaHeader meta_header = 2;
|
||||||
|
|
||||||
// Carries response verification information. This header is used to
|
// Carries response verification information. This header is used to
|
||||||
// authenticate the nodes of the message route and check the correctness
|
// authenticate the nodes of the message route and check the correctness
|
||||||
// of transmission.
|
// of transmission.
|
||||||
service.ResponseVerificationHeader verify_header = 3;
|
neo.fs.v2.service.ResponseVerificationHeader verify_header = 3;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// Search objects request
|
||||||
message SearchRequest {
|
message SearchRequest {
|
||||||
|
// Request body
|
||||||
message Body {
|
message Body {
|
||||||
// Carries search container identifier.
|
// Carries search container identifier.
|
||||||
refs.ContainerID container_id = 1;
|
neo.fs.v2.refs.ContainerID container_id = 1;
|
||||||
|
|
||||||
message Query {
|
// Version of the Query Language used
|
||||||
uint32 version = 1;
|
uint32 version = 2;
|
||||||
|
// Filter structure
|
||||||
message Filter {
|
message Filter {
|
||||||
enum MatchType {
|
// Type of match expression
|
||||||
MATCH_UNKNOWN = 0;
|
enum MatchType {
|
||||||
STRING_EQUAL = 1;
|
// Unknown. Not used
|
||||||
}
|
MATCH_TYPE_UNSPECIFIED = 0;
|
||||||
|
// Full string match
|
||||||
MatchType match_type = 1;
|
STRING_EQUAL = 1;
|
||||||
|
|
||||||
string name = 2;
|
|
||||||
|
|
||||||
string value = 3;
|
|
||||||
}
|
}
|
||||||
|
// Match type to use
|
||||||
|
MatchType match_type = 1;
|
||||||
|
|
||||||
repeated Filter filters = 2;
|
// Header name to match
|
||||||
|
string name = 2;
|
||||||
|
|
||||||
|
// Header value to match
|
||||||
|
string value = 3;
|
||||||
}
|
}
|
||||||
|
// List of search expressions
|
||||||
Query query = 2;
|
repeated Filter filters = 3;
|
||||||
}
|
}
|
||||||
|
|
||||||
// Body of search object request message.
|
// Body of search object request message.
|
||||||
Body body = 1;
|
Body body = 1;
|
||||||
|
|
||||||
// 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 = 2;
|
neo.fs.v2.service.RequestMetaHeader meta_header = 2;
|
||||||
|
|
||||||
// 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 = 3;
|
neo.fs.v2.service.RequestVerificationHeader verify_header = 3;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// Search response
|
||||||
message SearchResponse {
|
message SearchResponse {
|
||||||
|
// Response body
|
||||||
message Body {
|
message Body {
|
||||||
// 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 neo.fs.v2.refs.ObjectID id_list = 1;
|
||||||
}
|
}
|
||||||
|
|
||||||
// Body of search object response message.
|
// Body of search object response message.
|
||||||
Body body = 1;
|
Body body = 1;
|
||||||
|
|
||||||
// Carries response meta information. Header data is used only to regulate
|
// Carries response meta information. Header data is used only to regulate
|
||||||
// message transport and does not affect request execution.
|
// message transport and does not affect request execution.
|
||||||
service.ResponseMetaHeader meta_header = 2;
|
neo.fs.v2.service.ResponseMetaHeader meta_header = 2;
|
||||||
|
|
||||||
// Carries response verification information. This header is used to
|
// Carries response verification information. This header is used to
|
||||||
// authenticate the nodes of the message route and check the correctness
|
// authenticate the nodes of the message route and check the correctness
|
||||||
// of transmission.
|
// of transmission.
|
||||||
service.ResponseVerificationHeader verify_header = 3;
|
neo.fs.v2.service.ResponseVerificationHeader verify_header = 3;
|
||||||
}
|
}
|
||||||
|
|
||||||
// Range groups the parameters of object payload range.
|
// Range groups the parameters of object payload range.
|
||||||
|
@ -322,10 +358,12 @@ message Range {
|
||||||
uint64 length = 2;
|
uint64 length = 2;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// Request to get part of object's payload
|
||||||
message GetRangeRequest {
|
message GetRangeRequest {
|
||||||
|
// Request Body
|
||||||
message Body {
|
message Body {
|
||||||
// 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;
|
neo.fs.v2.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;
|
||||||
|
@ -336,14 +374,16 @@ message GetRangeRequest {
|
||||||
|
|
||||||
// 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 = 2;
|
neo.fs.v2.service.RequestMetaHeader meta_header = 2;
|
||||||
|
|
||||||
// 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 = 3;
|
neo.fs.v2.service.RequestVerificationHeader verify_header = 3;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// Get part of object's payload
|
||||||
message GetRangeResponse {
|
message GetRangeResponse {
|
||||||
|
// Response body
|
||||||
message Body {
|
message Body {
|
||||||
// Carries part of the object payload.
|
// Carries part of the object payload.
|
||||||
bytes chunk = 1;
|
bytes chunk = 1;
|
||||||
|
@ -354,18 +394,20 @@ message GetRangeResponse {
|
||||||
|
|
||||||
// Carries response meta information. Header data is used only to regulate
|
// Carries response meta information. Header data is used only to regulate
|
||||||
// message transport and does not affect request execution.
|
// message transport and does not affect request execution.
|
||||||
service.ResponseMetaHeader meta_header = 2;
|
neo.fs.v2.service.ResponseMetaHeader meta_header = 2;
|
||||||
|
|
||||||
// Carries response verification information. This header is used to
|
// Carries response verification information. This header is used to
|
||||||
// authenticate the nodes of the message route and check the correctness
|
// authenticate the nodes of the message route and check the correctness
|
||||||
// of transmission.
|
// of transmission.
|
||||||
service.ResponseVerificationHeader verify_header = 3;
|
neo.fs.v2.service.ResponseVerificationHeader verify_header = 3;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// Get hash of object's payload part
|
||||||
message GetRangeHashRequest {
|
message GetRangeHashRequest {
|
||||||
|
// Request body
|
||||||
message Body {
|
message Body {
|
||||||
// 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;
|
neo.fs.v2.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;
|
||||||
|
@ -373,35 +415,34 @@ message GetRangeHashRequest {
|
||||||
// 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;
|
||||||
}
|
}
|
||||||
|
|
||||||
// Body of get range hash object request message.
|
// Body of get range hash object request message.
|
||||||
Body body = 1;
|
Body body = 1;
|
||||||
|
|
||||||
// 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 = 2;
|
neo.fs.v2.service.RequestMetaHeader meta_header = 2;
|
||||||
|
|
||||||
// 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 = 3;
|
neo.fs.v2.service.RequestVerificationHeader verify_header = 3;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// Get hash of object's payload part
|
||||||
message GetRangeHashResponse {
|
message GetRangeHashResponse {
|
||||||
|
// Response body
|
||||||
message Body {
|
message Body {
|
||||||
// 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;
|
||||||
}
|
}
|
||||||
|
|
||||||
// Body of get range hash object response message.
|
// Body of get range hash object response message.
|
||||||
Body body = 1;
|
Body body = 1;
|
||||||
|
|
||||||
// Carries response meta information. Header data is used only to regulate
|
// Carries response meta information. Header data is used only to regulate
|
||||||
// message transport and does not affect request execution.
|
// message transport and does not affect request execution.
|
||||||
service.ResponseMetaHeader meta_header = 2;
|
neo.fs.v2.service.ResponseMetaHeader meta_header = 2;
|
||||||
|
|
||||||
// Carries response verification information. This header is used to
|
// Carries response verification information. This header is used to
|
||||||
// authenticate the nodes of the message route and check the correctness
|
// authenticate the nodes of the message route and check the correctness
|
||||||
// of transmission.
|
// of transmission.
|
||||||
service.ResponseVerificationHeader verify_header = 3;
|
neo.fs.v2.service.ResponseVerificationHeader verify_header = 3;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -1,9 +1,9 @@
|
||||||
syntax = "proto3";
|
syntax = "proto3";
|
||||||
|
|
||||||
package object;
|
package neo.fs.v2.object;
|
||||||
|
|
||||||
option go_package = "github.com/nspcc-dev/neofs-api-go/object";
|
option go_package = "github.com/nspcc-dev/neofs-api-go/v2/object;object";
|
||||||
option csharp_namespace = "NeoFS.API.Object";
|
option csharp_namespace = "NeoFS.API.v2.Object";
|
||||||
|
|
||||||
import "refs/types.proto";
|
import "refs/types.proto";
|
||||||
import "service/meta.proto";
|
import "service/meta.proto";
|
||||||
|
@ -13,33 +13,45 @@ import "service/verify.proto";
|
||||||
enum ObjectType {
|
enum ObjectType {
|
||||||
// Just a normal object
|
// Just a normal object
|
||||||
REGULAR = 0;
|
REGULAR = 0;
|
||||||
|
|
||||||
// Used internally to identify deleted objects
|
// Used internally to identify deleted objects
|
||||||
TOMBSTONE = 1;
|
TOMBSTONE = 1;
|
||||||
|
|
||||||
// Identifies that the object holds StorageGroup information
|
// Identifies that the object holds StorageGroup information
|
||||||
STORAGE_GROUP = 2;
|
STORAGE_GROUP = 2;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// Object Headers
|
||||||
message Header {
|
message Header {
|
||||||
// Object's container
|
// Object's container
|
||||||
refs.ContainerID container_id = 1;
|
neo.fs.v2.refs.ContainerID container_id = 1;
|
||||||
|
|
||||||
// Object's owner
|
// Object's owner
|
||||||
refs.OwnerID owner_id = 2;
|
neo.fs.v2.refs.OwnerID owner_id = 2;
|
||||||
|
|
||||||
// Epoch when the object was created
|
// Epoch when the object was created
|
||||||
uint64 creation_epoch = 3;
|
uint64 creation_epoch = 3;
|
||||||
|
|
||||||
// Object format version.
|
// Object format version.
|
||||||
// Effectively the version of API library used to create particular object
|
// Effectively the version of API library used to create particular object
|
||||||
service.Version version = 4;
|
neo.fs.v2.service.Version version = 4;
|
||||||
|
|
||||||
// Size of payload in bytes.
|
// Size of payload in bytes.
|
||||||
// 0xFFFFFFFFFFFFFFFF means `payload_length` is unknown
|
// 0xFFFFFFFFFFFFFFFF means `payload_length` is unknown
|
||||||
uint64 payload_length = 5;
|
uint64 payload_length = 5;
|
||||||
|
|
||||||
// Hash of payload bytes
|
// Hash of payload bytes
|
||||||
bytes payload_hash = 6;
|
bytes payload_hash = 6;
|
||||||
|
|
||||||
|
// Special object type
|
||||||
ObjectType object_type = 7;
|
ObjectType object_type = 7;
|
||||||
|
|
||||||
// Homomorphic hash of the object payload.
|
// Homomorphic hash of the object payload.
|
||||||
bytes homomorphic_hash = 8;
|
bytes homomorphic_hash = 8;
|
||||||
|
|
||||||
// Session token, if it was used during Object creation.
|
// Session token, if it was used during Object creation.
|
||||||
// Need it to verify integrity and authenticity out of Request scope.
|
// Need it to verify integrity and authenticity out of Request scope.
|
||||||
service.SessionToken session_token = 9;
|
neo.fs.v2.service.SessionToken session_token = 9;
|
||||||
|
|
||||||
// Attribute groups the user-defined Key-Value pairs attached to the object
|
// Attribute groups the user-defined Key-Value pairs attached to the object
|
||||||
message Attribute {
|
message Attribute {
|
||||||
|
@ -48,6 +60,7 @@ message Header {
|
||||||
// string value of the object attribute
|
// string value of the object attribute
|
||||||
string value = 2;
|
string value = 2;
|
||||||
}
|
}
|
||||||
|
// User-defined object attributes
|
||||||
repeated Attribute attributes = 10;
|
repeated Attribute attributes = 10;
|
||||||
|
|
||||||
// Information about spawning the objects through a payload splitting.
|
// Information about spawning the objects through a payload splitting.
|
||||||
|
@ -55,15 +68,19 @@ message Header {
|
||||||
// Identifier of the origin object.
|
// Identifier of the origin object.
|
||||||
// Parent and children objects must be within the same container.
|
// Parent and children objects must be within the same container.
|
||||||
// Parent object_id is known only to the minor child.
|
// Parent object_id is known only to the minor child.
|
||||||
refs.ObjectID parent = 1;
|
neo.fs.v2.refs.ObjectID parent = 1;
|
||||||
|
|
||||||
// Previous carries identifier of the left split neighbor.
|
// Previous carries identifier of the left split neighbor.
|
||||||
refs.ObjectID previous = 2;
|
neo.fs.v2.refs.ObjectID previous = 2;
|
||||||
|
|
||||||
// `signature` field of the parent object. Used to reconstruct parent.
|
// `signature` field of the parent object. Used to reconstruct parent.
|
||||||
service.Signature parent_signature = 3;
|
neo.fs.v2.service.Signature parent_signature = 3;
|
||||||
|
|
||||||
// `header` field of the parent object. Used to reconstruct parent.
|
// `header` field of the parent object. Used to reconstruct parent.
|
||||||
Header parent_header = 4;
|
Header parent_header = 4;
|
||||||
|
|
||||||
// Children carries list of identifiers of the objects generated by splitting the current.
|
// Children carries list of identifiers of the objects generated by splitting the current.
|
||||||
repeated refs.ObjectID children = 5;
|
repeated neo.fs.v2.refs.ObjectID children = 5;
|
||||||
}
|
}
|
||||||
// Position of the object in the split hierarchy.
|
// Position of the object in the split hierarchy.
|
||||||
Split split = 11;
|
Split split = 11;
|
||||||
|
@ -75,11 +92,14 @@ message Object {
|
||||||
// Object is content-addressed. It means id will change if header or payload
|
// Object is content-addressed. It means id will change if header or payload
|
||||||
// changes. It's calculated as a hash of header field, which contains hash of
|
// changes. It's calculated as a hash of header field, which contains hash of
|
||||||
// object's payload
|
// object's payload
|
||||||
refs.ObjectID object_id = 1;
|
neo.fs.v2.refs.ObjectID object_id = 1;
|
||||||
|
|
||||||
// Signed object_id
|
// Signed object_id
|
||||||
service.Signature signature = 2;
|
neo.fs.v2.service.Signature signature = 2;
|
||||||
|
|
||||||
// Object metadata headers
|
// Object metadata headers
|
||||||
Header header = 3;
|
Header header = 3;
|
||||||
|
|
||||||
// Payload bytes.
|
// Payload bytes.
|
||||||
bytes payload = 4;
|
bytes payload = 4;
|
||||||
}
|
}
|
||||||
|
|
|
@ -1,9 +1,9 @@
|
||||||
syntax = "proto3";
|
syntax = "proto3";
|
||||||
|
|
||||||
package refs;
|
package neo.fs.v2.refs;
|
||||||
|
|
||||||
option go_package = "github.com/nspcc-dev/neofs-api-go/refs";
|
option go_package = "github.com/nspcc-dev/neofs-api-go/v2/refs;refs";
|
||||||
option csharp_namespace = "NeoFS.API.Refs";
|
option csharp_namespace = "NeoFS.API.v2.Refs";
|
||||||
|
|
||||||
// Address of object (container id + object id)
|
// Address of object (container id + object id)
|
||||||
message Address {
|
message Address {
|
||||||
|
|
|
@ -1,17 +1,19 @@
|
||||||
syntax = "proto3";
|
syntax = "proto3";
|
||||||
|
|
||||||
package service;
|
package neo.fs.v2.service;
|
||||||
|
|
||||||
option go_package = "github.com/nspcc-dev/neofs-api-go/service";
|
option go_package = "github.com/nspcc-dev/neofs-api-go/v2/service;service";
|
||||||
option csharp_namespace = "NeoFS.API.Service";
|
option csharp_namespace = "NeoFS.API.v2.Service";
|
||||||
|
|
||||||
import "acl/types.proto";
|
import "acl/types.proto";
|
||||||
import "refs/types.proto";
|
import "refs/types.proto";
|
||||||
import "service/verify.proto";
|
import "service/verify.proto";
|
||||||
|
|
||||||
|
// Extended headers for Request/Response
|
||||||
message XHeader {
|
message XHeader {
|
||||||
// Key of the X-Header.
|
// Key of the X-Header.
|
||||||
string key = 1;
|
string key = 1;
|
||||||
|
|
||||||
// Value of the X-Header.
|
// Value of the X-Header.
|
||||||
string value = 2;
|
string value = 2;
|
||||||
}
|
}
|
||||||
|
@ -20,6 +22,7 @@ message XHeader {
|
||||||
message Version {
|
message Version {
|
||||||
// Major API version.
|
// Major API version.
|
||||||
uint32 major = 1;
|
uint32 major = 1;
|
||||||
|
|
||||||
// Minor API version.
|
// Minor API version.
|
||||||
uint32 minor = 2;
|
uint32 minor = 2;
|
||||||
}
|
}
|
||||||
|
@ -28,50 +31,67 @@ message Version {
|
||||||
message TokenLifetime {
|
message TokenLifetime {
|
||||||
// Expiration Epoch
|
// Expiration Epoch
|
||||||
uint64 exp = 1;
|
uint64 exp = 1;
|
||||||
|
|
||||||
// Not valid before Epoch
|
// Not valid before Epoch
|
||||||
uint64 nbf = 2;
|
uint64 nbf = 2;
|
||||||
|
|
||||||
// Issued at Epoch
|
// Issued at Epoch
|
||||||
uint64 iat = 3;
|
uint64 iat = 3;
|
||||||
}
|
}
|
||||||
|
|
||||||
// NeoFS session token.
|
// NeoFS session token.
|
||||||
message SessionToken {
|
message SessionToken {
|
||||||
|
// Session token body
|
||||||
message Body {
|
message Body {
|
||||||
// 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;
|
neo.fs.v2.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 {
|
||||||
|
// Unknown verb
|
||||||
|
VERB_UNSPECIFIED = 0;
|
||||||
|
|
||||||
// Refers to object.Put RPC call
|
// Refers to object.Put RPC call
|
||||||
OBJECT_PUT = 0;
|
OBJECT_PUT = 1;
|
||||||
|
|
||||||
// Refers to object.Get RPC call
|
// Refers to object.Get RPC call
|
||||||
OBJECT_GET = 1;
|
OBJECT_GET = 2;
|
||||||
|
|
||||||
// Refers to object.Head RPC call
|
// Refers to object.Head RPC call
|
||||||
OBJECT_HEAD = 2;
|
OBJECT_HEAD = 3;
|
||||||
|
|
||||||
// Refers to object.Search RPC call
|
// Refers to object.Search RPC call
|
||||||
OBJECT_SEARCH = 3;
|
OBJECT_SEARCH = 4;
|
||||||
|
|
||||||
// Refers to object.Delete RPC call
|
// Refers to object.Delete RPC call
|
||||||
OBJECT_DELETE = 4;
|
OBJECT_DELETE = 5;
|
||||||
|
|
||||||
// Refers to object.GetRange RPC call
|
// Refers to object.GetRange RPC call
|
||||||
OBJECT_RANGE = 5;
|
OBJECT_RANGE = 6;
|
||||||
|
|
||||||
// Refers to object.GetRangeHash RPC call
|
// Refers to object.GetRangeHash RPC call
|
||||||
OBJECT_RANGEHASH = 6;
|
OBJECT_RANGEHASH = 7;
|
||||||
}
|
}
|
||||||
// Verb is a type of request for which the token is issued
|
// Verb is a type of request for which the token is issued
|
||||||
Verb verb = 3;
|
Verb verb = 3;
|
||||||
|
|
||||||
// Lifetime is a lifetime of the session
|
// Lifetime is a lifetime of the session
|
||||||
TokenLifetime lifetime = 4;
|
TokenLifetime lifetime = 4;
|
||||||
|
|
||||||
// SessionKey is a public key of session key
|
// SessionKey is a public key of session key
|
||||||
bytes session_key = 5;
|
bytes session_key = 5;
|
||||||
|
|
||||||
// Carries context of the session.
|
// Carries context of the session.
|
||||||
oneof context {
|
oneof context {
|
||||||
// object_address represents the object session context.
|
// object_address represents the object session context.
|
||||||
refs.Address object_address = 6;
|
neo.fs.v2.refs.Address object_address = 6;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
// Session Token body
|
// Session Token body
|
||||||
Body token = 1;
|
Body body = 1;
|
||||||
|
|
||||||
// Signature is a signature of session token information
|
// Signature is a signature of session token information
|
||||||
Signature signature = 2;
|
Signature signature = 2;
|
||||||
|
@ -79,16 +99,19 @@ message SessionToken {
|
||||||
|
|
||||||
// BearerToken has information about request ACL rules with limited lifetime
|
// BearerToken has information about request ACL rules with limited lifetime
|
||||||
message BearerToken {
|
message BearerToken {
|
||||||
|
// Bearer Token body
|
||||||
message Body {
|
message Body {
|
||||||
// EACLTable carries table of extended ACL rules
|
// EACLTable carries table of extended ACL rules
|
||||||
acl.EACLTable eacl_table = 1;
|
neo.fs.v2.acl.EACLTable eacl_table = 1;
|
||||||
|
|
||||||
// OwnerID carries identifier of the token owner
|
// OwnerID carries identifier of the token owner
|
||||||
refs.OwnerID owner_id = 2;
|
neo.fs.v2.refs.OwnerID owner_id = 2;
|
||||||
|
|
||||||
// Token expiration and valid time period parameters
|
// Token expiration and valid time period parameters
|
||||||
TokenLifetime lifetime = 3;
|
TokenLifetime lifetime = 3;
|
||||||
}
|
}
|
||||||
// Bearer Token body
|
// Bearer Token body
|
||||||
Body token = 1;
|
Body body = 1;
|
||||||
|
|
||||||
// Signature of BearerToken body
|
// Signature of BearerToken body
|
||||||
Signature signature = 2;
|
Signature signature = 2;
|
||||||
|
@ -98,16 +121,21 @@ message BearerToken {
|
||||||
message RequestMetaHeader {
|
message RequestMetaHeader {
|
||||||
// Client API version.
|
// Client API version.
|
||||||
Version version = 1;
|
Version version = 1;
|
||||||
|
|
||||||
// Client local epoch number. Set to 0 if unknown.
|
// Client local epoch number. Set to 0 if unknown.
|
||||||
uint64 epoch = 2;
|
uint64 epoch = 2;
|
||||||
|
|
||||||
// Maximum number of nodes in the request route.
|
// Maximum number of nodes in the request route.
|
||||||
uint32 ttl = 3;
|
uint32 ttl = 3;
|
||||||
|
|
||||||
// Request X-Headers.
|
// Request X-Headers.
|
||||||
repeated XHeader x_headers = 4;
|
repeated XHeader x_headers = 4;
|
||||||
|
|
||||||
// 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 = 5;
|
SessionToken session_token = 5;
|
||||||
|
|
||||||
// Bearer is a Bearer token of the request
|
// Bearer is a Bearer token of the request
|
||||||
BearerToken bearer = 6;
|
BearerToken bearer_token = 6;
|
||||||
|
|
||||||
// RequestMetaHeader of the origin request.
|
// RequestMetaHeader of the origin request.
|
||||||
RequestMetaHeader origin = 7;
|
RequestMetaHeader origin = 7;
|
||||||
|
@ -117,10 +145,13 @@ message RequestMetaHeader {
|
||||||
message ResponseMetaHeader {
|
message ResponseMetaHeader {
|
||||||
// Server API version.
|
// Server API version.
|
||||||
Version version = 1;
|
Version version = 1;
|
||||||
|
|
||||||
// Server local epoch number.
|
// Server local epoch number.
|
||||||
uint64 epoch = 2;
|
uint64 epoch = 2;
|
||||||
|
|
||||||
// Maximum number of nodes in the response route.
|
// Maximum number of nodes in the response route.
|
||||||
uint32 ttl = 3;
|
uint32 ttl = 3;
|
||||||
|
|
||||||
// Response X-Headers.
|
// Response X-Headers.
|
||||||
repeated XHeader x_headers = 4;
|
repeated XHeader x_headers = 4;
|
||||||
|
|
||||||
|
|
|
@ -1,9 +1,9 @@
|
||||||
syntax = "proto3";
|
syntax = "proto3";
|
||||||
|
|
||||||
package service;
|
package neo.fs.v2.service;
|
||||||
|
|
||||||
option go_package = "github.com/nspcc-dev/neofs-api-go/service";
|
option go_package = "github.com/nspcc-dev/neofs-api-go/v2/service;service";
|
||||||
option csharp_namespace = "NeoFS.API.Service";
|
option csharp_namespace = "NeoFS.API.v2.Service";
|
||||||
|
|
||||||
import "acl/types.proto";
|
import "acl/types.proto";
|
||||||
import "refs/types.proto";
|
import "refs/types.proto";
|
||||||
|
|
|
@ -1,43 +1,45 @@
|
||||||
syntax = "proto3";
|
syntax = "proto3";
|
||||||
|
|
||||||
package session;
|
package neo.fs.v2.session;
|
||||||
|
|
||||||
option go_package = "github.com/nspcc-dev/neofs-api-go/session";
|
option go_package = "github.com/nspcc-dev/neofs-api-go/v2/session;session";
|
||||||
option csharp_namespace = "NeoFS.API.Session";
|
option csharp_namespace = "NeoFS.API.v2.Session";
|
||||||
|
|
||||||
import "refs/types.proto";
|
import "refs/types.proto";
|
||||||
import "service/meta.proto";
|
import "service/meta.proto";
|
||||||
import "service/verify.proto";
|
import "service/verify.proto";
|
||||||
|
|
||||||
service Session {
|
// Create Session record on Node side
|
||||||
|
service SessionService {
|
||||||
// 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 {
|
||||||
|
// Request body
|
||||||
message Body {
|
message Body {
|
||||||
// Carries an identifier of a session initiator.
|
// Carries an identifier of a session initiator.
|
||||||
refs.OwnerID owner_id = 1;
|
neo.fs.v2.refs.OwnerID owner_id = 1;
|
||||||
|
|
||||||
// Carries a lifetime of the session.
|
// Carries a lifetime of the session.
|
||||||
service.TokenLifetime lifetime = 2;
|
neo.fs.v2.service.TokenLifetime lifetime = 2;
|
||||||
}
|
}
|
||||||
|
|
||||||
// Body of create session token request message.
|
// Body of create session token request message.
|
||||||
Body body = 1;
|
Body body = 1;
|
||||||
|
|
||||||
// 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 = 2;
|
neo.fs.v2.service.RequestMetaHeader meta_header = 2;
|
||||||
|
|
||||||
// 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 = 3;
|
neo.fs.v2.service.RequestVerificationHeader verify_header = 3;
|
||||||
}
|
}
|
||||||
|
|
||||||
// CreateResponse carries an information about the opened session.
|
// CreateResponse carries an information about the opened session.
|
||||||
message CreateResponse {
|
message CreateResponse {
|
||||||
|
// Response body
|
||||||
message Body {
|
message Body {
|
||||||
// id carries an identifier of session token.
|
// id carries an identifier of session token.
|
||||||
bytes id = 1;
|
bytes id = 1;
|
||||||
|
@ -51,10 +53,10 @@ message CreateResponse {
|
||||||
|
|
||||||
// Carries response meta information. Header data is used only to regulate
|
// Carries response meta information. Header data is used only to regulate
|
||||||
// message transport and does not affect request execution.
|
// message transport and does not affect request execution.
|
||||||
service.ResponseMetaHeader meta_header = 2;
|
neo.fs.v2.service.ResponseMetaHeader meta_header = 2;
|
||||||
|
|
||||||
// Carries response verification information. This header is used to
|
// Carries response verification information. This header is used to
|
||||||
// authenticate the nodes of the message route and check the correctness
|
// authenticate the nodes of the message route and check the correctness
|
||||||
// of transmission.
|
// of transmission.
|
||||||
service.ResponseVerificationHeader verify_header = 3;
|
neo.fs.v2.service.ResponseVerificationHeader verify_header = 3;
|
||||||
}
|
}
|
||||||
|
|
|
@ -1,9 +1,9 @@
|
||||||
syntax = "proto3";
|
syntax = "proto3";
|
||||||
|
|
||||||
package storagegroup;
|
package neo.fs.v2.storagegroup;
|
||||||
|
|
||||||
option go_package = "github.com/nspcc-dev/neofs-api-go/storagegroup";
|
option go_package = "github.com/nspcc-dev/neofs-api-go/v2/storagegroup;storagegroup";
|
||||||
option csharp_namespace = "NeoFS.API.StorageGroup";
|
option csharp_namespace = "NeoFS.API.v2.StorageGroup";
|
||||||
|
|
||||||
import "refs/types.proto";
|
import "refs/types.proto";
|
||||||
|
|
||||||
|
@ -26,5 +26,5 @@ message StorageGroup {
|
||||||
|
|
||||||
// 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 neo.fs.v2.refs.ObjectID members = 4;
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue