yunlian-file-v2/proto/transport.proto
2021-05-18 12:50:32 +08:00

34 lines
570 B
Protocol Buffer

syntax = "proto3";
package proto;
option go_package = "./proto";
message fileRequest{
string file_name = 1;
int64 file_range_start = 2;
int64 file_range_end = 3;
}
message fileResponse{
bytes block = 1;
int64 file_size = 2;
int64 block_size = 3;
}
message fileInfoRequest{
string file_name = 1;
}
message fileInfoResponse{
string file_name = 1;
int64 file_size = 2;
string file_sha256 = 3;
}
service fileService{
rpc Download(fileRequest) returns (stream fileResponse){};
rpc GetFileInfo(fileInfoRequest) returns (fileInfoResponse) {};
}