2024-08-20 06:35:14 +00:00
|
|
|
syntax = "proto3";
|
|
|
|
|
|
|
|
package notification;
|
|
|
|
|
|
|
|
option go_package="./notification";
|
|
|
|
|
|
|
|
// OKResp
|
|
|
|
message OKResp {}
|
|
|
|
// NoneReq
|
|
|
|
message NoneReq {}
|
|
|
|
|
|
|
|
message SendMailReq {
|
|
|
|
string to = 1;
|
|
|
|
string subject = 2;
|
|
|
|
string body = 3;
|
2024-08-20 13:08:00 +00:00
|
|
|
string from =4;
|
2024-08-20 06:35:14 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
message SendSMSReq {
|
|
|
|
string to = 1;
|
|
|
|
string body = 2;
|
2024-08-20 13:08:00 +00:00
|
|
|
string recipient_name=3;
|
2024-08-20 06:35:14 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
message SendByTemplateIDReq {
|
|
|
|
string to = 1;
|
|
|
|
string template_id =2;
|
|
|
|
string lang=3;
|
|
|
|
map<string, string> content_data = 4;
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
service SenderService {
|
|
|
|
// SendMail 寄信
|
|
|
|
rpc SendMail(SendMailReq) returns(OKResp);
|
2024-08-20 13:08:00 +00:00
|
|
|
// SendSms 寄簡訊
|
2024-08-20 06:35:14 +00:00
|
|
|
rpc SendSms(SendSMSReq) returns(OKResp);
|
2024-08-20 13:08:00 +00:00
|
|
|
// SendMailByTemplateId 寄送模板信件
|
2024-08-20 06:35:14 +00:00
|
|
|
rpc SendMailByTemplateId(SendByTemplateIDReq) returns(OKResp);
|
2024-08-20 13:08:00 +00:00
|
|
|
// SendSmsByTemplateId 寄送模板簡訊
|
2024-08-20 06:35:14 +00:00
|
|
|
rpc SendSmsByTemplateId(SendByTemplateIDReq) returns(OKResp);
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|