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.
30 lines
598 B
30 lines
598 B
2 years ago
|
syntax = "proto3";
|
||
|
|
||
|
package api.verifyCode;
|
||
|
// 生成的go代码所在的包
|
||
|
option go_package = "verifyCode/api/verifyCode;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;
|
||
|
}
|