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) {}
|
2024-10-31 13:26:25 +00:00
|
|
|
rpc NotifyAllUser(NotifyInfo) returns(NotifyResponse) {}
|
|
|
|
}
|
|
|
|
|
|
|
|
message NotifyInfo {
|
|
|
|
// This bytes is directly encoded from pushkit.Notification
|
|
|
|
// Which is passed to the pusher service, we don't need to care about the content
|
|
|
|
bytes data = 1;
|
|
|
|
bool unsaved = 2;
|
2024-10-23 16:13:16 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
message NotifyUserRequest {
|
|
|
|
uint64 user_id = 1;
|
2024-10-31 13:26:25 +00:00
|
|
|
NotifyInfo notify = 2;
|
2024-10-23 16:13:16 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
message NotifyUserBatchRequest {
|
|
|
|
repeated uint64 user_id = 1;
|
2024-10-31 13:26:25 +00:00
|
|
|
NotifyInfo notify = 2;
|
2024-10-23 16:13:16 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
message NotifyResponse {
|
|
|
|
bool is_success = 1;
|
|
|
|
}
|