blob: a4121b251894b254d85b9672479bbe08f7716b59 [file] [log] [blame]
syntax = "proto3";
package modproxy;
option go_package = "code.hackerspace.pl/hscloud/games/factorio/modproxy/proto";
service ModProxy {
rpc Mirror(MirrorRequest) returns (MirrorResponse);
rpc Download(DownloadRequest) returns (stream DownloadResponse);
}
message MirrorRequest {
// Authentication details to access the mod portal.
string username = 1;
string token = 2;
}
message MirrorResponse {
repeated string mods_okay = 1;
map<string, string> mods_errors = 2;
}
message DownloadRequest {
string mod_name = 1;
string file_sha1 = 2;
}
message DownloadResponse {
enum Status {
STATUS_INVALID = 0;
STATUS_OKAY = 1;
STATUS_NOT_AVAILABLE = 2;
};
Status status = 1;
bytes chunk = 2;
}
// Configuration for client (in text proto, so singular names in repeated fields)
message ClientConfig {
message Mod {
string name = 1;
string version = 2;
}
repeated Mod mod = 1;
}