syntax = "proto3"; package api.account; import "google/api/annotations.proto"; import "api/common/common.proto"; //import "api/base/base.proto"; //import "google/protobuf/struct.proto"; import "google/protobuf/empty.proto"; option go_package = "git.ikuban.com/server/pw-protobuf/api/account;account"; option java_multiple_files = true; option java_package = "api.account"; service Account { rpc DebugLogin (DebugLoginRequest) returns (TokenReply){ option (google.api.http) = { post: "/api/login/debug", body:"*" }; }; rpc Authorization (AuthorizationRequest) returns (TokenReply){ option (google.api.http) = { post: "/api/login/authorization", body:"*" }; }; rpc RandomNickname (common.SexReq) returns (RandomNicknameReply){ option (google.api.http) = { post: "/api/common/random/nickname", body:"*" }; }; rpc RandomAvatar (common.SexReq) returns (RandomAvatarReply){ option (google.api.http) = { post: "/api/common/random/avatar", body:"*" }; }; rpc RandomAvatarList (common.SexReq) returns (RandomAvatarListReply){}; // 通过openID和appID查询 rpc GetIdentityByOpenIDAndAppID (OpenIDAndAppIDRequest) returns (IdentityInfo); // 通过type和PID查询 rpc GetIdentityByTypeAndPID (common.PersonParam) returns (IdentityInfo); // 通过原公众号openID和appID查询 rpc GetIdentityByFromOpenIDAndAppID (OpenIDAndAppIDRequest) returns (IdentityInfo); // 通过分组名和性别查询标签 rpc FindTagListBySex (common.SexReq) returns (common.TagListReply); // 通过标签IDs查询标签 rpc FindTagsByIDs (common.Ids) returns (common.TagListReply); // 随机介绍接口 rpc RandomIntroduce (common.SexReq) returns (common.RandomIntroduceReply){ option (google.api.http) = { post: "/api/common/random/introduce", body:"*" }; }; // 通过微信下载语音并上传到七牛 rpc UploadMaterialVoice (MediaID) returns (MaterialLink){ option (google.api.http) = { post: "/api/common/material/upload/voice", body:"*" }; }; // 通过类型获取表情包列表 rpc FindMemeByType (common.MemeRequest) returns (common.MemeList){}; // 获取对方性别的聊天话题 rpc FindChatTopic (common.FindChatTopicRequest) returns (common.ChatTopicList){}; // 随机表情包 rpc RandomMeme (common.RandomNum) returns (common.CommonTextList){}; // 随机打招呼 rpc RandomSwiftMessage (common.RandomNumAndSex) returns (common.CommonTextList){}; // 创建纸条 rpc CreateScrip (CreateScripRequest) returns (ScripID){}; // 删除纸条 rpc DeleteScrip (DeleteScripRequest) returns (google.protobuf.Empty){}; // 查询自己的小纸条 rpc FindMyScrip (FindScripRequest) returns (ScripReply){}; // 查询随机纸条列表 rpc FindRecommendScrip (FindScripRequest) returns (ScripReply){}; // 用户查看纸条 rpc PersonLookScrip (PersonLookScripRequest) returns (google.protobuf.Empty){}; // 用户点击回看 rpc PersonClickLookBack (common.PersonParam) returns (ScripInfo){}; } message PersonLookScripRequest{ string personId = 1; string personType = 2; int64 scripId = 3;// 纸条id } message FindScripRequest { string personId = 1; string personType = 2; int64 nextId = 3; int64 offset = 4; } message ScripReply { repeated ScripInfo list = 1; int64 nextId = 2; } message ScripInfo { string personId = 1;// 创建者ID string personType = 2;// 创建者类型 string text = 3;// 纸条内容 string pictureUrl = 4;// 纸条配图 string personName = 5;// 创建者名称 int64 personSex = 6;// 创建者性别 string personAvatar = 7;// 创建者头像 int64 createTime = 8;// 创建时间 } message DeleteScripRequest { int64 id = 1; string personId = 2; string personType = 3; } message CreateScripRequest { string personId = 1; string personType = 2; string text = 3; string pictureUrl = 4; } message ScripID { int64 id = 1; } message MediaID{ string mediaId = 1; } message MaterialLink { string link = 1; } message RandomNicknameReply{ string nickname = 1; } message RandomAvatarReply{ string avatarUrl = 1; } message RandomAvatarListReply{ repeated string list = 1; } message OpenIDAndAppIDRequest{ string openId = 1; string appId = 2; } message IdentityInfo{ string pid = 1; string type = 2; int64 identityID = 3; string openId = 4; } message UserInfoDB{ string id = 1; // id string nickname = 2;// 昵称 string avatarUrl =3;// 头像链接 string phone = 4;// 手机号 int64 sex = 5;// 性别 int64 credit = 6;// 积分 } message PartnerInfoDB{ string id = 1; // id string nickname = 2;// 昵称 string avatarUrl =3;// 头像链接 string phone = 4;// 手机号 int64 sex = 5;// 性别 int64 credit = 6;// 积分 } message AuthorizationRequest { string jsCode = 1; string appId = 2; string type = 3; string fromOpenId = 4; } message TokenReply { string token = 1; string appId = 2; } message DebugLoginRequest { int64 id = 1; string code = 2; } message LoginToken { string pid = 1; string type = 2; }