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.
31 lines
524 B
31 lines
524 B
syntax = "proto3";
|
|
|
|
package api.verifyCode;
|
|
|
|
option go_package = "verifyCode/api/verifyCode;verifyCode";
|
|
|
|
|
|
service VerifyCode {
|
|
rpc GetVerifyCode (GetVerifyCodeRequest) returns (GetVerifyCodeReply);
|
|
}
|
|
|
|
enum TYPE {
|
|
DEFAULT = 0;
|
|
DIGIT = 1;
|
|
LETTER = 2;
|
|
MIXED = 3;
|
|
}
|
|
// 定义 GetVerifyCodeRequest 消息
|
|
message GetVerifyCodeRequest {
|
|
// 验证码长度
|
|
uint32 length = 1;
|
|
// 验证码类型
|
|
TYPE type = 2;
|
|
|
|
}
|
|
// 定义 GetVerifyCodeReply 消息
|
|
message GetVerifyCodeReply {
|
|
// 生成的验证码
|
|
string code = 1;
|
|
}
|