2020-01-30 11:41:24 +00:00
|
|
|
syntax = "proto3";
|
2020-08-05 22:20:53 +00:00
|
|
|
|
2020-08-12 21:43:51 +00:00
|
|
|
package neo.fs.v2.container;
|
2020-08-05 22:20:53 +00:00
|
|
|
|
2020-08-14 18:27:31 +00:00
|
|
|
option go_package = "github.com/nspcc-dev/neofs-api-go/v2/container/grpc;container";
|
2020-08-12 21:43:51 +00:00
|
|
|
option csharp_namespace = "NeoFS.API.v2.Container";
|
2020-01-30 11:41:24 +00:00
|
|
|
|
2020-07-31 14:18:50 +00:00
|
|
|
import "acl/types.proto";
|
2020-01-30 11:41:24 +00:00
|
|
|
import "container/types.proto";
|
2020-08-05 15:07:56 +00:00
|
|
|
import "refs/types.proto";
|
2020-08-18 11:13:16 +00:00
|
|
|
import "service/types.proto";
|
2020-01-30 11:41:24 +00:00
|
|
|
|
2020-08-12 21:43:51 +00:00
|
|
|
// ContainerService provides API to access container smart-contract in morph chain
|
2020-07-31 14:47:57 +00:00
|
|
|
// via NeoFS node.
|
2020-08-12 21:43:51 +00:00
|
|
|
service ContainerService {
|
2020-08-11 09:03:50 +00:00
|
|
|
// Put invokes 'Put' method in container smart-contract and returns
|
|
|
|
// response immediately. After new block in morph chain, request is verified
|
|
|
|
// by inner ring nodes. After one more block in morph chain, container
|
|
|
|
// added into smart-contract storage.
|
|
|
|
rpc Put(PutRequest) returns (PutResponse);
|
|
|
|
|
|
|
|
// Delete invokes 'Delete' method in container smart-contract and returns
|
|
|
|
// response immediately. After new block in morph chain, request is verified
|
|
|
|
// by inner ring nodes. After one more block in morph chain, container
|
|
|
|
// removed from smart-contract storage.
|
|
|
|
rpc Delete(DeleteRequest) returns (DeleteResponse);
|
|
|
|
|
|
|
|
// Get returns container from container smart-contract storage.
|
|
|
|
rpc Get(GetRequest) returns (GetResponse);
|
|
|
|
|
|
|
|
// List returns all owner's containers from container smart-contract
|
|
|
|
// storage.
|
|
|
|
rpc List(ListRequest) returns (ListResponse);
|
|
|
|
|
|
|
|
// SetExtendedACL invokes 'SetEACL' method in container smart-contract and
|
|
|
|
// returns response immediately. After new block in morph chain,
|
|
|
|
// Extended ACL added into smart-contract storage.
|
|
|
|
rpc SetExtendedACL(SetExtendedACLRequest) returns (SetExtendedACLResponse);
|
|
|
|
|
|
|
|
// GetExtendedACL returns Extended ACL table and signature from container
|
|
|
|
// smart-contract storage.
|
|
|
|
rpc GetExtendedACL(GetExtendedACLRequest) returns (GetExtendedACLResponse);
|
2020-01-30 11:41:24 +00:00
|
|
|
}
|
|
|
|
|
2020-08-12 21:43:51 +00:00
|
|
|
// New NeoFS Container creation request
|
2020-01-30 11:41:24 +00:00
|
|
|
message PutRequest {
|
2020-08-12 21:43:51 +00:00
|
|
|
// Request body
|
2020-08-11 08:47:04 +00:00
|
|
|
message Body {
|
|
|
|
// Container to create in NeoFS.
|
|
|
|
container.Container container = 1;
|
2020-08-05 22:20:53 +00:00
|
|
|
|
2020-08-11 08:47:04 +00:00
|
|
|
// Public Key of container owner. It can be public key of the owner
|
|
|
|
// or it can be public key that bound in neofs.id smart-contract.
|
|
|
|
bytes public_key = 2;
|
2020-08-05 22:20:53 +00:00
|
|
|
|
2020-08-11 08:47:04 +00:00
|
|
|
// Signature of stable-marshalled container according to RFC-6979.
|
|
|
|
bytes signature = 3;
|
|
|
|
}
|
|
|
|
// Body of container put request message.
|
|
|
|
Body body = 1;
|
|
|
|
|
|
|
|
// Carries request meta information. Header data is used only to regulate
|
|
|
|
// message transport and does not affect request execution.
|
2020-08-12 21:43:51 +00:00
|
|
|
neo.fs.v2.service.RequestMetaHeader meta_header = 2;
|
2020-08-11 08:47:04 +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-12 21:43:51 +00:00
|
|
|
neo.fs.v2.service.RequestVerificationHeader verify_header = 3;
|
2020-01-30 11:41:24 +00:00
|
|
|
}
|
|
|
|
|
2020-08-12 21:43:51 +00:00
|
|
|
// New NeoFS Container creation response
|
2020-01-30 11:41:24 +00:00
|
|
|
message PutResponse {
|
2020-08-12 21:43:51 +00:00
|
|
|
// Response body
|
2020-08-11 08:47:04 +00:00
|
|
|
message Body {
|
|
|
|
// container_id carries identifier of the new container.
|
2020-08-12 21:43:51 +00:00
|
|
|
neo.fs.v2.refs.ContainerID container_id = 1;
|
2020-08-11 08:47:04 +00:00
|
|
|
}
|
|
|
|
// Body of container put 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-12 21:43:51 +00:00
|
|
|
neo.fs.v2.service.ResponseMetaHeader meta_header = 2;
|
2020-08-11 08:47:04 +00:00
|
|
|
|
|
|
|
// Carries response verification information. This header is used to
|
|
|
|
// authenticate the nodes of the message route and check the correctness
|
|
|
|
// of transmission.
|
2020-08-12 21:43:51 +00:00
|
|
|
neo.fs.v2.service.ResponseVerificationHeader verify_header = 3;
|
2020-01-30 11:41:24 +00:00
|
|
|
}
|
|
|
|
|
2020-08-12 21:43:51 +00:00
|
|
|
// Container removal request
|
2020-01-30 11:41:24 +00:00
|
|
|
message DeleteRequest {
|
2020-08-12 21:43:51 +00:00
|
|
|
// Request body
|
2020-08-11 08:47:04 +00:00
|
|
|
message Body {
|
|
|
|
// container_id carries identifier of the container to delete
|
|
|
|
// from NeoFS.
|
2020-08-12 21:43:51 +00:00
|
|
|
neo.fs.v2.refs.ContainerID container_id = 1;
|
2020-08-11 08:47:04 +00:00
|
|
|
|
|
|
|
// Signature of container id according to RFC-6979.
|
|
|
|
bytes signature = 2;
|
|
|
|
}
|
|
|
|
// Body of container delete request message.
|
|
|
|
Body body = 1;
|
2020-08-05 22:20:53 +00:00
|
|
|
|
2020-08-11 08:47:04 +00:00
|
|
|
// Carries request meta information. Header data is used only to regulate
|
|
|
|
// message transport and does not affect request execution.
|
2020-08-12 21:43:51 +00:00
|
|
|
neo.fs.v2.service.RequestMetaHeader meta_header = 2;
|
2020-08-11 08:47:04 +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-12 21:43:51 +00:00
|
|
|
neo.fs.v2.service.RequestVerificationHeader verify_header = 3;
|
2020-01-30 11:41:24 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
// DeleteResponse is empty because delete operation is asynchronous and done
|
|
|
|
// via consensus in inner ring nodes
|
2020-08-11 08:47:04 +00:00
|
|
|
message DeleteResponse {
|
2020-08-12 21:43:51 +00:00
|
|
|
// Response body
|
2020-08-11 08:47:04 +00:00
|
|
|
message Body {}
|
|
|
|
// Body of container delete 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-12 21:43:51 +00:00
|
|
|
neo.fs.v2.service.ResponseMetaHeader meta_header = 2;
|
2020-08-11 08:47:04 +00:00
|
|
|
|
|
|
|
// Carries response verification information. This header is used to
|
|
|
|
// authenticate the nodes of the message route and check the correctness
|
|
|
|
// of transmission.
|
2020-08-12 21:43:51 +00:00
|
|
|
neo.fs.v2.service.ResponseVerificationHeader verify_header = 3;
|
2020-08-11 08:47:04 +00:00
|
|
|
}
|
2020-01-30 11:41:24 +00:00
|
|
|
|
2020-08-12 21:43:51 +00:00
|
|
|
// Get container structure
|
2020-01-30 11:41:24 +00:00
|
|
|
message GetRequest {
|
2020-08-12 21:43:51 +00:00
|
|
|
// Request body
|
2020-08-11 08:47:04 +00:00
|
|
|
message Body {
|
|
|
|
// container_id carries identifier of the container to get.
|
2020-08-12 21:43:51 +00:00
|
|
|
neo.fs.v2.refs.ContainerID container_id = 1;
|
2020-08-11 08:47:04 +00:00
|
|
|
}
|
|
|
|
// Body of container get request message.
|
|
|
|
Body body = 1;
|
|
|
|
|
|
|
|
// Carries request meta information. Header data is used only to regulate
|
|
|
|
// message transport and does not affect request execution.
|
2020-08-12 21:43:51 +00:00
|
|
|
neo.fs.v2.service.RequestMetaHeader meta_header = 2;
|
2020-08-11 08:47:04 +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-12 21:43:51 +00:00
|
|
|
neo.fs.v2.service.RequestVerificationHeader verify_header = 3;
|
2020-01-30 11:41:24 +00:00
|
|
|
}
|
|
|
|
|
2020-08-12 21:43:51 +00:00
|
|
|
// Get container structure
|
2020-01-30 11:41:24 +00:00
|
|
|
message GetResponse {
|
2020-08-12 21:43:51 +00:00
|
|
|
// Response body
|
2020-08-11 08:47:04 +00:00
|
|
|
message Body {
|
|
|
|
// Container that has been requested.
|
2020-08-12 21:43:51 +00:00
|
|
|
Container container = 1;
|
2020-08-11 08:47:04 +00:00
|
|
|
}
|
|
|
|
// Body of container get 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-12 21:43:51 +00:00
|
|
|
neo.fs.v2.service.ResponseMetaHeader meta_header = 2;
|
2020-08-11 08:47:04 +00:00
|
|
|
|
|
|
|
// Carries response verification information. This header is used to
|
|
|
|
// authenticate the nodes of the message route and check the correctness
|
|
|
|
// of transmission.
|
2020-08-12 21:43:51 +00:00
|
|
|
neo.fs.v2.service.ResponseVerificationHeader verify_header = 3;
|
2020-01-30 11:41:24 +00:00
|
|
|
}
|
|
|
|
|
2020-08-12 21:43:51 +00:00
|
|
|
// List containers
|
2020-01-30 11:41:24 +00:00
|
|
|
message ListRequest {
|
2020-08-12 21:43:51 +00:00
|
|
|
// Request body
|
2020-08-11 08:47:04 +00:00
|
|
|
message Body {
|
|
|
|
// owner_id carries identifier of the container owner.
|
2020-08-12 21:43:51 +00:00
|
|
|
neo.fs.v2.refs.OwnerID owner_id = 1;
|
2020-08-11 08:47:04 +00:00
|
|
|
}
|
|
|
|
// Body of list containers request message.
|
|
|
|
Body body = 1;
|
|
|
|
|
|
|
|
// Carries request meta information. Header data is used only to regulate
|
|
|
|
// message transport and does not affect request execution.
|
2020-08-12 21:43:51 +00:00
|
|
|
neo.fs.v2.service.RequestMetaHeader meta_header = 2;
|
2020-08-11 08:47:04 +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-12 21:43:51 +00:00
|
|
|
neo.fs.v2.service.RequestVerificationHeader verify_header = 3;
|
2020-01-30 11:41:24 +00:00
|
|
|
}
|
|
|
|
|
2020-08-12 21:43:51 +00:00
|
|
|
// List containers
|
2020-01-30 11:41:24 +00:00
|
|
|
message ListResponse {
|
2020-08-12 21:43:51 +00:00
|
|
|
// Response body
|
2020-08-11 08:47:04 +00:00
|
|
|
message Body {
|
|
|
|
// ContainerIDs carries list of identifiers of the containers that belong to the owner.
|
|
|
|
repeated refs.ContainerID container_ids = 1;
|
|
|
|
}
|
|
|
|
|
|
|
|
// Body of list containers 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-12 21:43:51 +00:00
|
|
|
neo.fs.v2.service.ResponseMetaHeader meta_header = 2;
|
2020-08-11 08:47:04 +00:00
|
|
|
|
|
|
|
// Carries response verification information. This header is used to
|
|
|
|
// authenticate the nodes of the message route and check the correctness
|
|
|
|
// of transmission.
|
2020-08-12 21:43:51 +00:00
|
|
|
neo.fs.v2.service.ResponseVerificationHeader verify_header = 3;
|
2020-01-30 11:41:24 +00:00
|
|
|
}
|
2020-06-18 07:40:35 +00:00
|
|
|
|
2020-08-12 21:43:51 +00:00
|
|
|
// Set Extended ACL
|
2020-06-18 07:40:35 +00:00
|
|
|
message SetExtendedACLRequest {
|
2020-08-12 21:43:51 +00:00
|
|
|
// Request body
|
2020-08-11 08:47:04 +00:00
|
|
|
message Body {
|
|
|
|
// Extended ACL to set for the container.
|
2020-08-12 21:43:51 +00:00
|
|
|
neo.fs.v2.acl.EACLTable eacl = 1;
|
2020-08-11 08:47:04 +00:00
|
|
|
|
|
|
|
// Signature of stable-marshalled Extended ACL according to RFC-6979.
|
|
|
|
bytes signature = 2;
|
|
|
|
}
|
|
|
|
// Body of set extended acl request message.
|
|
|
|
Body body = 1;
|
2020-08-05 22:20:53 +00:00
|
|
|
|
2020-08-11 08:47:04 +00:00
|
|
|
// Carries request meta information. Header data is used only to regulate
|
|
|
|
// message transport and does not affect request execution.
|
2020-08-12 21:43:51 +00:00
|
|
|
neo.fs.v2.service.RequestMetaHeader meta_header = 2;
|
2020-08-11 08:47:04 +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-12 21:43:51 +00:00
|
|
|
neo.fs.v2.service.RequestVerificationHeader verify_header = 3;
|
2020-06-18 07:40:35 +00:00
|
|
|
}
|
|
|
|
|
2020-08-12 21:43:51 +00:00
|
|
|
// Set Extended ACL
|
2020-08-11 08:47:04 +00:00
|
|
|
message SetExtendedACLResponse {
|
2020-08-12 21:43:51 +00:00
|
|
|
// Response body
|
2020-08-11 08:47:04 +00:00
|
|
|
message Body { }
|
|
|
|
|
|
|
|
// Body of set extended acl 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-12 21:43:51 +00:00
|
|
|
neo.fs.v2.service.ResponseMetaHeader meta_header = 2;
|
2020-08-11 08:47:04 +00:00
|
|
|
|
|
|
|
// Carries response verification information. This header is used to
|
|
|
|
// authenticate the nodes of the message route and check the correctness
|
|
|
|
// of transmission.
|
2020-08-12 21:43:51 +00:00
|
|
|
neo.fs.v2.service.ResponseVerificationHeader verify_header = 3;
|
2020-08-11 08:47:04 +00:00
|
|
|
}
|
2020-06-18 07:40:35 +00:00
|
|
|
|
2020-08-12 21:43:51 +00:00
|
|
|
// Get Extended ACL
|
2020-06-18 07:40:35 +00:00
|
|
|
message GetExtendedACLRequest {
|
2020-08-12 21:43:51 +00:00
|
|
|
// Request body
|
2020-08-11 08:47:04 +00:00
|
|
|
message Body {
|
|
|
|
// container_id carries identifier of the container that has Extended ACL.
|
2020-08-12 21:43:51 +00:00
|
|
|
neo.fs.v2.refs.ContainerID container_id = 1;
|
2020-08-11 08:47:04 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
// Body of get extended acl request message.
|
|
|
|
Body body = 1;
|
|
|
|
|
|
|
|
// Carries request meta information. Header data is used only to regulate
|
|
|
|
// message transport and does not affect request execution.
|
2020-08-12 21:43:51 +00:00
|
|
|
neo.fs.v2.service.RequestMetaHeader meta_header = 2;
|
2020-08-11 08:47:04 +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-12 21:43:51 +00:00
|
|
|
neo.fs.v2.service.RequestVerificationHeader verify_header = 3;
|
2020-06-18 07:40:35 +00:00
|
|
|
}
|
|
|
|
|
2020-08-12 21:43:51 +00:00
|
|
|
// Get Extended ACL
|
2020-06-18 07:40:35 +00:00
|
|
|
message GetExtendedACLResponse {
|
2020-08-12 21:43:51 +00:00
|
|
|
// Response body
|
2020-08-11 08:47:04 +00:00
|
|
|
message Body {
|
|
|
|
// Extended ACL that has been requested if it was set up.
|
2020-08-12 21:43:51 +00:00
|
|
|
neo.fs.v2.acl.EACLTable eacl = 1;
|
2020-08-11 08:47:04 +00:00
|
|
|
|
|
|
|
// Signature of stable-marshalled Extended ACL according to RFC-6979.
|
|
|
|
bytes signature = 2;
|
|
|
|
}
|
|
|
|
// Body of get extended acl 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-12 21:43:51 +00:00
|
|
|
neo.fs.v2.service.ResponseMetaHeader meta_header = 2;
|
2020-08-05 22:20:53 +00:00
|
|
|
|
2020-08-11 08:47:04 +00:00
|
|
|
// Carries response verification information. This header is used to
|
|
|
|
// authenticate the nodes of the message route and check the correctness
|
|
|
|
// of transmission.
|
2020-08-12 21:43:51 +00:00
|
|
|
neo.fs.v2.service.ResponseVerificationHeader verify_header = 3;
|
2020-06-18 07:40:35 +00:00
|
|
|
}
|