| 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; |
| } |