2020-01-30 11:41:24 +00:00
|
|
|
syntax = "proto3";
|
2020-08-05 23:45:39 +00:00
|
|
|
|
2020-08-12 21:43:51 +00:00
|
|
|
package neo.fs.v2.object;
|
2020-08-05 23:45:39 +00:00
|
|
|
|
2020-08-14 18:27:31 +00:00
|
|
|
option go_package = "github.com/nspcc-dev/neofs-api-go/v2/object/grpc;object";
|
2020-08-12 21:43:51 +00:00
|
|
|
option csharp_namespace = "NeoFS.API.v2.Object";
|
2020-01-30 11:41:24 +00:00
|
|
|
|
|
|
|
import "object/types.proto";
|
2020-08-11 08:59:36 +00:00
|
|
|
import "refs/types.proto";
|
2020-08-19 14:00:23 +00:00
|
|
|
import "session/types.proto";
|
2020-01-30 11:41:24 +00:00
|
|
|
|
2020-10-15 18:28:19 +00:00
|
|
|
// `ObjectService` provides API for manipulating objects. Object operations do
|
|
|
|
// not interact with sidechain and are only served by nodes in p2p style.
|
2020-08-12 21:43:51 +00:00
|
|
|
service ObjectService {
|
2020-10-15 18:28:19 +00:00
|
|
|
// Receive full object structure, including Headers and payload. Response uses
|
|
|
|
// gRPC stream. First response message carries object with requested address.
|
|
|
|
// Chunk messages are parts of the object's payload if it is needed. All
|
|
|
|
// messages, except the first one, carry payload chunks. Requested object can
|
|
|
|
// be restored by concatenation of object message payload and all chunks
|
|
|
|
// keeping receiving order.
|
2020-08-11 09:03:50 +00:00
|
|
|
rpc Get(GetRequest) returns (stream GetResponse);
|
|
|
|
|
|
|
|
// Put the object into container. Request uses gRPC stream. First message
|
2020-10-15 18:28:19 +00:00
|
|
|
// SHOULD be of PutHeader type. `ContainerID` and `OwnerID` of an object
|
|
|
|
// SHOULD be set. Session token SHOULD be obtained before `PUT` operation (see
|
|
|
|
// session package). Chunk messages are considered by server as a part of an
|
|
|
|
// object payload. All messages, except first one, SHOULD be payload chunks.
|
|
|
|
// Chunk messages SHOULD be sent in direct order of fragmentation.
|
2020-08-11 09:03:50 +00:00
|
|
|
rpc Put(stream PutRequest) returns (PutResponse);
|
|
|
|
|
2020-10-15 18:28:19 +00:00
|
|
|
// Delete the object from a container. There is no immediate removal
|
|
|
|
// guarantee. Object will be marked for removal and deleted eventually.
|
2020-08-11 09:03:50 +00:00
|
|
|
rpc Delete(DeleteRequest) returns (DeleteResponse);
|
|
|
|
|
2020-10-15 18:28:19 +00:00
|
|
|
// Returns the object Headers without data payload. By default full header is
|
|
|
|
// returned. If `main_only` request field is set, the short header with only
|
|
|
|
// the very minimal information would be returned instead.
|
2020-08-11 09:03:50 +00:00
|
|
|
rpc Head(HeadRequest) returns (HeadResponse);
|
|
|
|
|
2020-10-15 18:28:19 +00:00
|
|
|
// Search objects in container. Search query allows to match by Object
|
|
|
|
// Header's filed values. Please see the corresponding NeoFS Technical
|
|
|
|
// Specification section for more details.
|
2020-08-11 09:03:50 +00:00
|
|
|
rpc Search(SearchRequest) returns (stream SearchResponse);
|
|
|
|
|
2020-10-15 18:28:19 +00:00
|
|
|
// Get byte range of data payload. Range is set as an (offset, length) tuple.
|
|
|
|
// Like in `Get` method, the response uses gRPC stream. Requested range can be
|
|
|
|
// restored by concatenation of all received payload chunks keeping receiving
|
|
|
|
// order.
|
2020-08-11 09:03:50 +00:00
|
|
|
rpc GetRange(GetRangeRequest) returns (stream GetRangeResponse);
|
|
|
|
|
2020-10-15 18:28:19 +00:00
|
|
|
// Returns homomorphic or regular hash of object's payload range after
|
|
|
|
// applying XOR operation with the provided `salt`. Ranges are set of (offset,
|
|
|
|
// length) tuples. Hashes order in response corresponds to ranges order in
|
|
|
|
// request. Note that hash is calculated for XORed data.
|
2020-08-11 09:03:50 +00:00
|
|
|
rpc GetRangeHash(GetRangeHashRequest) returns (GetRangeHashResponse);
|
2020-01-30 11:41:24 +00:00
|
|
|
}
|
|
|
|
|
2020-10-15 18:28:19 +00:00
|
|
|
// GET object request
|
2020-01-30 11:41:24 +00:00
|
|
|
message GetRequest {
|
2020-10-15 18:28:19 +00:00
|
|
|
// GET Object request body
|
2020-08-11 08:59:36 +00:00
|
|
|
message Body {
|
2020-10-15 18:28:19 +00:00
|
|
|
// Address of the requested object
|
2020-08-12 21:43:51 +00:00
|
|
|
neo.fs.v2.refs.Address address = 1;
|
2020-08-11 08:59:36 +00:00
|
|
|
|
2020-10-15 18:28:19 +00:00
|
|
|
// If `raw` flag is set, request will work only with objects that are
|
|
|
|
// physically stored on the peer node
|
2020-08-11 08:59:36 +00:00
|
|
|
bool raw = 2;
|
|
|
|
}
|
|
|
|
// Body of get object request message.
|
|
|
|
Body body = 1;
|
2020-08-05 23:45:39 +00:00
|
|
|
|
2020-10-15 18:28:19 +00:00
|
|
|
// Carries request meta information. Header data is used only to regulate
|
|
|
|
// message transport and does not affect request execution.
|
2020-08-19 14:00:23 +00:00
|
|
|
neo.fs.v2.session.RequestMetaHeader meta_header = 2;
|
2020-08-05 23:45:39 +00:00
|
|
|
|
2020-10-15 18:28:19 +00:00
|
|
|
// Carries request verification information. This header is used to
|
|
|
|
// authenticate the nodes of the message route and check the correctness of
|
|
|
|
// transmission.
|
2020-08-19 14:00:23 +00:00
|
|
|
neo.fs.v2.session.RequestVerificationHeader verify_header = 3;
|
2020-01-30 11:41:24 +00:00
|
|
|
}
|
|
|
|
|
2020-10-15 18:28:19 +00:00
|
|
|
// GET object response
|
2020-01-30 11:41:24 +00:00
|
|
|
message GetResponse {
|
2020-10-15 18:28:19 +00:00
|
|
|
// GET Object Response body
|
2020-08-11 08:59:36 +00:00
|
|
|
message Body {
|
2020-10-15 18:28:19 +00:00
|
|
|
// Initial part of the `Object` structure stream. Technically it's a
|
|
|
|
// set of all `Object` structure's fields except `payload`.
|
2020-08-11 10:54:58 +00:00
|
|
|
message Init {
|
2020-10-15 18:28:19 +00:00
|
|
|
// Object's unique identifier.
|
2020-08-12 21:43:51 +00:00
|
|
|
neo.fs.v2.refs.ObjectID object_id = 1;
|
|
|
|
|
2020-10-15 18:28:19 +00:00
|
|
|
// Signed `ObjectID`
|
2020-08-23 11:42:01 +00:00
|
|
|
neo.fs.v2.refs.Signature signature = 2;
|
2020-08-12 21:43:51 +00:00
|
|
|
|
2020-10-15 18:28:19 +00:00
|
|
|
// Object metadata headers
|
2020-08-11 10:54:58 +00:00
|
|
|
Header header = 3;
|
|
|
|
}
|
2020-10-15 18:28:19 +00:00
|
|
|
// Single message in the response stream.
|
2020-08-11 15:39:34 +00:00
|
|
|
oneof object_part {
|
2020-10-15 18:28:19 +00:00
|
|
|
// Initial part of the object stream
|
2020-08-23 11:42:01 +00:00
|
|
|
Init init = 1;
|
2020-08-12 21:43:51 +00:00
|
|
|
|
2020-10-15 18:28:19 +00:00
|
|
|
// Chunked object payload
|
2020-08-11 08:59:36 +00:00
|
|
|
bytes chunk = 2;
|
2020-12-02 08:33:15 +00:00
|
|
|
|
|
|
|
// Meta information of split hierarchy for object assembly.
|
|
|
|
SplitInfo split_info = 3;
|
2020-08-11 08:59:36 +00:00
|
|
|
}
|
2020-08-11 09:03:50 +00:00
|
|
|
}
|
2020-08-11 08:59:36 +00:00
|
|
|
// Body of get object response message.
|
|
|
|
Body body = 1;
|
|
|
|
|
|
|
|
// Carries response meta information. Header data is used only to regulate
|
|
|
|
// message transport and does not affect request execution.
|
2020-08-19 14:00:23 +00:00
|
|
|
neo.fs.v2.session.ResponseMetaHeader meta_header = 2;
|
2020-08-11 08:59:36 +00:00
|
|
|
|
|
|
|
// Carries response verification information. This header is used to
|
2020-10-15 18:28:19 +00:00
|
|
|
// authenticate the nodes of the message route and check the correctness of
|
|
|
|
// transmission.
|
2020-08-19 14:00:23 +00:00
|
|
|
neo.fs.v2.session.ResponseVerificationHeader verify_header = 3;
|
2020-01-30 11:41:24 +00:00
|
|
|
}
|
|
|
|
|
2020-10-15 18:28:19 +00:00
|
|
|
// PUT object request
|
2020-01-30 11:41:24 +00:00
|
|
|
message PutRequest {
|
2020-10-15 18:28:19 +00:00
|
|
|
// PUT request body
|
2020-08-11 08:59:36 +00:00
|
|
|
message Body {
|
2020-10-15 18:28:19 +00:00
|
|
|
// Newly created object structure parameters. If some optional parameters
|
|
|
|
// are not set, they will be calculated by a peer node.
|
2020-08-11 08:59:36 +00:00
|
|
|
message Init {
|
2020-10-15 18:28:19 +00:00
|
|
|
// ObjectID if available.
|
2020-08-12 21:43:51 +00:00
|
|
|
neo.fs.v2.refs.ObjectID object_id = 1;
|
|
|
|
|
2020-10-15 18:28:19 +00:00
|
|
|
// Object signature if available
|
2020-08-23 11:42:01 +00:00
|
|
|
neo.fs.v2.refs.Signature signature = 2;
|
2020-08-12 21:43:51 +00:00
|
|
|
|
2020-10-15 18:28:19 +00:00
|
|
|
// Object's Header
|
2020-08-11 10:54:58 +00:00
|
|
|
Header header = 3;
|
2020-08-12 21:43:51 +00:00
|
|
|
|
2020-10-15 18:28:19 +00:00
|
|
|
// Number of the object copies to store within the RPC call. By default
|
|
|
|
// object is processed according to the container's placement policy.
|
2020-08-11 10:54:58 +00:00
|
|
|
uint32 copies_number = 4;
|
2020-08-11 08:59:36 +00:00
|
|
|
}
|
2020-10-15 18:28:19 +00:00
|
|
|
// Single message in the request stream.
|
2020-08-11 15:39:34 +00:00
|
|
|
oneof object_part {
|
2020-10-15 18:28:19 +00:00
|
|
|
// Initial part of the object stream
|
2020-08-11 08:59:36 +00:00
|
|
|
Init init = 1;
|
2020-08-12 21:43:51 +00:00
|
|
|
|
2020-10-15 18:28:19 +00:00
|
|
|
// Chunked object payload
|
2020-08-11 08:59:36 +00:00
|
|
|
bytes chunk = 2;
|
|
|
|
}
|
2020-08-11 09:03:50 +00:00
|
|
|
}
|
2020-08-11 08:59:36 +00:00
|
|
|
// Body of put object request message.
|
|
|
|
Body body = 1;
|
|
|
|
|
2020-10-15 18:28:19 +00:00
|
|
|
// Carries request meta information. Header data is used only to regulate
|
|
|
|
// message transport and does not affect request execution.
|
2020-08-19 14:00:23 +00:00
|
|
|
neo.fs.v2.session.RequestMetaHeader meta_header = 2;
|
2020-08-05 23:45:39 +00:00
|
|
|
|
2020-10-15 18:28:19 +00:00
|
|
|
// Carries request verification information. This header is used to
|
|
|
|
// authenticate the nodes of the message route and check the correctness of
|
|
|
|
// transmission.
|
2020-08-19 14:00:23 +00:00
|
|
|
neo.fs.v2.session.RequestVerificationHeader verify_header = 3;
|
2020-01-30 11:41:24 +00:00
|
|
|
}
|
|
|
|
|
2020-10-15 18:28:19 +00:00
|
|
|
// PUT Object response
|
2020-01-30 11:41:24 +00:00
|
|
|
message PutResponse {
|
2020-10-15 18:28:19 +00:00
|
|
|
// PUT Object response body
|
2020-08-11 08:59:36 +00:00
|
|
|
message Body {
|
2020-10-15 18:28:19 +00:00
|
|
|
// Identifier of the saved object
|
2020-08-12 21:43:51 +00:00
|
|
|
neo.fs.v2.refs.ObjectID object_id = 1;
|
2020-08-11 08:59:36 +00:00
|
|
|
}
|
|
|
|
// Body of put object response message.
|
|
|
|
Body body = 1;
|
|
|
|
|
|
|
|
// Carries response meta information. Header data is used only to regulate
|
|
|
|
// message transport and does not affect request execution.
|
2020-08-19 14:00:23 +00:00
|
|
|
neo.fs.v2.session.ResponseMetaHeader meta_header = 2;
|
2020-08-11 08:59:36 +00:00
|
|
|
|
|
|
|
// Carries response verification information. This header is used to
|
2020-10-15 18:28:19 +00:00
|
|
|
// authenticate the nodes of the message route and check the correctness of
|
|
|
|
// transmission.
|
2020-08-19 14:00:23 +00:00
|
|
|
neo.fs.v2.session.ResponseVerificationHeader verify_header = 3;
|
2020-01-30 11:41:24 +00:00
|
|
|
}
|
2020-08-05 23:45:39 +00:00
|
|
|
|
2020-10-15 18:28:19 +00:00
|
|
|
// Object DELETE request
|
2020-01-30 11:41:24 +00:00
|
|
|
message DeleteRequest {
|
2020-10-15 18:28:19 +00:00
|
|
|
// Object DELETE request body
|
2020-08-11 08:59:36 +00:00
|
|
|
message Body {
|
2020-10-15 18:28:19 +00:00
|
|
|
// Address of the object to be deleted
|
2020-08-12 21:43:51 +00:00
|
|
|
neo.fs.v2.refs.Address address = 1;
|
2020-08-18 11:26:53 +00:00
|
|
|
}
|
2020-08-11 08:59:36 +00:00
|
|
|
// Body of delete object request message.
|
|
|
|
Body body = 1;
|
2020-08-05 23:45:39 +00:00
|
|
|
|
2020-10-15 18:28:19 +00:00
|
|
|
// Carries request meta information. Header data is used only to regulate
|
|
|
|
// message transport and does not affect request execution.
|
2020-08-19 14:00:23 +00:00
|
|
|
neo.fs.v2.session.RequestMetaHeader meta_header = 2;
|
2020-08-05 23:45:39 +00:00
|
|
|
|
2020-10-15 18:28:19 +00:00
|
|
|
// Carries request verification information. This header is used to
|
|
|
|
// authenticate the nodes of the message route and check the correctness of
|
|
|
|
// transmission.
|
2020-08-19 14:00:23 +00:00
|
|
|
neo.fs.v2.session.RequestVerificationHeader verify_header = 3;
|
2020-01-30 11:41:24 +00:00
|
|
|
}
|
|
|
|
|
2020-10-15 18:28:19 +00:00
|
|
|
// DeleteResponse body is empty because we cannot guarantee permanent object
|
|
|
|
// removal in distributed system.
|
2020-02-13 14:22:25 +00:00
|
|
|
message DeleteResponse {
|
2020-10-15 18:28:19 +00:00
|
|
|
// Object DELETE Response has an empty body.
|
2020-12-09 08:47:38 +00:00
|
|
|
message Body {
|
|
|
|
// Address of the tombstone created for the deleted object
|
|
|
|
neo.fs.v2.refs.Address tombstone = 1;
|
|
|
|
}
|
2020-08-11 08:59:36 +00:00
|
|
|
|
|
|
|
// Body of delete object response message.
|
|
|
|
Body body = 1;
|
|
|
|
|
|
|
|
// Carries response meta information. Header data is used only to regulate
|
|
|
|
// message transport and does not affect request execution.
|
2020-08-19 14:00:23 +00:00
|
|
|
neo.fs.v2.session.ResponseMetaHeader meta_header = 2;
|
2020-08-11 08:59:36 +00:00
|
|
|
|
|
|
|
// Carries response verification information. This header is used to
|
2020-10-15 18:28:19 +00:00
|
|
|
// authenticate the nodes of the message route and check the correctness of
|
|
|
|
// transmission.
|
2020-08-19 14:00:23 +00:00
|
|
|
neo.fs.v2.session.ResponseVerificationHeader verify_header = 3;
|
2020-02-13 14:22:25 +00:00
|
|
|
}
|
2020-01-30 11:41:24 +00:00
|
|
|
|
2020-10-15 18:28:19 +00:00
|
|
|
// Object HEAD request
|
2020-01-30 11:41:24 +00:00
|
|
|
message HeadRequest {
|
2020-10-15 18:28:19 +00:00
|
|
|
// Object HEAD request body
|
2020-08-11 08:59:36 +00:00
|
|
|
message Body {
|
2020-10-15 18:28:19 +00:00
|
|
|
// Address of the object with the requested Header
|
2020-08-12 21:43:51 +00:00
|
|
|
neo.fs.v2.refs.Address address = 1;
|
|
|
|
|
2020-08-11 10:54:58 +00:00
|
|
|
// Return only minimal header subset
|
2020-08-11 08:59:36 +00:00
|
|
|
bool main_only = 2;
|
2020-08-12 21:43:51 +00:00
|
|
|
|
2020-10-15 18:28:19 +00:00
|
|
|
// If `raw` flag is set, request will work only with objects that are
|
|
|
|
// physically stored on the peer node
|
2020-08-11 08:59:36 +00:00
|
|
|
bool raw = 3;
|
|
|
|
}
|
|
|
|
// Body of head object request message.
|
|
|
|
Body body = 1;
|
2020-08-05 23:45:39 +00:00
|
|
|
|
2020-10-15 18:28:19 +00:00
|
|
|
// Carries request meta information. Header data is used only to regulate
|
|
|
|
// message transport and does not affect request execution.
|
2020-08-19 14:00:23 +00:00
|
|
|
neo.fs.v2.session.RequestMetaHeader meta_header = 2;
|
2020-08-05 23:45:39 +00:00
|
|
|
|
2020-10-15 18:28:19 +00:00
|
|
|
// Carries request verification information. This header is used to
|
|
|
|
// authenticate the nodes of the message route and check the correctness of
|
|
|
|
// transmission.
|
2020-08-19 14:00:23 +00:00
|
|
|
neo.fs.v2.session.RequestVerificationHeader verify_header = 3;
|
2020-01-30 11:41:24 +00:00
|
|
|
}
|
2020-08-05 23:45:39 +00:00
|
|
|
|
2020-10-15 18:28:19 +00:00
|
|
|
// Tuple of full object header and signature of `ObjectID`. \
|
|
|
|
// Signed `ObjectID` is present to verify full header's authenticity through the
|
|
|
|
// following steps:
|
|
|
|
//
|
|
|
|
// 1. Calculate `SHA-256` of marshalled `Header` structure
|
|
|
|
// 2. Check if the resulting hash matched `ObjectID`
|
|
|
|
// 3. Check if `ObjectID` signature in `signature` field is correct
|
2020-09-04 08:09:22 +00:00
|
|
|
message HeaderWithSignature {
|
|
|
|
// Full object header
|
2020-10-19 08:27:05 +00:00
|
|
|
Header header = 1 [json_name = "header"];
|
2020-09-04 08:09:22 +00:00
|
|
|
|
2020-10-15 18:28:19 +00:00
|
|
|
// Signed `ObjectID` to verify full header's authenticity
|
2020-10-19 08:27:05 +00:00
|
|
|
neo.fs.v2.refs.Signature signature = 2 [json_name = "signature"];
|
2020-09-04 08:09:22 +00:00
|
|
|
}
|
|
|
|
|
2020-10-15 18:28:19 +00:00
|
|
|
// Object HEAD response
|
2020-01-30 11:41:24 +00:00
|
|
|
message HeadResponse {
|
2020-10-15 18:28:19 +00:00
|
|
|
// Object HEAD response body
|
2020-08-11 08:59:36 +00:00
|
|
|
message Body {
|
2020-12-07 12:02:20 +00:00
|
|
|
// Requested object header, it's part or meta information about split
|
|
|
|
// object.
|
2020-08-11 15:39:34 +00:00
|
|
|
oneof head{
|
2020-10-15 18:28:19 +00:00
|
|
|
// Full object's `Header` with `ObjectID` signature
|
2020-09-04 12:50:18 +00:00
|
|
|
HeaderWithSignature header = 1;
|
2020-08-12 21:43:51 +00:00
|
|
|
|
|
|
|
// Short object header
|
2020-08-11 10:54:58 +00:00
|
|
|
ShortHeader short_header = 2;
|
2020-12-07 12:02:20 +00:00
|
|
|
|
|
|
|
// Meta information of split hierarchy.
|
|
|
|
SplitInfo split_info = 3;
|
2020-08-11 10:54:58 +00:00
|
|
|
}
|
2020-08-11 08:59:36 +00:00
|
|
|
}
|
|
|
|
// Body of head object response message.
|
|
|
|
Body body = 1;
|
|
|
|
|
|
|
|
// Carries response meta information. Header data is used only to regulate
|
|
|
|
// message transport and does not affect request execution.
|
2020-08-19 14:00:23 +00:00
|
|
|
neo.fs.v2.session.ResponseMetaHeader meta_header = 2;
|
2020-08-11 08:59:36 +00:00
|
|
|
|
|
|
|
// Carries response verification information. This header is used to
|
2020-10-15 18:28:19 +00:00
|
|
|
// authenticate the nodes of the message route and check the correctness of
|
|
|
|
// transmission.
|
2020-08-19 14:00:23 +00:00
|
|
|
neo.fs.v2.session.ResponseVerificationHeader verify_header = 3;
|
2020-01-30 11:41:24 +00:00
|
|
|
}
|
|
|
|
|
2020-10-15 18:28:19 +00:00
|
|
|
// Object Search request
|
2020-01-30 11:41:24 +00:00
|
|
|
message SearchRequest {
|
2020-10-15 18:28:19 +00:00
|
|
|
// Object Search request body
|
2020-08-11 08:59:36 +00:00
|
|
|
message Body {
|
2020-10-15 18:28:19 +00:00
|
|
|
// Container identifier were to search
|
2020-08-12 21:43:51 +00:00
|
|
|
neo.fs.v2.refs.ContainerID container_id = 1;
|
|
|
|
|
|
|
|
// Version of the Query Language used
|
|
|
|
uint32 version = 2;
|
2020-10-21 16:41:24 +00:00
|
|
|
// Filter structure checks if object header field or attribute content
|
|
|
|
// matches a value.
|
|
|
|
//
|
2020-10-23 12:38:31 +00:00
|
|
|
// By default `key` field refers to the corresponding object's `Attribute`.
|
2020-10-21 16:41:24 +00:00
|
|
|
// Some Object's header fields can also be accessed by adding `$Object:`
|
|
|
|
// prefix to the name. Here is the list of fields available via this prefix:
|
|
|
|
//
|
|
|
|
// * $Object:version \
|
|
|
|
// version
|
2020-11-25 10:31:02 +00:00
|
|
|
// * $Object:objectID \
|
2020-11-09 13:56:58 +00:00
|
|
|
// object_id
|
2020-10-21 16:41:24 +00:00
|
|
|
// * $Object:containerID \
|
|
|
|
// container_id
|
|
|
|
// * $Object:ownerID \
|
|
|
|
// owner_id
|
|
|
|
// * $Object:creationEpoch \
|
|
|
|
// creation_epoch
|
|
|
|
// * $Object:payloadLength \
|
|
|
|
// payload_length
|
|
|
|
// * $Object:payloadHash \
|
|
|
|
// payload_hash
|
|
|
|
// * $Object:objectType \
|
|
|
|
// object_type
|
|
|
|
// * $Object:homomorphicHash \
|
|
|
|
// homomorphic_hash
|
2020-10-23 14:50:04 +00:00
|
|
|
// * $Object:split.parent \
|
|
|
|
// object_id of parent
|
2020-11-25 13:36:58 +00:00
|
|
|
// * $Object:split.splitID \
|
2020-12-08 15:08:32 +00:00
|
|
|
// 16 byte UUIDv4 used to identify the split object hierarchy parts
|
2020-10-21 16:41:24 +00:00
|
|
|
//
|
|
|
|
// There are some well-known filter aliases to match objects by certain
|
|
|
|
// properties:
|
|
|
|
//
|
|
|
|
// * $Object:ROOT \
|
2020-11-09 10:03:49 +00:00
|
|
|
// Returns only `REGULAR` type objects that are not split or are the top
|
|
|
|
// level root objects in a split hierarchy. This includes objects not
|
|
|
|
// present physically, like large objects split into smaller objects
|
|
|
|
// without separate top-level root object. Other type objects like
|
|
|
|
// StorageGroups and Tombstones will not be shown. This filter may be
|
|
|
|
// useful for listing objects like `ls` command of some virtual file
|
|
|
|
// system. This filter is activated if the `key` exists, disregarding the
|
|
|
|
// value and matcher type.
|
|
|
|
// * $Object:PHY \
|
|
|
|
// Returns only objects physically stored in the system. This filter is
|
|
|
|
// activated if the `key` exists, disregarding the value and matcher type.
|
2021-02-02 09:03:40 +00:00
|
|
|
//
|
|
|
|
// Note: using filters with a key with prefix `$Object:` and match type
|
|
|
|
// `NOT_PRESENT `is not recommended since this is not a cross-version approach.
|
|
|
|
// Behavior when processing this kind of filters is undefined.
|
2020-08-12 21:43:51 +00:00
|
|
|
message Filter {
|
|
|
|
// Match type to use
|
|
|
|
MatchType match_type = 1;
|
2020-08-11 08:59:36 +00:00
|
|
|
|
2020-10-21 16:41:24 +00:00
|
|
|
// Attribute or Header fields to match
|
2020-10-23 12:38:31 +00:00
|
|
|
string key = 2;
|
2020-08-05 18:21:26 +00:00
|
|
|
|
2020-10-21 16:41:24 +00:00
|
|
|
// Value to match
|
2020-08-12 21:43:51 +00:00
|
|
|
string value = 3;
|
|
|
|
}
|
|
|
|
// List of search expressions
|
|
|
|
repeated Filter filters = 3;
|
2020-08-11 09:03:50 +00:00
|
|
|
}
|
2020-08-11 08:59:36 +00:00
|
|
|
// Body of search object request message.
|
|
|
|
Body body = 1;
|
2020-08-05 18:21:26 +00:00
|
|
|
|
2020-10-15 18:28:19 +00:00
|
|
|
// Carries request meta information. Header data is used only to regulate
|
|
|
|
// message transport and does not affect request execution.
|
2020-08-19 14:00:23 +00:00
|
|
|
neo.fs.v2.session.RequestMetaHeader meta_header = 2;
|
2020-08-05 23:45:39 +00:00
|
|
|
|
2020-10-15 18:28:19 +00:00
|
|
|
// Carries request verification information. This header is used to
|
|
|
|
// authenticate the nodes of the message route and check the correctness of
|
|
|
|
// transmission.
|
2020-08-19 14:00:23 +00:00
|
|
|
neo.fs.v2.session.RequestVerificationHeader verify_header = 3;
|
2020-01-30 11:41:24 +00:00
|
|
|
}
|
|
|
|
|
2020-08-12 21:43:51 +00:00
|
|
|
// Search response
|
2020-01-30 11:41:24 +00:00
|
|
|
message SearchResponse {
|
2020-10-15 18:28:19 +00:00
|
|
|
// Object Search response body
|
2020-08-11 08:59:36 +00:00
|
|
|
message Body {
|
2020-10-15 18:28:19 +00:00
|
|
|
// List of `ObjectID`s that match the search query
|
2020-08-12 21:43:51 +00:00
|
|
|
repeated neo.fs.v2.refs.ObjectID id_list = 1;
|
2020-08-11 08:59:36 +00:00
|
|
|
}
|
|
|
|
// Body of search object response message.
|
|
|
|
Body body = 1;
|
|
|
|
|
|
|
|
// Carries response meta information. Header data is used only to regulate
|
|
|
|
// message transport and does not affect request execution.
|
2020-08-19 14:00:23 +00:00
|
|
|
neo.fs.v2.session.ResponseMetaHeader meta_header = 2;
|
2020-08-11 08:59:36 +00:00
|
|
|
|
|
|
|
// Carries response verification information. This header is used to
|
2020-10-15 18:28:19 +00:00
|
|
|
// authenticate the nodes of the message route and check the correctness of
|
|
|
|
// transmission.
|
2020-08-19 14:00:23 +00:00
|
|
|
neo.fs.v2.session.ResponseVerificationHeader verify_header = 3;
|
2020-01-30 11:41:24 +00:00
|
|
|
}
|
|
|
|
|
2020-10-15 18:28:19 +00:00
|
|
|
// Object payload range.Ranges of zero length SHOULD be considered as invalid.
|
2020-08-04 08:43:34 +00:00
|
|
|
message Range {
|
2020-10-15 18:28:19 +00:00
|
|
|
// Offset of the range from the object payload start
|
2020-08-11 09:03:50 +00:00
|
|
|
uint64 offset = 1;
|
2020-08-05 23:45:39 +00:00
|
|
|
|
2020-10-15 18:28:19 +00:00
|
|
|
// Length in bytes of the object payload range
|
2020-08-11 09:03:50 +00:00
|
|
|
uint64 length = 2;
|
2020-08-04 08:43:34 +00:00
|
|
|
}
|
|
|
|
|
2020-10-15 18:28:19 +00:00
|
|
|
// Request part of object's payload
|
2020-01-30 11:41:24 +00:00
|
|
|
message GetRangeRequest {
|
2020-10-15 18:28:19 +00:00
|
|
|
// Byte range of object's payload request body
|
2020-08-11 08:59:36 +00:00
|
|
|
message Body {
|
2020-10-15 18:28:19 +00:00
|
|
|
// Address of the object containing the requested payload range
|
2020-08-12 21:43:51 +00:00
|
|
|
neo.fs.v2.refs.Address address = 1;
|
2020-08-05 23:45:39 +00:00
|
|
|
|
2020-10-15 18:28:19 +00:00
|
|
|
// Requested payload range
|
2020-08-11 08:59:36 +00:00
|
|
|
Range range = 2;
|
2020-12-07 13:15:01 +00:00
|
|
|
|
|
|
|
// If `raw` flag is set, request will work only with objects that are
|
|
|
|
// physically stored on the peer node.
|
|
|
|
bool raw = 3;
|
2020-08-11 08:59:36 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
// Body of get range object request message.
|
|
|
|
Body body = 1;
|
2020-08-05 23:45:39 +00:00
|
|
|
|
2020-10-15 18:28:19 +00:00
|
|
|
// Carries request meta information. Header data is used only to regulate
|
|
|
|
// message transport and does not affect request execution.
|
2020-08-19 14:00:23 +00:00
|
|
|
neo.fs.v2.session.RequestMetaHeader meta_header = 2;
|
2020-08-05 23:45:39 +00:00
|
|
|
|
2020-10-15 18:28:19 +00:00
|
|
|
// Carries request verification information. This header is used to
|
|
|
|
// authenticate the nodes of the message route and check the correctness of
|
|
|
|
// transmission.
|
2020-08-19 14:00:23 +00:00
|
|
|
neo.fs.v2.session.RequestVerificationHeader verify_header = 3;
|
2020-01-30 11:41:24 +00:00
|
|
|
}
|
|
|
|
|
2020-08-12 21:43:51 +00:00
|
|
|
// Get part of object's payload
|
2020-01-30 11:41:24 +00:00
|
|
|
message GetRangeResponse {
|
2020-10-15 18:28:19 +00:00
|
|
|
// Get Range response body uses streams to transfer the response. Because
|
|
|
|
// object payload considered a byte sequence, there is no need to have some
|
|
|
|
// initial preamble message. The requested byte range is sent as a series
|
|
|
|
// chunks.
|
2020-08-11 08:59:36 +00:00
|
|
|
message Body {
|
2020-12-07 12:06:44 +00:00
|
|
|
// Requested object range or meta information about split object.
|
|
|
|
oneof range_part{
|
|
|
|
// Chunked object payload's range.
|
|
|
|
bytes chunk = 1;
|
|
|
|
|
|
|
|
// Meta information of split hierarchy.
|
|
|
|
SplitInfo split_info = 2;
|
|
|
|
}
|
2020-08-11 08:59:36 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
// Body of get range object response message.
|
|
|
|
Body body = 1;
|
|
|
|
|
|
|
|
// Carries response meta information. Header data is used only to regulate
|
|
|
|
// message transport and does not affect request execution.
|
2020-08-19 14:00:23 +00:00
|
|
|
neo.fs.v2.session.ResponseMetaHeader meta_header = 2;
|
2020-08-11 08:59:36 +00:00
|
|
|
|
|
|
|
// Carries response verification information. This header is used to
|
2020-10-15 18:28:19 +00:00
|
|
|
// authenticate the nodes of the message route and check the correctness of
|
|
|
|
// transmission.
|
2020-08-19 14:00:23 +00:00
|
|
|
neo.fs.v2.session.ResponseVerificationHeader verify_header = 3;
|
2020-01-30 11:41:24 +00:00
|
|
|
}
|
|
|
|
|
2020-08-12 21:43:51 +00:00
|
|
|
// Get hash of object's payload part
|
2020-01-30 11:41:24 +00:00
|
|
|
message GetRangeHashRequest {
|
2020-10-15 18:28:19 +00:00
|
|
|
// Get hash of object's payload part request body.
|
2020-08-11 08:59:36 +00:00
|
|
|
message Body {
|
2020-10-15 18:28:19 +00:00
|
|
|
// Address of the object that containing the requested payload range
|
2020-08-12 21:43:51 +00:00
|
|
|
neo.fs.v2.refs.Address address = 1;
|
2020-08-05 23:45:39 +00:00
|
|
|
|
2020-10-15 18:28:19 +00:00
|
|
|
// List of object's payload ranges to calculate homomorphic hash
|
2020-08-11 08:59:36 +00:00
|
|
|
repeated Range ranges = 2;
|
2020-08-05 23:45:39 +00:00
|
|
|
|
2020-10-15 18:28:19 +00:00
|
|
|
// Binary salt to XOR object's payload ranges before hash calculation
|
2020-08-11 08:59:36 +00:00
|
|
|
bytes salt = 3;
|
2020-08-18 15:26:51 +00:00
|
|
|
|
|
|
|
// Checksum algorithm type
|
|
|
|
neo.fs.v2.refs.ChecksumType type = 4;
|
2020-08-11 08:59:36 +00:00
|
|
|
}
|
|
|
|
// Body of get range hash object request message.
|
|
|
|
Body body = 1;
|
2020-08-05 23:45:39 +00:00
|
|
|
|
2020-10-15 18:28:19 +00:00
|
|
|
// Carries request meta information. Header data is used only to regulate
|
|
|
|
// message transport and does not affect request execution.
|
2020-08-19 14:00:23 +00:00
|
|
|
neo.fs.v2.session.RequestMetaHeader meta_header = 2;
|
2020-08-05 23:45:39 +00:00
|
|
|
|
2020-10-15 18:28:19 +00:00
|
|
|
// Carries request verification information. This header is used to
|
|
|
|
// authenticate the nodes of the message route and check the correctness of
|
|
|
|
// transmission.
|
2020-08-19 14:00:23 +00:00
|
|
|
neo.fs.v2.session.RequestVerificationHeader verify_header = 3;
|
2020-01-30 11:41:24 +00:00
|
|
|
}
|
|
|
|
|
2020-08-12 21:43:51 +00:00
|
|
|
// Get hash of object's payload part
|
2020-01-30 11:41:24 +00:00
|
|
|
message GetRangeHashResponse {
|
2020-10-15 18:28:19 +00:00
|
|
|
// Get hash of object's payload part response body.
|
2020-08-11 08:59:36 +00:00
|
|
|
message Body {
|
2020-08-18 15:26:51 +00:00
|
|
|
// Checksum algorithm type
|
|
|
|
neo.fs.v2.refs.ChecksumType type = 1;
|
|
|
|
|
2020-10-15 18:28:19 +00:00
|
|
|
// List of range hashes in a binary format
|
2020-08-18 15:26:51 +00:00
|
|
|
repeated bytes hash_list = 2;
|
2020-08-11 08:59:36 +00:00
|
|
|
}
|
|
|
|
// Body of get range hash object response message.
|
|
|
|
Body body = 1;
|
|
|
|
|
|
|
|
// Carries response meta information. Header data is used only to regulate
|
|
|
|
// message transport and does not affect request execution.
|
2020-08-19 14:00:23 +00:00
|
|
|
neo.fs.v2.session.ResponseMetaHeader meta_header = 2;
|
2020-08-11 08:59:36 +00:00
|
|
|
|
|
|
|
// Carries response verification information. This header is used to
|
2020-10-15 18:28:19 +00:00
|
|
|
// authenticate the nodes of the message route and check the correctness of
|
|
|
|
// transmission.
|
2020-08-19 14:00:23 +00:00
|
|
|
neo.fs.v2.session.ResponseVerificationHeader verify_header = 3;
|
2020-01-30 11:41:24 +00:00
|
|
|
}
|