forked from TrueCloudLab/frostfs-api
62cc321c3e
Signed-off-by: Alex Vanin <alexey@nspcc.ru>
110 lines
3.5 KiB
Protocol Buffer
110 lines
3.5 KiB
Protocol Buffer
syntax = "proto3";
|
|
package container;
|
|
option go_package = "github.com/nspcc-dev/neofs-api-go/container";
|
|
option csharp_namespace = "NeoFS.API.Container";
|
|
|
|
import "acl/types.proto";
|
|
import "container/types.proto";
|
|
import "github.com/gogo/protobuf/gogoproto/gogo.proto";
|
|
|
|
option (gogoproto.stable_marshaler_all) = true;
|
|
|
|
// Service provides API to access container smart-contract in morph chain
|
|
// via NeoFS node.
|
|
service Service {
|
|
// 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);
|
|
}
|
|
|
|
message PutRequest {
|
|
// 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;
|
|
}
|
|
|
|
message PutResponse {
|
|
// ContainerID of the new container.
|
|
bytes ContainerID = 1;
|
|
}
|
|
|
|
message DeleteRequest {
|
|
// ContainerID of container to delete from NeoFS.
|
|
bytes ContainerID = 1;
|
|
// Signature of container id according to RFC-6979.
|
|
bytes Signature = 2;
|
|
}
|
|
|
|
// DeleteResponse is empty because delete operation is asynchronous and done
|
|
// via consensus in inner ring nodes
|
|
message DeleteResponse { }
|
|
|
|
|
|
message GetRequest {
|
|
// ContainerID of the container to get.
|
|
bytes ContainerID = 1;
|
|
}
|
|
|
|
message GetResponse {
|
|
// Container that has been requested.
|
|
container.Container Container = 1;
|
|
}
|
|
|
|
message ListRequest {
|
|
// OwnerID is a 25 byte NEO3.0 wallet address.
|
|
bytes OwnerID = 1;
|
|
}
|
|
|
|
message ListResponse {
|
|
// ContainerIDs of containers that belong to the owner.
|
|
repeated bytes ContainerIDs = 1;
|
|
}
|
|
|
|
message SetExtendedACLRequest {
|
|
// EACL to set for the container.
|
|
acl.EACLTable EACL = 1;
|
|
// Signature of stable-marshalled Extended ACL according to RFC-6979.
|
|
bytes Signature = 2;
|
|
}
|
|
|
|
message SetExtendedACLResponse {}
|
|
|
|
message GetExtendedACLRequest {
|
|
// ContainerID of the container that has Extended ACL.
|
|
bytes ContainerID = 1;
|
|
}
|
|
|
|
message GetExtendedACLResponse {
|
|
// EACL that has been requested if it was set up.
|
|
acl.EACLTable EACL = 1;
|
|
// Signature of stable-marshalled Extended ACL according to RFC-6979.
|
|
bytes Signature = 2;
|
|
}
|