forked from TrueCloudLab/frostfs-api
[#37] Add body message to container requests
Signed-off-by: Alex Vanin <alexey@nspcc.ru>
This commit is contained in:
parent
d22c2557cb
commit
7447bdceee
1 changed files with 204 additions and 34 deletions
|
@ -8,6 +8,8 @@ option csharp_namespace = "NeoFS.API.Container";
|
||||||
import "acl/types.proto";
|
import "acl/types.proto";
|
||||||
import "container/types.proto";
|
import "container/types.proto";
|
||||||
import "refs/types.proto";
|
import "refs/types.proto";
|
||||||
|
import "service/meta.proto";
|
||||||
|
import "service/verify.proto";
|
||||||
|
|
||||||
// Service provides API to access container smart-contract in morph chain
|
// Service provides API to access container smart-contract in morph chain
|
||||||
// via NeoFS node.
|
// via NeoFS node.
|
||||||
|
@ -42,74 +44,242 @@ service Service {
|
||||||
}
|
}
|
||||||
|
|
||||||
message PutRequest {
|
message PutRequest {
|
||||||
// Container to create in NeoFS.
|
message Body {
|
||||||
container.Container container = 1;
|
// Container to create in NeoFS.
|
||||||
|
container.Container container = 1;
|
||||||
|
|
||||||
// Public Key of container owner. It can be public key of the owner
|
// Public Key of container owner. It can be public key of the owner
|
||||||
// or it can be public key that bound in neofs.id smart-contract.
|
// or it can be public key that bound in neofs.id smart-contract.
|
||||||
bytes public_key = 2;
|
bytes public_key = 2;
|
||||||
|
|
||||||
// Signature of stable-marshalled container according to RFC-6979.
|
// Signature of stable-marshalled container according to RFC-6979.
|
||||||
bytes signature = 3;
|
bytes signature = 3;
|
||||||
|
}
|
||||||
|
|
||||||
|
// 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.
|
||||||
|
service.RequestMetaHeader meta_header = 2;
|
||||||
|
|
||||||
|
// Carries request verification information. This header is used to
|
||||||
|
// authenticate the nodes of the message route and check the correctness
|
||||||
|
// of transmission.
|
||||||
|
service.RequestVerificationHeader verify_header = 3;
|
||||||
}
|
}
|
||||||
|
|
||||||
message PutResponse {
|
message PutResponse {
|
||||||
// container_id carries identifier of the new container.
|
message Body {
|
||||||
refs.ContainerID container_id = 1;
|
// container_id carries identifier of the new container.
|
||||||
|
refs.ContainerID container_id = 1;
|
||||||
|
}
|
||||||
|
|
||||||
|
// 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.
|
||||||
|
service.ResponseMetaHeader meta_header = 2;
|
||||||
|
|
||||||
|
// Carries response verification information. This header is used to
|
||||||
|
// authenticate the nodes of the message route and check the correctness
|
||||||
|
// of transmission.
|
||||||
|
service.ResponseVerificationHeader verify_header = 3;
|
||||||
}
|
}
|
||||||
|
|
||||||
message DeleteRequest {
|
message DeleteRequest {
|
||||||
// container_id carries identifier of the container to delete from NeoFS.
|
message Body {
|
||||||
refs.ContainerID container_id = 1;
|
// container_id carries identifier of the container to delete
|
||||||
|
// from NeoFS.
|
||||||
|
refs.ContainerID container_id = 1;
|
||||||
|
|
||||||
// Signature of container id according to RFC-6979.
|
// Signature of container id according to RFC-6979.
|
||||||
bytes signature = 2;
|
bytes signature = 2;
|
||||||
|
}
|
||||||
|
|
||||||
|
// Body of container delete request message.
|
||||||
|
Body body = 1;
|
||||||
|
|
||||||
|
// Carries request meta information. Header data is used only to regulate
|
||||||
|
// message transport and does not affect request execution.
|
||||||
|
service.RequestMetaHeader meta_header = 2;
|
||||||
|
|
||||||
|
// Carries request verification information. This header is used to
|
||||||
|
// authenticate the nodes of the message route and check the correctness
|
||||||
|
// of transmission.
|
||||||
|
service.RequestVerificationHeader verify_header = 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 {
|
||||||
|
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.
|
||||||
|
service.ResponseMetaHeader meta_header = 2;
|
||||||
|
|
||||||
|
// Carries response verification information. This header is used to
|
||||||
|
// authenticate the nodes of the message route and check the correctness
|
||||||
|
// of transmission.
|
||||||
|
service.ResponseVerificationHeader verify_header = 3;
|
||||||
|
}
|
||||||
|
|
||||||
message GetRequest {
|
message GetRequest {
|
||||||
// container_id carries identifier of the container to get.
|
message Body {
|
||||||
refs.ContainerID container_id = 1;
|
// container_id carries identifier of the container to get.
|
||||||
|
refs.ContainerID container_id = 1;
|
||||||
|
}
|
||||||
|
|
||||||
|
// 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.
|
||||||
|
service.RequestMetaHeader meta_header = 2;
|
||||||
|
|
||||||
|
// Carries request verification information. This header is used to
|
||||||
|
// authenticate the nodes of the message route and check the correctness
|
||||||
|
// of transmission.
|
||||||
|
service.RequestVerificationHeader verify_header = 3;
|
||||||
}
|
}
|
||||||
|
|
||||||
message GetResponse {
|
message GetResponse {
|
||||||
// Container that has been requested.
|
message Body {
|
||||||
container.Container container = 1;
|
// Container that has been requested.
|
||||||
|
container.Container container = 1;
|
||||||
|
}
|
||||||
|
|
||||||
|
// 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.
|
||||||
|
service.ResponseMetaHeader meta_header = 2;
|
||||||
|
|
||||||
|
// Carries response verification information. This header is used to
|
||||||
|
// authenticate the nodes of the message route and check the correctness
|
||||||
|
// of transmission.
|
||||||
|
service.ResponseVerificationHeader verify_header = 3;
|
||||||
}
|
}
|
||||||
|
|
||||||
message ListRequest {
|
message ListRequest {
|
||||||
// owner_id carries identifier of the container owner.
|
message Body {
|
||||||
refs.OwnerID owner_id = 1;
|
// owner_id carries identifier of the container owner.
|
||||||
|
refs.OwnerID owner_id = 1;
|
||||||
|
}
|
||||||
|
|
||||||
|
// 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.
|
||||||
|
service.RequestMetaHeader meta_header = 2;
|
||||||
|
|
||||||
|
// Carries request verification information. This header is used to
|
||||||
|
// authenticate the nodes of the message route and check the correctness
|
||||||
|
// of transmission.
|
||||||
|
service.RequestVerificationHeader verify_header = 3;
|
||||||
}
|
}
|
||||||
|
|
||||||
message ListResponse {
|
message ListResponse {
|
||||||
// ContainerIDs carries list of identifiers of the containers that belong
|
message Body {
|
||||||
// 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;
|
||||||
|
}
|
||||||
|
|
||||||
|
// 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.
|
||||||
|
service.ResponseMetaHeader meta_header = 2;
|
||||||
|
|
||||||
|
// Carries response verification information. This header is used to
|
||||||
|
// authenticate the nodes of the message route and check the correctness
|
||||||
|
// of transmission.
|
||||||
|
service.ResponseVerificationHeader verify_header = 3;
|
||||||
}
|
}
|
||||||
|
|
||||||
message SetExtendedACLRequest {
|
message SetExtendedACLRequest {
|
||||||
// Extended ACL to set for the container.
|
message Body {
|
||||||
acl.EACLTable eacl = 1;
|
// Extended ACL to set for the container.
|
||||||
|
acl.EACLTable eacl = 1;
|
||||||
|
|
||||||
// Signature of stable-marshalled Extended ACL according to RFC-6979.
|
// Signature of stable-marshalled Extended ACL according to RFC-6979.
|
||||||
bytes signature = 2;
|
bytes signature = 2;
|
||||||
|
}
|
||||||
|
|
||||||
|
// Body of set 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.
|
||||||
|
service.RequestMetaHeader meta_header = 2;
|
||||||
|
|
||||||
|
// Carries request verification information. This header is used to
|
||||||
|
// authenticate the nodes of the message route and check the correctness
|
||||||
|
// of transmission.
|
||||||
|
service.RequestVerificationHeader verify_header = 3;
|
||||||
}
|
}
|
||||||
|
|
||||||
message SetExtendedACLResponse {}
|
message SetExtendedACLResponse {
|
||||||
|
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.
|
||||||
|
service.ResponseMetaHeader meta_header = 2;
|
||||||
|
|
||||||
|
// Carries response verification information. This header is used to
|
||||||
|
// authenticate the nodes of the message route and check the correctness
|
||||||
|
// of transmission.
|
||||||
|
service.ResponseVerificationHeader verify_header = 3;
|
||||||
|
}
|
||||||
|
|
||||||
message GetExtendedACLRequest {
|
message GetExtendedACLRequest {
|
||||||
// container_id carries identifier of the container that has Extended ACL.
|
message Body {
|
||||||
refs.ContainerID container_id = 1;
|
// container_id carries identifier of the container that has Extended ACL.
|
||||||
|
refs.ContainerID container_id = 1;
|
||||||
|
}
|
||||||
|
|
||||||
|
// 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.
|
||||||
|
service.RequestMetaHeader meta_header = 2;
|
||||||
|
|
||||||
|
// Carries request verification information. This header is used to
|
||||||
|
// authenticate the nodes of the message route and check the correctness
|
||||||
|
// of transmission.
|
||||||
|
service.RequestVerificationHeader verify_header = 3;
|
||||||
}
|
}
|
||||||
|
|
||||||
message GetExtendedACLResponse {
|
message GetExtendedACLResponse {
|
||||||
// Extended ACL that has been requested if it was set up.
|
message Body {
|
||||||
acl.EACLTable eacl = 1;
|
// Extended ACL that has been requested if it was set up.
|
||||||
|
acl.EACLTable eacl = 1;
|
||||||
|
|
||||||
// Signature of stable-marshalled Extended ACL according to RFC-6979.
|
// Signature of stable-marshalled Extended ACL according to RFC-6979.
|
||||||
bytes signature = 2;
|
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.
|
||||||
|
service.ResponseMetaHeader meta_header = 2;
|
||||||
|
|
||||||
|
// Carries response verification information. This header is used to
|
||||||
|
// authenticate the nodes of the message route and check the correctness
|
||||||
|
// of transmission.
|
||||||
|
service.ResponseVerificationHeader verify_header = 3;
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue