syntax = “proto3”;
option java_multiple_files = true; option java_package = “io.grpc.examples.helloworld”; option java_outer_classname = “HelloWorldProto”; option objc_class_prefix = “HLW”;
package atyun;
// 短信和邮件服务 service notification {
//阿里云短信 rpc SendAliSms (AliSmsRequest) returns (AliSmsReply){ } //sendcloud 短信 rpc SendSendCloudSms (SendCloudSmsRequest) returns (SendCloudSmsReply){ } //sendcloud 邮件 rpc SendSendCloudEmail (SendCloudEmailRequest) returns (SendCloudEmailReply) { }
}
message AliSmsRequest {
string access_key_secret = 1; string access_key_id = 2; string sign_name = 3; string phone = 4; string template_code = 5; string content = 6;
}
message AliSmsReply {
NotificationStatus status = 1;
}
message NotificationStatus{
string code = 1; string message = 2;
}
message SendCloudEmailRequest{
string to = 1; string api_user = 2; string api_key = 3; string from = 4; string from_name = 5; string subject = 6; string html = 7;
}
message SendCloudEmailReply{
NotificationStatus status = 1;
}
message SendCloudSmsRequest{
string url = 1; string u = 2; string p = 3; string phone = 4; string content = 5; string template_id = 6; string msg_type = 7;
}
message SendCloudSmsReply{
NotificationStatus status = 1;
}