2017-07-24 07:06:23 +00:00
|
|
|
syntax = "proto3";
|
|
|
|
|
|
|
|
package proto;
|
|
|
|
|
2018-01-03 09:08:28 +00:00
|
|
|
message Alert {
|
|
|
|
string title = 1;
|
|
|
|
string body = 2;
|
|
|
|
string subtitle = 3;
|
|
|
|
}
|
|
|
|
|
2017-07-24 07:06:23 +00:00
|
|
|
message NotificationRequest {
|
|
|
|
repeated string tokens = 1;
|
|
|
|
int32 platform = 2;
|
|
|
|
string message = 3;
|
|
|
|
string title = 4;
|
|
|
|
string topic = 5;
|
|
|
|
string key = 6;
|
2018-01-02 07:53:15 +00:00
|
|
|
int32 badge = 7;
|
|
|
|
string category = 8;
|
|
|
|
Alert alert = 9;
|
2017-07-24 07:06:23 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
message NotificationReply {
|
|
|
|
bool success = 1;
|
|
|
|
int32 counts = 2;
|
|
|
|
}
|
|
|
|
|
|
|
|
service Gorush {
|
|
|
|
rpc Send (NotificationRequest) returns (NotificationReply) {}
|
|
|
|
}
|
|
|
|
|
2017-11-12 14:44:33 +00:00
|
|
|
message HealthCheckRequest {
|
|
|
|
string service = 1;
|
|
|
|
}
|
|
|
|
|
|
|
|
message HealthCheckResponse {
|
|
|
|
enum ServingStatus {
|
|
|
|
UNKNOWN = 0;
|
|
|
|
SERVING = 1;
|
|
|
|
NOT_SERVING = 2;
|
|
|
|
}
|
|
|
|
ServingStatus status = 1;
|
|
|
|
}
|
|
|
|
|
|
|
|
service Health {
|
|
|
|
rpc Check(HealthCheckRequest) returns (HealthCheckResponse);
|
|
|
|
}
|