mirror of
				https://github.com/TeaOSLab/EdgeCommon.git
				synced 2025-11-04 05:00:24 +08:00 
			
		
		
		
	
		
			
				
	
	
		
			50 lines
		
	
	
		
			1.4 KiB
		
	
	
	
		
			Protocol Buffer
		
	
	
	
	
	
			
		
		
	
	
			50 lines
		
	
	
		
			1.4 KiB
		
	
	
	
		
			Protocol Buffer
		
	
	
	
	
	
syntax = "proto3";
 | 
						|
option go_package = "./pb";
 | 
						|
 | 
						|
package pb;
 | 
						|
 | 
						|
import "models/model_user_mobile_verification.proto";
 | 
						|
 | 
						|
// 用户手机号码认证服务
 | 
						|
service UserMobileVerificationService {
 | 
						|
	// 认证手机号码
 | 
						|
	rpc verifyUserMobile(VerifyUserMobileRequest) returns (VerifyUserMobileResponse);
 | 
						|
 | 
						|
	// 发送手机号码认证
 | 
						|
	rpc sendUserMobileVerification(SendUserMobileVerificationRequest) returns (SendUserMobileVerificationResponse);
 | 
						|
 | 
						|
	// 查找用户正在等待激活的认证
 | 
						|
	rpc findLatestUserMobileVerification(FindLatestUserMobileVerificationRequest) returns (FindLatestUserMobileVerificationResponse);
 | 
						|
}
 | 
						|
 | 
						|
// 认证手机号码
 | 
						|
message VerifyUserMobileRequest {
 | 
						|
	string mobile = 1; // 手机号
 | 
						|
	string code = 2; // 激活码
 | 
						|
}
 | 
						|
 | 
						|
message VerifyUserMobileResponse {
 | 
						|
	int64 userId = 1; // 手机号码对应的用户ID
 | 
						|
	string mobile = 2; // 手机号码
 | 
						|
	string errorCode = 3; // 错误代号,如果为空,说明没有错误
 | 
						|
	string errorMessage = 4; // 错误信息
 | 
						|
}
 | 
						|
 | 
						|
// 发送手机号码认证
 | 
						|
message SendUserMobileVerificationRequest {
 | 
						|
	string mobile = 1; // 待验证手机号码
 | 
						|
}
 | 
						|
 | 
						|
message SendUserMobileVerificationResponse {
 | 
						|
	bool isOk = 1; // 是否发送成功
 | 
						|
	string errorCode = 2; // 错误代号
 | 
						|
}
 | 
						|
 | 
						|
// 查找用户正在等待激活的认证
 | 
						|
message FindLatestUserMobileVerificationRequest {
 | 
						|
 | 
						|
}
 | 
						|
 | 
						|
message FindLatestUserMobileVerificationResponse {
 | 
						|
	UserMobileVerification userMobileVerification = 1;
 | 
						|
} |