db17557d0d
* added spawn scripts * wip * Make server not require length * Added test for 0 length * Added test for accepting length of 0 * linter errors * Make store not take anything more than an id and maybe a ttl if you want
59 lines
934 B
Protocol Buffer
59 lines
934 B
Protocol Buffer
// Copyright (C) 2018 Storj Labs, Inc.
|
|
// See LICENSE for copying information.
|
|
|
|
syntax = "proto3";
|
|
|
|
package piecestoreroutes;
|
|
|
|
service PieceStoreRoutes {
|
|
rpc Piece(PieceId) returns (PieceSummary) {}
|
|
|
|
rpc Retrieve(PieceRetrieval) returns (stream PieceRetrievalStream) {}
|
|
|
|
rpc Store(stream PieceStore) returns (PieceStoreSummary) {}
|
|
|
|
rpc Delete(PieceDelete) returns (PieceDeleteSummary) {}
|
|
|
|
}
|
|
|
|
message PieceStore {
|
|
string id = 1;
|
|
int64 ttl = 2;
|
|
|
|
bytes content = 3;
|
|
}
|
|
|
|
message PieceId {
|
|
string id = 1;
|
|
}
|
|
|
|
message PieceSummary {
|
|
string id = 1;
|
|
int64 size = 2;
|
|
int64 expiration = 3;
|
|
}
|
|
|
|
message PieceRetrieval {
|
|
string id = 1;
|
|
int64 size = 2;
|
|
int64 offset = 3;
|
|
}
|
|
|
|
message PieceRetrievalStream {
|
|
int64 size = 1;
|
|
bytes content = 2;
|
|
}
|
|
|
|
message PieceDelete {
|
|
string id = 1;
|
|
}
|
|
|
|
message PieceDeleteSummary {
|
|
string message = 1;
|
|
}
|
|
|
|
message PieceStoreSummary {
|
|
string message = 1;
|
|
int64 totalReceived = 2;
|
|
}
|