2024-07-15 14:20:37 +00:00
|
|
|
syntax = "proto3";
|
|
|
|
|
|
|
|
option go_package = ".;proto";
|
|
|
|
|
|
|
|
package proto;
|
|
|
|
|
|
|
|
service Notifier {
|
|
|
|
rpc NotifyUser(NotifyUserRequest) returns (NotifyResponse) {}
|
2024-07-17 05:45:12 +00:00
|
|
|
rpc NotifyUserBatch(NotifyUserBatchRequest) returns (NotifyResponse) {}
|
2024-07-15 14:20:37 +00:00
|
|
|
rpc NotifyAllUser(NotifyRequest) returns(NotifyResponse) {}
|
|
|
|
}
|
|
|
|
|
|
|
|
message NotifyUserRequest {
|
|
|
|
uint64 user_id = 1;
|
|
|
|
NotifyRequest notify = 2;
|
|
|
|
}
|
|
|
|
|
2024-07-17 05:45:12 +00:00
|
|
|
message NotifyUserBatchRequest {
|
|
|
|
repeated uint64 user_id = 1;
|
|
|
|
NotifyRequest notify = 2;
|
|
|
|
}
|
|
|
|
|
2024-07-15 14:20:37 +00:00
|
|
|
message NotifyRequest {
|
2024-07-15 15:45:26 +00:00
|
|
|
string topic = 1;
|
|
|
|
string title = 2;
|
|
|
|
optional string subtitle = 3;
|
|
|
|
string body = 4;
|
|
|
|
bytes metadata = 5;
|
2024-07-19 15:30:55 +00:00
|
|
|
optional string avatar = 6;
|
|
|
|
optional string picture = 7;
|
|
|
|
bool is_realtime = 8;
|
|
|
|
bool is_force_push = 9;
|
2024-07-15 14:20:37 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
message NotifyResponse {
|
|
|
|
bool is_success = 1;
|
|
|
|
int64 affected_count = 2;
|
|
|
|
}
|