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
|
|
|
|
|
|
|
import "service/meta.proto";
|
|
|
|
import "service/verify.proto";
|
|
|
|
import "container/types.proto";
|
|
|
|
import "github.com/nspcc-dev/netmap/selector.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 {
|
|
|
|
// MessageID is a nonce for uniq container id calculation
|
|
|
|
bytes MessageID = 1 [(gogoproto.customtype) = "MessageID", (gogoproto.nullable) = false];
|
|
|
|
|
|
|
|
// Capacity defines amount of data that can be stored in the container (doesn't used for now).
|
|
|
|
uint64 Capacity = 2;
|
|
|
|
|
|
|
|
// OwnerID is a wallet address
|
|
|
|
bytes OwnerID = 3 [(gogoproto.customtype) = "OwnerID", (gogoproto.nullable) = false];
|
|
|
|
|
|
|
|
// Rules define storage policy for the object inside the container.
|
|
|
|
netmap.PlacementRule rules = 4 [(gogoproto.nullable) = false];
|
|
|
|
|
2020-04-01 16:03:46 +00:00
|
|
|
// BasicACL of the container.
|
|
|
|
uint32 BasicACL = 5;
|
2020-01-30 11:41:24 +00:00
|
|
|
|
|
|
|
// RequestMetaHeader contains information about request meta headers (should be embedded into message)
|
|
|
|
service.RequestMetaHeader Meta = 98 [(gogoproto.embed) = true, (gogoproto.nullable) = false];
|
|
|
|
// RequestVerificationHeader is a set of signatures of every NeoFS Node that processed request (should be embedded into message)
|
|
|
|
service.RequestVerificationHeader Verify = 99 [(gogoproto.embed) = true, (gogoproto.nullable) = false];
|
|
|
|
}
|
|
|
|
|
|
|
|
message PutResponse {
|
|
|
|
// CID (container id) is a SHA256 hash of the container structure
|
|
|
|
bytes CID = 1 [(gogoproto.customtype) = "CID", (gogoproto.nullable) = false];
|
|
|
|
}
|
|
|
|
|
|
|
|
message DeleteRequest {
|
|
|
|
// CID (container id) is a SHA256 hash of the container structure
|
|
|
|
bytes CID = 1 [(gogoproto.customtype) = "CID", (gogoproto.nullable) = false];
|
|
|
|
|
|
|
|
// RequestMetaHeader contains information about request meta headers (should be embedded into message)
|
|
|
|
service.RequestMetaHeader Meta = 98 [(gogoproto.embed) = true, (gogoproto.nullable) = false];
|
|
|
|
// RequestVerificationHeader is a set of signatures of every NeoFS Node that processed request (should be embedded into message)
|
|
|
|
service.RequestVerificationHeader Verify = 99 [(gogoproto.embed) = true, (gogoproto.nullable) = false];
|
|
|
|
}
|
|
|
|
|
|
|
|
// 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
|
|
|
|
bytes CID = 1 [(gogoproto.customtype) = "CID", (gogoproto.nullable) = false];
|
|
|
|
|
|
|
|
// RequestMetaHeader contains information about request meta headers (should be embedded into message)
|
|
|
|
service.RequestMetaHeader Meta = 98 [(gogoproto.embed) = true, (gogoproto.nullable) = false];
|
|
|
|
// RequestVerificationHeader is a set of signatures of every NeoFS Node that processed request (should be embedded into message)
|
|
|
|
service.RequestVerificationHeader Verify = 99 [(gogoproto.embed) = true, (gogoproto.nullable) = false];
|
|
|
|
}
|
|
|
|
|
|
|
|
message GetResponse {
|
|
|
|
// Container is a structure that contains placement rules and owner id
|
|
|
|
container.Container Container = 1;
|
|
|
|
}
|
|
|
|
|
|
|
|
message ListRequest {
|
|
|
|
// OwnerID is a wallet address
|
|
|
|
bytes OwnerID = 1 [(gogoproto.customtype) = "OwnerID", (gogoproto.nullable) = false];
|
|
|
|
// RequestMetaHeader contains information about request meta headers (should be embedded into message)
|
|
|
|
service.RequestMetaHeader Meta = 98 [(gogoproto.embed) = true, (gogoproto.nullable) = false];
|
|
|
|
// RequestVerificationHeader is a set of signatures of every NeoFS Node that processed request (should be embedded into message)
|
|
|
|
service.RequestVerificationHeader Verify = 99 [(gogoproto.embed) = true, (gogoproto.nullable) = false];
|
|
|
|
}
|
|
|
|
|
|
|
|
message ListResponse {
|
|
|
|
// CID (container id) is list of SHA256 hashes of the container structures
|
|
|
|
repeated bytes CID = 1 [(gogoproto.customtype) = "CID", (gogoproto.nullable) = false];
|
|
|
|
}
|
2020-06-18 07:40:35 +00:00
|
|
|
|
|
|
|
message ExtendedACLKey {
|
|
|
|
// ID (container id) is a SHA256 hash of the container structure
|
|
|
|
bytes ID = 1 [(gogoproto.customtype) = "CID", (gogoproto.nullable) = false];
|
|
|
|
}
|
|
|
|
|
|
|
|
message ExtendedACLValue {
|
|
|
|
// EACL carries binary representation of the table of extended ACL rules
|
|
|
|
bytes EACL = 1;
|
|
|
|
// Signature carries EACL field signature
|
|
|
|
bytes Signature = 2;
|
|
|
|
}
|
|
|
|
|
|
|
|
message SetExtendedACLRequest {
|
|
|
|
// Key carries key to extended ACL information
|
|
|
|
ExtendedACLKey Key = 1 [(gogoproto.embed) = true, (gogoproto.nullable) = false];
|
|
|
|
// Value carries extended ACL information
|
|
|
|
ExtendedACLValue Value = 2 [(gogoproto.embed) = true, (gogoproto.nullable) = false];
|
|
|
|
// RequestMetaHeader contains information about request meta headers (should be embedded into message)
|
|
|
|
service.RequestMetaHeader Meta = 98 [(gogoproto.embed) = true, (gogoproto.nullable) = false];
|
|
|
|
// RequestVerificationHeader is a set of signatures of every NeoFS Node that processed request (should be embedded into message)
|
|
|
|
service.RequestVerificationHeader Verify = 99 [(gogoproto.embed) = true, (gogoproto.nullable) = false];
|
|
|
|
}
|
|
|
|
|
|
|
|
message SetExtendedACLResponse {}
|
|
|
|
|
|
|
|
message GetExtendedACLRequest {
|
|
|
|
// Key carries key to extended ACL information
|
|
|
|
ExtendedACLKey Key = 1 [(gogoproto.embed) = true, (gogoproto.nullable) = false];
|
|
|
|
// RequestMetaHeader contains information about request meta headers (should be embedded into message)
|
|
|
|
service.RequestMetaHeader Meta = 98 [(gogoproto.embed) = true, (gogoproto.nullable) = false];
|
|
|
|
// RequestVerificationHeader is a set of signatures of every NeoFS Node that processed request (should be embedded into message)
|
|
|
|
service.RequestVerificationHeader Verify = 99 [(gogoproto.embed) = true, (gogoproto.nullable) = false];
|
|
|
|
}
|
|
|
|
|
|
|
|
message GetExtendedACLResponse {
|
|
|
|
// ACL carries extended ACL information
|
|
|
|
ExtendedACLValue ACL = 1 [(gogoproto.embed) = true, (gogoproto.nullable) = false];
|
|
|
|
}
|