forked from stephenh/ts-proto
-
Notifications
You must be signed in to change notification settings - Fork 0
/
example.proto
70 lines (58 loc) · 1.44 KB
/
example.proto
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
syntax = "proto3";
import "google/protobuf/wrappers.proto";
package rpx;
service DashState {
rpc UserSettings(Empty) returns (DashUserSettingsState);
rpc ActiveUserSettingsStream(Empty) returns (stream DashUserSettingsState);
// not supported in grpc-web, but should still compile
rpc ChangeUserSettingsStream (stream DashUserSettingsState) returns (stream DashUserSettingsState) {}
}
message DashFlash {
string msg = 1;
Type type = 2;
enum Type {
Undefined = 0;
Success = 1;
Warn = 2;
Error = 3;
}
}
message DashUserSettingsState {
string email = 1;
URLs urls = 6;
repeated DashFlash flashes = 7;
message URLs {
string connect_google = 1;
string connect_github = 2;
}
}
//----------------------
// API Creds
//----------------------
service DashAPICreds {
rpc Create(DashAPICredsCreateReq) returns (DashCred);
rpc Update(DashAPICredsUpdateReq) returns (DashCred);
rpc Delete(DashAPICredsDeleteReq) returns (DashCred);
rpc Uppercase(google.protobuf.StringValue) returns (google.protobuf.StringValue);
}
message DashCred {
string description = 2;
string metadata = 3;
string token = 4;
string id = 7;
}
message DashAPICredsCreateReq {
string description = 1;
string metadata = 2;
}
message DashAPICredsUpdateReq {
string cred_sid = 1;
string description = 2;
string metadata = 3;
string id = 5;
}
message DashAPICredsDeleteReq {
string cred_sid = 1;
string id = 3;
}
message Empty {}