-
Notifications
You must be signed in to change notification settings - Fork 0
/
notification-service.proto
43 lines (33 loc) · 1.17 KB
/
notification-service.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
syntax = "proto3";
option java_multiple_files = true;
option java_package = "com.kotlang.notification";
option java_outer_classname = "NotificationServiceInternal";
option go_package = "github.com/Kotlang/notificationGo/generated";
package notification;
service NotificationService {
rpc RegisterDeviceInstance (RegisterDeviceInstanceRequest) returns (NotificationStatusResponse) {}
rpc RegisterEvent(RegisterEventRequest) returns (NotificationStatusResponse) {}
rpc GetFCMTopics(GetFCMTopicsRequest) returns (FCMTopicsResponse) {}
}
message GetFCMTopicsRequest {}
message FCMTopicsResponse {
repeated string topics = 1;
}
message RegisterDeviceInstanceRequest {
string token = 1;
}
message RegisterEventRequest {
string eventType = 1;
string title = 2;
string body = 3;
string imageURL = 4;
// Notification service has templates for each eventType.
// Parameters will used to generate notification message.
map<string, string> templateParameters = 5;
// if set to broadcast then all devices will receive notification.
string topic = 6;
repeated string targetUsers = 7;
}
message NotificationStatusResponse {
string status = 1;
}