-
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.
- Loading branch information
Showing
4 changed files
with
152 additions
and
36 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 cloudmind.core_api; | ||
option go_package = "cloudmind/core_api"; | ||
import "cloudmind/user/common.proto"; | ||
import "basic/pagination.proto"; | ||
|
||
message SearchUserReq{ | ||
oneof searchOption { | ||
string name = 1; | ||
string userId = 2; | ||
} | ||
optional basic.PaginationOptions paginationOptions = 3; | ||
} | ||
|
||
message SearchUserResp{ | ||
repeated user.User users = 1; | ||
int32 total = 2; | ||
} | ||
|
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,99 @@ | ||
syntax = "proto3"; | ||
package cloudmind.sts; | ||
option go_package = "cloudmind/sts"; | ||
|
||
message Auth { | ||
string id = 1; | ||
int32 type = 2; | ||
string key = 3; | ||
string userId = 4; | ||
int32 role = 5; | ||
string Password = 6; | ||
} | ||
|
||
enum AuthType { | ||
UnKnown = 0; | ||
email = 1; | ||
qq = 2; | ||
wechat = 3; | ||
} | ||
message EmailOptions { | ||
string email = 1; | ||
string code = 2; | ||
} | ||
|
||
message UserIdOptions{ | ||
string userId = 1; | ||
string password = 2; | ||
} | ||
|
||
|
||
message Point { | ||
int32 x = 1; | ||
int32 y = 2; | ||
} | ||
|
||
message SendEmailReq { | ||
string email = 1; | ||
string subject = 2; | ||
} | ||
|
||
message SendEmailResp { | ||
string error = 2; | ||
} | ||
|
||
message CreateCaptchaReq{ | ||
} | ||
|
||
message CreateCaptchaResp{ | ||
string originalImageBase64 = 1; | ||
string jigsawImageBase64 = 2; | ||
string key = 3; | ||
string error = 4; | ||
} | ||
|
||
message CheckCaptchaReq{ | ||
Point point = 1; | ||
string key = 2; | ||
} | ||
|
||
message CheckCaptchaResp{ | ||
string error = 1; | ||
} | ||
|
||
message SetPasswordReq{ | ||
oneof Key { | ||
UserIdOptions userIdOptions = 1; | ||
EmailOptions emailOptions = 2; | ||
} | ||
string password = 3; | ||
} | ||
message SetPasswordResp{ | ||
string error = 1; | ||
} | ||
|
||
message CheckEmailReq{ | ||
string email = 1; | ||
string code = 2; | ||
} | ||
|
||
message CheckEmailResp{ | ||
string error = 1; | ||
} | ||
|
||
message AddAuthReq{ | ||
Auth auth = 1; | ||
} | ||
|
||
message AddAuthResp{ | ||
string error = 1; | ||
} | ||
|
||
service StsService { | ||
rpc CreateCaptcha(CreateCaptchaReq) returns(CreateCaptchaResp); | ||
rpc CheckCaptcha(CheckCaptchaReq) returns(CheckCaptchaResp); | ||
rpc SetPassword(SetPasswordReq) returns(SetPasswordResp); | ||
rpc SendEmail(SendEmailReq) returns(SendEmailResp); | ||
rpc CheckEmail(CheckEmailReq) returns(CheckEmailResp); | ||
rpc AddAuth(AddAuthReq) returns(AddAuthResp); | ||
} |
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 cloudmind.user; | ||
option go_package = "cloudmind/user"; | ||
|
||
message User { | ||
string userId = 1; | ||
string name = 2; | ||
string url = 3; | ||
} | ||
|
||
message UserDetail { | ||
string userId = 1; | ||
string email = 2; | ||
string name = 3; | ||
int32 sex = 4; | ||
string fullName = 5; | ||
string idCard = 6; | ||
int64 createdAt = 7; | ||
int64 updatedAt = 8; | ||
string description = 9; | ||
string url = 10; | ||
} |
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