blob: a4121b251894b254d85b9672479bbe08f7716b59 [file] [log] [blame]
Sergiusz Bazanski0581bbf2020-05-11 03:21:32 +02001syntax = "proto3";
2package modproxy;
3option go_package = "code.hackerspace.pl/hscloud/games/factorio/modproxy/proto";
4
5service ModProxy {
6 rpc Mirror(MirrorRequest) returns (MirrorResponse);
7 rpc Download(DownloadRequest) returns (stream DownloadResponse);
8}
9
10message MirrorRequest {
11 // Authentication details to access the mod portal.
12 string username = 1;
13 string token = 2;
14}
15
16message MirrorResponse {
17 repeated string mods_okay = 1;
18 map<string, string> mods_errors = 2;
19}
20
21message DownloadRequest {
22 string mod_name = 1;
23 string file_sha1 = 2;
24}
25
26message DownloadResponse {
27 enum Status {
28 STATUS_INVALID = 0;
29 STATUS_OKAY = 1;
30 STATUS_NOT_AVAILABLE = 2;
31 };
32 Status status = 1;
33 bytes chunk = 2;
34}
35
36// Configuration for client (in text proto, so singular names in repeated fields)
37message ClientConfig {
38 message Mod {
39 string name = 1;
40 string version = 2;
41 }
42 repeated Mod mod = 1;
43}