Passport/pkg/proto/notify.proto
2024-10-31 21:26:25 +08:00

33 lines
720 B
Protocol Buffer

syntax = "proto3";
option go_package = ".;proto";
package proto;
service NotifyService {
rpc NotifyUser(NotifyUserRequest) returns (NotifyResponse) {}
rpc NotifyUserBatch(NotifyUserBatchRequest) returns (NotifyResponse) {}
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;
}
message NotifyUserRequest {
uint64 user_id = 1;
NotifyInfo notify = 2;
}
message NotifyUserBatchRequest {
repeated uint64 user_id = 1;
NotifyInfo notify = 2;
}
message NotifyResponse {
bool is_success = 1;
}