basics.proto 2.2 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576
  1. syntax = "proto3";
  2. package api.basics;
  3. import "google/api/annotations.proto";
  4. //import "google/protobuf/struct.proto";
  5. //import "google/protobuf/empty.proto";
  6. import "api/common/common.proto";
  7. option go_package = "git.ikuban.com/server/pw-protobuf/api/basics;basics";
  8. option java_multiple_files = true;
  9. option java_package = "api.basics";
  10. service Basics {
  11. rpc RandomNickname (common.SexReq) returns (RandomNicknameReply){
  12. option (google.api.http) = {
  13. post: "/api/common/random/nickname",
  14. body:"*"
  15. };
  16. };
  17. rpc RandomAvatar (common.SexReq) returns (RandomAvatarReply){
  18. option (google.api.http) = {
  19. post: "/api/common/random/avatar",
  20. body:"*"
  21. };
  22. };
  23. // 随机介绍接口
  24. rpc RandomIntroduce (common.SexReq) returns (common.RandomIntroduceReply){
  25. option (google.api.http) = {
  26. post: "/api/common/random/introduce",
  27. body:"*"
  28. };
  29. };
  30. rpc BannerConf (BannerConfRequest) returns (BannerConfReply){
  31. option (google.api.http) = {
  32. post: "/api/common/config/withoutauth/banner",
  33. body:"*"
  34. };
  35. };
  36. // 随机头像列表
  37. rpc RandomAvatarList (common.SexReq) returns (RandomAvatarListReply){};
  38. // 通过分组名和性别查询标签
  39. rpc FindTagListBySex (common.SexReq) returns (common.TagListReply);
  40. // 通过标签IDs查询标签
  41. rpc FindTagsByIDs (common.Ids) returns (common.TagListReply);
  42. // 通过类型获取表情包列表
  43. rpc FindMemeByType (common.MemeRequest) returns (common.MemeList){};
  44. // 获取对方性别的聊天话题
  45. rpc FindChatTopic (common.FindChatTopicRequest) returns (common.ChatTopicList){};
  46. // 随机表情包
  47. rpc RandomMeme (common.RandomNum) returns (common.CommonTextList){};
  48. // 随机打招呼
  49. rpc RandomSwiftMessage (common.RandomNumAndSex) returns (common.CommonTextList){};
  50. }
  51. message BannerConfRequest{
  52. string type = 1;
  53. }
  54. message BannerConfReply{
  55. bool isOpen = 1;// 是否开启
  56. string linkUrl = 2;// 链接
  57. string pictureUrl = 3;// 图片
  58. }
  59. message RandomNicknameReply{
  60. string nickname = 1;
  61. }
  62. message RandomAvatarReply{
  63. string avatarUrl = 1;
  64. }
  65. message RandomAvatarListReply{
  66. repeated string list = 1;
  67. }