This commit is contained in:
yanweidong 2024-02-22 15:55:49 +08:00
parent e923d85241
commit 7c011b27ff
2 changed files with 1 additions and 135 deletions

134
gen.proto
View File

@ -1,134 +0,0 @@
syntax = "proto3";
package passport;
option go_package = "./passport";
// D:\work\bsm\bsm-tools\merge\proto\a.proto START
// Passport--
service Login{
//
rpc Pwd(LoginByPwdRequest) returns (LoginReply) {}
//
rpc Code(LoginByCodeRequest) returns (LoginReply) {}
// Wechat登录
rpc WeChatByCode(WeChatByCodeRequest) returns (WeChatByCodeReply) {}
rpc WeChatByPhone(WeChatByPhoneRequest) returns (WeChatByPhoneReply) {}
rpc WeChatGetUserinfo(WeChatByPhoneRequest) returns (WeChatGetUserinfoReply) {}
// AppleID登录
rpc AppleID(LoginByAppleIDRequest) returns (LoginReply) {}
//
rpc CodeAndRegister(LoginByCodeRequest) returns (LoginReply) {}
}
message LoginByPwdRequest {
string account = 1; //
string password = 2; //
string device = 3; //
}
message LoginByCodeRequest {
string country = 1; //
string phone = 2; //
string code = 3; //
string device = 4;//
}
message WeChatByCodeRequest {
string code = 1; // WeChat code
int64 agency_id=2; // ID
int64 staff_id=3; // ID
}
message WeChatByPhoneReply {
string account = 1; // WeChat code
}
message WeChatByCodeReply {
string session_key = 1; // WeChat session key
string open_id = 2; // WeChat open id
string identity = 3; // identity
string account = 4; // account
}
message WeChatByPhoneRequest {
string session_key = 1; // WeChat session key
string open_id = 2; // open_id
string data = 3; // data
string iv = 4; // iv
string identity = 5; // identiy
}
message WeChatGetUserinfoReply {
int64 id=1;
string account=2;
string identity=3;
string nickname=4;
string avatar=5;
string rights=6;
string token=7;
}
message LoginByAppleIDRequest {
string apple_id = 1; // apple id
string desc = 2; //
string device = 3;//
}
message LoginReply {
string identity = 1; //
string data_bind = 2; // ,PASS通过NOPHONE没有绑定手机号NOPWD没有设置密码NOBIND没有手机号同时没有密码
string token = 3; //
map<string, string> extend = 4; //
}
// END
// D:\work\bsm\bsm-tools\merge\proto\b.proto START
// Passport--
service Register{
//
rpc Pwd(RegisterRequest) returns (RegisterReply) {}
//
rpc Code(RegisterRequest) returns (RegisterReply) {}
// Wechat注册
rpc WeChat(RegisterRequest) returns (RegisterReply) {}
// AppleID注册
rpc AppleID(RegisterRequest) returns (RegisterReply) {}
}
message RegisterRequest {
string origin = 1; //
string account = 2; //
string phone = 3; //
string password = 4; //
string code = 5; //
string wechat_union_id = 6; //UnionID
string wechat_open_id = 7; //OpenID
string apple_id = 8; //Apple ID
string nickname = 9; //
string type = 10; //
string device = 11; //
int64 agency_id=12; // ID
int64 staff_id=13; // ID
}
message RegisterReply {
string identity = 1; //
string data_bind = 2; // ,PASS通过NOPHONE没有绑定手机号NOPWD没有设置密码NOBIND没有手机号同时没有密码
string token = 3; //Header所需Token
map<string, string> extend = 4; //
}
// END

2
go.mod
View File

@ -1,3 +1,3 @@
module git.apinb.com/bsm-tools/proto-merge
go 1.21.0
go 1.22.0