2020-01-30 11:41:24 +00:00
|
|
|
syntax = "proto3";
|
|
|
|
package container;
|
2020-03-31 06:58:22 +00:00
|
|
|
option go_package = "github.com/nspcc-dev/neofs-api-go/container";
|
2020-02-05 12:14:39 +00:00
|
|
|
option csharp_namespace = "NeoFS.API.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";
|
|
|
|
import "github.com/gogo/protobuf/gogoproto/gogo.proto";
|
|
|
|
|
|
|
|
option (gogoproto.stable_marshaler_all) = true;
|
|
|
|
|
|
|
|
// Container service provides API for manipulating with the container.
|
|
|
|
service Service {
|
|
|
|
// Put request proposes container to the inner ring nodes. They will
|
|
|
|
// accept new container if user has enough deposit. All containers
|
|
|
|
// are accepted by the consensus, therefore it is asynchronous process.
|
|
|
|
rpc Put(PutRequest) returns (PutResponse);
|
|
|
|
|
|
|
|
// Delete container removes it from the inner ring container storage. It
|
|
|
|
// also asynchronous process done by consensus.
|
|
|
|
rpc Delete(DeleteRequest) returns (DeleteResponse);
|
|
|
|
|
|
|
|
// Get container returns container instance
|
|
|
|
rpc Get(GetRequest) returns (GetResponse);
|
|
|
|
|
|
|
|
// List returns all user's containers
|
|
|
|
rpc List(ListRequest) returns (ListResponse);
|
2020-06-18 07:40:35 +00:00
|
|
|
|
|
|
|
// SetExtendedACL changes extended ACL rules of the container
|
|
|
|
rpc SetExtendedACL(SetExtendedACLRequest) returns (SetExtendedACLResponse);
|
|
|
|
|
|
|
|
// GetExtendedACL returns extended ACL rules of the container
|
|
|
|
rpc GetExtendedACL(GetExtendedACLRequest) returns (GetExtendedACLResponse);
|
2020-01-30 11:41:24 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
message PutRequest {
|
2020-07-31 14:31:21 +00:00
|
|
|
// Container to create in NeoFS.
|
|
|
|
container.Container Container = 1;
|
|
|
|
// PublicKey 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 PublicKey = 2;
|
|
|
|
// Signature of stable-marshalled container according to RFC-6979.
|
|
|
|
bytes Signature = 3;
|
2020-01-30 11:41:24 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
message PutResponse {
|
|
|
|
// CID (container id) is a SHA256 hash of the container structure
|
2020-07-31 14:46:28 +00:00
|
|
|
bytes ContainerID = 1;
|
2020-01-30 11:41:24 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
message DeleteRequest {
|
2020-07-31 14:31:58 +00:00
|
|
|
// ContainerID of container to delete from NeoFS.
|
|
|
|
bytes ContainerID = 1;
|
|
|
|
// Signature of container id according to RFC-6979.
|
|
|
|
bytes Signature = 2;
|
2020-01-30 11:41:24 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
// DeleteResponse is empty because delete operation is asynchronous and done
|
|
|
|
// via consensus in inner ring nodes
|
|
|
|
message DeleteResponse { }
|
|
|
|
|
|
|
|
|
|
|
|
message GetRequest {
|
|
|
|
// CID (container id) is a SHA256 hash of the container structure
|
2020-07-31 14:46:28 +00:00
|
|
|
bytes ContainerID = 1;
|
2020-01-30 11:41:24 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
message GetResponse {
|
|
|
|
// Container is a structure that contains placement rules and owner id
|
|
|
|
container.Container Container = 1;
|
|
|
|
}
|
|
|
|
|
|
|
|
message ListRequest {
|
|
|
|
// OwnerID is a wallet address
|
2020-07-31 14:46:28 +00:00
|
|
|
bytes OwnerID = 1;
|
2020-01-30 11:41:24 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
message ListResponse {
|
|
|
|
// CID (container id) is list of SHA256 hashes of the container structures
|
2020-07-31 14:46:28 +00:00
|
|
|
repeated bytes ContainerIDs = 1;
|
2020-01-30 11:41:24 +00:00
|
|
|
}
|
2020-06-18 07:40:35 +00:00
|
|
|
|
|
|
|
message SetExtendedACLRequest {
|
2020-07-31 14:18:50 +00:00
|
|
|
// EACL to set for the container.
|
|
|
|
acl.EACLTable EACL = 1;
|
|
|
|
// Signature of stable-marshalled Extended ACL according to RFC-6979.
|
|
|
|
bytes Signature = 2;
|
2020-06-18 07:40:35 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
message SetExtendedACLResponse {}
|
|
|
|
|
|
|
|
message GetExtendedACLRequest {
|
2020-07-31 14:18:50 +00:00
|
|
|
// ContainerID of the container that has Extended ACL.
|
|
|
|
bytes ContainerID = 1;
|
2020-06-18 07:40:35 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
message GetExtendedACLResponse {
|
2020-07-31 14:18:50 +00:00
|
|
|
// EACL that has been requested if it was set up.
|
|
|
|
acl.EACLTable EACL = 1;
|
2020-07-31 14:21:02 +00:00
|
|
|
// Signature of stable-marshalled Extended ACL according to RFC-6979.
|
|
|
|
bytes Signature = 2;
|
2020-06-18 07:40:35 +00:00
|
|
|
}
|