2024-10-23 16:13:16 +00:00
|
|
|
syntax = "proto3";
|
|
|
|
|
|
|
|
option go_package = ".;proto";
|
|
|
|
|
|
|
|
package proto;
|
|
|
|
|
2024-10-31 13:07:53 +00:00
|
|
|
service NotifyService {
|
2024-10-23 16:13:16 +00:00
|
|
|
rpc NotifyUser(NotifyUserRequest) returns (NotifyResponse) {}
|
|
|
|
rpc NotifyUserBatch(NotifyUserBatchRequest) returns (NotifyResponse) {}
|
|
|
|
rpc NotifyAllUser(NotifyRequest) returns(NotifyResponse) {}
|
|
|
|
}
|
|
|
|
|
|
|
|
message NotifyUserRequest {
|
|
|
|
uint64 user_id = 1;
|
|
|
|
NotifyRequest notify = 2;
|
|
|
|
}
|
|
|
|
|
|
|
|
message NotifyUserBatchRequest {
|
|
|
|
repeated uint64 user_id = 1;
|
|
|
|
NotifyRequest notify = 2;
|
|
|
|
}
|
|
|
|
|
|
|
|
message NotifyRequest {
|
|
|
|
string topic = 1;
|
|
|
|
string title = 2;
|
|
|
|
optional string subtitle = 3;
|
|
|
|
string body = 4;
|
|
|
|
bytes metadata = 5;
|
2024-10-26 16:06:23 +00:00
|
|
|
int64 priority = 6;
|
2024-10-23 16:13:16 +00:00
|
|
|
bool is_realtime = 8;
|
|
|
|
}
|
|
|
|
|
|
|
|
message NotifyResponse {
|
|
|
|
bool is_success = 1;
|
|
|
|
int64 affected_count = 2;
|
|
|
|
}
|