syntax = "proto3"; package container; option go_package = "github.com/nspcc-dev/neofs-proto/container"; 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; service Service { // Create container rpc Put(PutRequest) returns (PutResponse); // Delete container ... discuss implementation later rpc Delete(DeleteRequest) returns (DeleteResponse); // Get container rpc Get(GetRequest) returns (GetResponse); rpc List(ListRequest) returns (ListResponse); } // NewRequest message to create new container message PutRequest { bytes MessageID = 1 [(gogoproto.customtype) = "MessageID", (gogoproto.nullable) = false]; uint64 Capacity = 2; // not actual size in megabytes, but probability of storage availability bytes OwnerID = 3 [(gogoproto.customtype) = "OwnerID", (gogoproto.nullable) = false]; netmap.PlacementRule rules = 4 [(gogoproto.nullable) = false]; bytes Signature = 5; uint32 TTL = 6; } // PutResponse message to respond about container uuid message PutResponse { bytes CID = 1 [(gogoproto.customtype) = "CID", (gogoproto.nullable) = false]; } message DeleteRequest { bytes CID = 1 [(gogoproto.customtype) = "CID", (gogoproto.nullable) = false]; uint32 TTL = 2; bytes Signature = 3; } message DeleteResponse { } // GetRequest message to fetch container placement rules message GetRequest { bytes CID = 1 [(gogoproto.customtype) = "CID", (gogoproto.nullable) = false]; uint32 TTL = 2; } // GetResponse message with container structure message GetResponse { container.Container Container = 1; } // ListRequest message to list containers for user message ListRequest { bytes OwnerID = 1 [(gogoproto.customtype) = "OwnerID", (gogoproto.nullable) = false]; uint32 TTL = 2; } // ListResponse message to respond about all user containers message ListResponse { repeated bytes CID = 1 [(gogoproto.customtype) = "CID", (gogoproto.nullable) = false]; }