You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
47 lines
885 B
47 lines
885 B
syntax = "proto3";
|
|
|
|
package api;
|
|
|
|
import "google/api/annotations.proto";
|
|
option go_package = "bkb-notify/api";
|
|
|
|
|
|
// The Email service definition.
|
|
service Sms {
|
|
// 发送一条短信
|
|
rpc SendMessage (SendSmsRequest) returns (SendSmsReply) {
|
|
option (google.api.http) = {
|
|
post: "sms/send"
|
|
body: "*"
|
|
};
|
|
}
|
|
// 校验短信code
|
|
rpc VerifyCode (SmsCodeVerifyRequest) returns (SendSmsReply) {
|
|
option (google.api.http) = {
|
|
post: "sms/code-verify"
|
|
body: "*"
|
|
};
|
|
}
|
|
}
|
|
|
|
message SendSmsRequest {
|
|
//手机号码,必填
|
|
string phone=1;
|
|
//短信场景值 1,2,3,4
|
|
int32 smsType=2;
|
|
//国际区号 86 中国 1美国
|
|
string areaCode = 3;
|
|
}
|
|
|
|
// 短信发送回复
|
|
message SendSmsReply {
|
|
int32 code = 1;
|
|
string message = 2;
|
|
}
|
|
|
|
message SmsCodeVerifyRequest {
|
|
//手机号码,必填
|
|
string phone=1;
|
|
//短信验证码
|
|
string code=2;
|
|
}
|