syntax = "proto3"; package user; option go_package="lone-services/rpc/user"; import "google/api/annotations.proto"; message Response { int32 code = 1; string msg = 2; string data = 3; } message LoginReq { string client_code = 1; string grant_type = 2; string code = 3; string mobile = 4; string password = 5; string sms_code = 6; } message UserItemsReq { string mobile = 1; int32 page = 2; int32 size = 3; } message UserStatusReq { int64 id = 1; int32 status = 2; } message InternalCreateReq { string mobile = 1; string name = 2; string avatar = 3; uint32 gender = 4; string birthday = 5; repeated string client_code = 6; repeated string credential_type = 7; string identifier = 8; string secret = 9; int64 biz_id = 10; } message InternalCreateData { int64 user_id = 1; bool created = 2; string mobile = 3; string name = 4; } message InternalUsersByIdsReq { repeated int64 ids = 1; } message UserBriefItem { int64 id = 1; string mobile = 2; string name = 3; string avatar = 4; uint32 gender = 5; string birthday = 6; uint32 status = 7; } message InternalUsersByIdsData { repeated UserBriefItem items = 1; } message InternalUpdateMobileReq { int64 user_id = 1; string mobile = 2; } message InternalUpdateMobileData { int64 user_id = 1; string mobile = 2; } message InternalRevokeBizClientReq { int64 user_id = 1; string client_code = 2; } message InternalRevokeBizClientData { bool revoked = 1; } message InternalCheckCreateReq { string mobile = 1; } message InternalCheckCreateData { bool result = 1; } message InternalCheckUpdateReq { int64 biz_id = 1; string mobile = 2; string subject_type = 3; } message InternalCheckUpdateData { bool result = 1; } message InternalUpdateReq { string mobile = 2; string name = 3; string avatar = 4; uint32 gender = 5; string birthday = 6; repeated string client_code = 7; repeated string credential_type = 8; string identifier = 9; string secret = 10; int64 biz_id = 11; string subject_type = 12; } message InternalUpdateData { int64 user_id = 1; string mobile = 2; string name = 3; } message InternalGetUserInfoReq { int64 user_id = 1; string credential_type = 2; string subject_type = 3; } message InternalGetUserInfoData { int64 id = 1; string mobile = 2; string name = 3; string avatar = 4; uint32 gender = 5; string birthday = 6; uint32 status = 7; string identifier = 8; string credential_type = 9; } message GetOpenidReq { string code = 1; } message InfoReq {} message PasswordReq { string old_password = 1; string password = 2; } message ClientReq { string name = 1; string type = 2; uint32 subject_type = 3; } service User { rpc Login(LoginReq) returns (Response) { option (google.api.http) = { post: "/api/v3/login" body: "*" }; } rpc Info(InfoReq) returns (Response) { option (google.api.http) = { get: "/api/v3/user/info" body: "*" }; } rpc Password(PasswordReq) returns (Response) { option (google.api.http) = { put: "/api/v3/user/password" body: "*" }; } rpc GetOpenid(GetOpenidReq) returns (Response) { option (google.api.http) = { post: "/api/v3/getuseroid" body: "*" }; } rpc Client(ClientReq) returns (Response) { option (google.api.http) = { get: "/admin/v3/user/client" body: "*" }; } rpc UserItems(UserItemsReq) returns (Response) { option (google.api.http) = { get: "/admin/v3/user/items" body: "*" }; } rpc UserStatus(UserStatusReq) returns (Response) { option (google.api.http) = { put: "/admin/v3/user/status" body: "*" }; } rpc InternalCreate(InternalCreateReq) returns (InternalCreateData); rpc InternalCheckCreate(InternalCheckCreateReq) returns (InternalCheckCreateData); rpc InternalCheckUpdate(InternalCheckUpdateReq) returns (InternalCheckUpdateData); rpc InternalUpdate(InternalUpdateReq) returns (InternalUpdateData); rpc InternalUsersByIds(InternalUsersByIdsReq) returns (InternalUsersByIdsData); rpc InternalUpdateMobile(InternalUpdateMobileReq) returns (InternalUpdateMobileData); rpc InternalRevokeBizClient(InternalRevokeBizClientReq) returns (InternalRevokeBizClientData); rpc InternalGetUserInfo(InternalGetUserInfoReq) returns (InternalGetUserInfoData); }