Passport/pkg/proto/notify.proto

33 lines
748 B
Protocol Buffer
Raw Normal View History

syntax = "proto3";
option go_package = ".;proto";
package proto;
service NotifyService {
rpc NotifyUser(NotifyUserRequest) returns (NotifyResponse) {}
rpc NotifyUserBatch(NotifyUserBatchRequest) returns (NotifyResponse) {}
2024-10-31 14:40:10 +00:00
rpc NotifyAllUser(NotifyInfoPayload) returns(NotifyResponse) {}
}
2024-10-31 14:40:10 +00:00
message NotifyInfoPayload {
// 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;
2024-10-31 14:40:10 +00:00
NotifyInfoPayload notify = 2;
}
message NotifyUserBatchRequest {
repeated uint64 user_id = 1;
2024-10-31 14:40:10 +00:00
NotifyInfoPayload notify = 2;
}
message NotifyResponse {
bool is_success = 1;
}