Debian Codegraph @

rpc/rpc.proto

raw ◀ ▶
1 Debian patch touch this file
1 syntax = "proto3";
2
3 import "google/protobuf/empty.proto";
4 import "google/protobuf/timestamp.proto";
5
•6 option go_package = "./rpc";
7
8
9 service CLI {
10 rpc GetVersion (google.protobuf.Empty) returns (VersionReply) {}
11 rpc Upgrade (google.protobuf.Empty) returns (google.protobuf.Empty) {}
12 rpc Reload (google.protobuf.Empty) returns (google.protobuf.Empty) {}
13 rpc ChangeStatus (ChangeStatusRequest) returns (google.protobuf.Empty) {}
14 rpc List (google.protobuf.Empty) returns (MirrorListReply) {}
15 rpc MirrorInfo (MirrorIDRequest) returns (Mirror) {}
16 rpc AddMirror (Mirror) returns (AddMirrorReply) {}
17 rpc UpdateMirror (Mirror) returns (UpdateMirrorReply) {}
18 rpc RemoveMirror (MirrorIDRequest) returns (google.protobuf.Empty) {}
19 rpc GeoUpdateMirror (MirrorIDRequest) returns (GeoUpdateMirrorReply) {}
20 rpc RefreshRepository (RefreshRepositoryRequest) returns (google.protobuf.Empty) {}
21 rpc ScanMirror (ScanMirrorRequest) returns (ScanMirrorReply) {}
22 rpc StatsFile (StatsFileRequest) returns (StatsFileReply) {}
23 rpc StatsMirror (StatsMirrorRequest) returns (StatsMirrorReply) {}
24 rpc Ping (google.protobuf.Empty) returns (google.protobuf.Empty) {}
25 rpc GetMirrorLogs (GetMirrorLogsRequest) returns (GetMirrorLogsReply) {}
26
27 // Tools
28 rpc MatchMirror (MatchRequest) returns (MatchReply) {}
29 }
30
31 message VersionReply {
32 string Version = 1;
33 string Build = 2;
34 string GoVersion = 3;
35 string OS = 4;
36 string Arch = 5;
37 int32 GoMaxProcs = 6;
38 }
39
40 message MatchRequest {
41 string Pattern = 1;
42 }
43
44 message Mirror {
45 int32 ID = 1;
46 string Name = 2;
47 string HttpURL = 3;
48 string RsyncURL = 4;
49 string FtpURL = 5;
50 string SponsorName = 6;
51 string SponsorURL = 7;
52 string SponsorLogoURL = 8;
53 string AdminName = 9;
54 string AdminEmail = 10;
55 string CustomData = 11;
56 bool ContinentOnly = 12;
57 bool CountryOnly = 13;
58 bool ASOnly = 14;
59 int32 Score = 15;
60 float Latitude = 16;
61 float Longitude = 17;
62 string ContinentCode = 18;
63 string CountryCodes = 19;
64 string ExcludedCountryCodes = 20;
65 uint32 Asnum = 21;
66 string Comment = 22;
67 bool Enabled = 23;
68 bool HttpUp = 24;
69 string HttpDownReason = 25;
70 google.protobuf.Timestamp StateSince = 26;
71 int32 AllowRedirects = 27;
72 google.protobuf.Timestamp LastSync = 28;
73 google.protobuf.Timestamp LastSuccessfulSync = 29;
74 google.protobuf.Timestamp LastModTime = 30;
75 bool HttpsUp = 31;
76 string HttpsDownReason = 32;
77 }
78
79 message MirrorListReply {
80 repeated Mirror Mirrors = 1;
81 }
82
83 message MirrorID {
84 int32 ID = 1;
85 string Name = 2;
86 }
87
88 message MatchReply {
89 repeated MirrorID Mirrors = 1;
90 }
91
92 message ChangeStatusRequest {
93 int32 ID = 1;
94 bool Enabled = 2;
95 }
96
97 message MirrorIDRequest {
98 int32 ID = 1;
99 }
100
101 message AddMirrorReply {
102 float Latitude = 1;
103 float Longitude = 2;
104 string Country = 3;
105 string Continent = 4;
106 string ASN = 5;
107 repeated string Warnings = 6;
108 }
109
110 message UpdateMirrorReply {
111 string Diff = 1;
112 }
113
114 message GeoUpdateMirrorReply {
115 Mirror Mirror = 1;
116 string Diff = 2;
117 repeated string Warnings = 3;
118 }
119
120 message RefreshRepositoryRequest {
121 bool Rehash = 1;
122 }
123
124 message ScanMirrorRequest {
125 int32 ID = 1;
126 bool AutoEnable = 2;
127 enum Method {
128 ALL = 0;
129 FTP = 1;
130 RSYNC = 2;
131 }
132 Method Protocol = 3;
133 }
134
135 message ScanMirrorReply {
136 bool Enabled = 1;
137 int64 FilesIndexed = 2;
138 int64 KnownIndexed = 3;
139 int64 Removed = 4;
140 int64 TZOffsetMs = 5;
141 }
142
143 message StatsFileRequest {
144 string Pattern = 1;
145 google.protobuf.Timestamp DateStart = 2;
146 google.protobuf.Timestamp DateEnd = 3;
147 }
148
149 message StatsFileReply {
150 map<string, int64> files = 1;
151 }
152
153 message StatsMirrorRequest {
154 int32 ID = 1;
155 google.protobuf.Timestamp DateStart = 2;
156 google.protobuf.Timestamp DateEnd = 3;
157 }
158
159 message StatsMirrorReply {
160 Mirror Mirror = 1;
161 int64 Requests = 2;
162 int64 Bytes = 3;
163 }
164
165 message GetMirrorLogsRequest {
166 int32 ID = 1;
167 int32 MaxResults = 2;
168 }
169
170 message GetMirrorLogsReply {
171 repeated string line = 1;
172 }