Dealer/pkg/proto/notify.proto
2024-07-15 23:45:26 +08:00

29 lines
515 B
Protocol Buffer

syntax = "proto3";
option go_package = ".;proto";
package proto;
service Notifier {
rpc NotifyUser(NotifyUserRequest) returns (NotifyResponse) {}
rpc NotifyAllUser(NotifyRequest) returns(NotifyResponse) {}
}
message NotifyUserRequest {
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;
}
message NotifyResponse {
bool is_success = 1;
int64 affected_count = 2;
}