forked from TrueCloudLab/frostfs-api-go
initial
This commit is contained in:
commit
1cf33e5ffd
87 changed files with 29835 additions and 0 deletions
68
container/service.proto
Normal file
68
container/service.proto
Normal file
|
@ -0,0 +1,68 @@
|
|||
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];
|
||||
}
|
Loading…
Add table
Add a link
Reference in a new issue