-
Notifications
You must be signed in to change notification settings - Fork 1
/
notifications.proto
42 lines (34 loc) · 1.17 KB
/
notifications.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
syntax = "proto3";
package notifications;
option go_package = "github.com/cubex/proto-go/notifications";
import "google/protobuf/timestamp.proto";
message NotificationRequest {
string notification_uid = 1;
}
message NotificationDataRequest {
string notification_id = 1; // vendor/app-id/notification-id
string notification_uid = 2; // only to be set when posting an update
string project_id = 3;
repeated string target_id = 4; // user id / project id / vendor/app-id/role
int32 percentage = 5;
map<string, string> data = 6;
}
message NotificationResponse {
string notification_uid = 1;
string notification_id = 2;
string project_id = 3;
int32 percentage = 4;
bool is_complete = 5;
google.protobuf.Timestamp started = 6;
google.protobuf.Timestamp last_update = 7;
}
message NotificationUpdateResponse {
string notification_uid = 1;
string message = 2;
bool success = 3;
}
service Notifications {
rpc Send (NotificationDataRequest) returns (NotificationUpdateResponse);
rpc Update (NotificationDataRequest) returns (NotificationUpdateResponse);
rpc Retrieve (NotificationRequest) returns (NotificationResponse);
}