Files
ClubPenguinServer/MareSynchronosServer/MareSynchronosShared/Protos/mareservices.proto
2022-08-27 01:13:49 +02:00

51 lines
951 B
Protocol Buffer

syntax = "proto3";
option csharp_namespace = "MareSynchronosShared.Protos";
package mareservices;
service AuthService {
rpc Authorize (AuthRequest) returns (AuthReply);
rpc RemoveAuth (RemoveAuthRequest) returns (Empty);
rpc ClearUnauthorized (Empty) returns (Empty);
}
service FileService {
rpc UploadFile (stream UploadFileRequest) returns (Empty);
rpc GetFileSizes (FileSizeRequest) returns (FileSizeResponse);
rpc DeleteFiles (DeleteFilesRequest) returns (Empty);
}
message Empty { }
message UploadFileRequest {
string hash = 1;
string uploader = 2;
bytes fileData = 3;
}
message DeleteFilesRequest {
repeated string hash = 1;
}
message FileSizeRequest {
repeated string hash = 1;
}
message FileSizeResponse {
map<string, int64> hashToFileSize = 1;
}
message RemoveAuthRequest {
string uid = 1;
}
message AuthRequest {
string ip = 1;
string secretKey = 2;
}
message AuthReply {
bool success = 1;
string uid = 2;
}