-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat: platform-data部分以及platform-api部分新增auth (#9)
* 定义了用于埋点的data的rpc接口 * fix : 修正了插入接口的定义,以便于可以批量处理 * fix : 修正了插入接口的定义,以便于可以批量处理 * debug : 将data服务大写成Data避免奇怪的错误 * debug : 将data修改成DataService避免包名冲突 * fix : 添加了data api 的proto定义 * fix : 修正了api定义的结构 * fix : api中tags改为string * feat: 增加open-platform部分的proto文件 * feat: 在platform-core_api添加了auth相关接口 * fix: 修改了idl-gen-go仓库中的kitex版本不匹配问题 * fix: try-again * fix: 将以api命名的修改为core_api以符合makefile * fix: auth相关接口添加前缀/platform以适应路由
- Loading branch information
1 parent
adf2516
commit 92ed7be
Showing
5 changed files
with
137 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,19 @@ | ||
syntax = "proto3"; | ||
|
||
package open_platform.user; | ||
|
||
option go_package="open_platform/core_api"; | ||
option java_package = "com.xhpolaris.idlgen.open_platform.core_api"; | ||
option java_outer_classname = "UserProto"; | ||
option java_multiple_files = true; | ||
|
||
// 账号密码注册请求 | ||
message PasswordSignUpReq{ | ||
|
||
} | ||
|
||
// 账号密码注册响应 | ||
message PasswordSignUpResp{ | ||
|
||
} | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,40 @@ | ||
syntax = "proto3"; | ||
|
||
package platform.core_api; | ||
|
||
option go_package = "platform/core_api"; | ||
option java_package = "com.xhpolaris.idlgen.platform.core_api"; | ||
option java_outer_classname = "AuthProto"; | ||
option java_multiple_files = true; | ||
|
||
import "basic/app.proto"; | ||
|
||
message SignInReq { | ||
string authType = 1; | ||
string authId = 2; // authType为邮件时填邮箱,为电话时填电话号,为微信时填APP_ID | ||
optional string password = 3; | ||
optional string verifyCode = 4; | ||
basic.APP appId = 5; | ||
string deviceId = 6; | ||
} | ||
|
||
message SignInResp { | ||
string userId = 1; | ||
string accessToken = 2; | ||
int64 accessExpire = 3; | ||
} | ||
|
||
message SetPasswordReq { | ||
string password = 1; | ||
} | ||
|
||
message SetPasswordResp { | ||
} | ||
|
||
message SendVerifyCodeReq { | ||
string authType = 1; | ||
string authId = 2; // authType为邮件时填邮箱,为电话时填电话号 | ||
} | ||
|
||
message SendVerifyCodeResp { | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,31 @@ | ||
syntax = "proto3"; | ||
|
||
package platform.core_api; | ||
|
||
option go_package = "platform/core_api"; | ||
option java_package = "com.xhpolaris.idlgen.platform.core_api"; | ||
option java_outer_classname = "CoreApiProto"; | ||
option java_multiple_files = true; | ||
|
||
import "http/http.proto"; | ||
import "platform/core_api/data.proto"; | ||
import "platform/core_api/auth.proto"; | ||
|
||
service data { | ||
rpc ReportEvent(ReportEventRequest) returns (ReportEventResponse) { | ||
option(http.post) = "/platform/report_event"; | ||
} | ||
} | ||
|
||
service auth { | ||
rpc SignIn (SignInReq) returns (SignInResp){ | ||
option (http.post) = "/platform/auth/sign_in"; | ||
} | ||
rpc SendVerifyCode(SendVerifyCodeReq) returns (SendVerifyCodeResp){ | ||
option (http.post) = "/platform/auth/send_verify_code"; | ||
} | ||
rpc SetPassword(SetPasswordReq) returns (SetPasswordResp){ | ||
option(http.post) = "/platform/auth/set_password"; | ||
} | ||
} | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,22 @@ | ||
syntax = "proto3"; | ||
|
||
package platform.core_api; | ||
|
||
option go_package = "platform/core_api"; | ||
option java_package = "com.xhpolaris.idlgen.platform.core_api"; | ||
option java_outer_classname = "CoreApiProto"; | ||
option java_multiple_files = true; | ||
|
||
message ReportEventItem { | ||
string eventName = 1; | ||
string tags = 2; | ||
} | ||
|
||
|
||
message ReportEventRequest { | ||
repeated ReportEventItem data = 1; | ||
} | ||
|
||
message ReportEventResponse { | ||
bool done = 1; | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,25 @@ | ||
syntax = "proto3"; | ||
|
||
package platform.data; | ||
|
||
option go_package = "platform/data"; | ||
option java_package = "com.xhpolaris.idlgen.platform.data"; | ||
option java_outer_classname = "DataProto"; | ||
option java_multiple_files = true; | ||
|
||
message Document { | ||
string event_name = 1; | ||
string tags = 2; | ||
} | ||
|
||
message InsertReq{ | ||
repeated Document documents = 1; | ||
} | ||
|
||
message InsertResp { | ||
bool done = 1; | ||
} | ||
|
||
service DataService { | ||
rpc Insert(InsertReq) returns (InsertResp); | ||
} |