slowwildserver.go 15 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317
  1. // Code generated by goctl. DO NOT EDIT.
  2. // Source: slowwild.proto
  3. package slowwildserverclient
  4. import (
  5. "context"
  6. "git.banshen.xyz/huangguangrong/slow_wild_protobuff/slowwild/slowwildserver"
  7. "github.com/zeromicro/go-zero/zrpc"
  8. "google.golang.org/grpc"
  9. )
  10. type (
  11. CommentDeleteReq = slowwildserver.CommentDeleteReq
  12. CommentDeleteRsp = slowwildserver.CommentDeleteRsp
  13. CommentItem = slowwildserver.CommentItem
  14. CreatePostReq = slowwildserver.CreatePostReq
  15. CreatePostRsp = slowwildserver.CreatePostRsp
  16. CreateTag = slowwildserver.CreateTag
  17. FindUserReq = slowwildserver.FindUserReq
  18. FindUserResp = slowwildserver.FindUserResp
  19. FollowUserInfo = slowwildserver.FollowUserInfo
  20. FollowUserReq = slowwildserver.FollowUserReq
  21. FollowUserRes = slowwildserver.FollowUserRes
  22. GetFollowReq = slowwildserver.GetFollowReq
  23. GetFollowRes = slowwildserver.GetFollowRes
  24. GetFollowingReq = slowwildserver.GetFollowingReq
  25. GetFollowingRes = slowwildserver.GetFollowingRes
  26. GetPostCommentListReq = slowwildserver.GetPostCommentListReq
  27. GetPostCommentListRsp = slowwildserver.GetPostCommentListRsp
  28. GetPostListItem = slowwildserver.GetPostListItem
  29. GetPostListReq = slowwildserver.GetPostListReq
  30. GetPostListRsp = slowwildserver.GetPostListRsp
  31. GetPostReq = slowwildserver.GetPostReq
  32. GetPostRsp = slowwildserver.GetPostRsp
  33. GetReplyListReq = slowwildserver.GetReplyListReq
  34. GetReplyListRsp = slowwildserver.GetReplyListRsp
  35. GetTagListReq = slowwildserver.GetTagListReq
  36. GetTagListRsp = slowwildserver.GetTagListRsp
  37. GetTagReq = slowwildserver.GetTagReq
  38. GetTagRsp = slowwildserver.GetTagRsp
  39. GetUserInfoReq = slowwildserver.GetUserInfoReq
  40. GetUserInfoResp = slowwildserver.GetUserInfoResp
  41. GetUserPostCollectionListReq = slowwildserver.GetUserPostCollectionListReq
  42. GetUserPostCollectionListRsp = slowwildserver.GetUserPostCollectionListRsp
  43. GetUserPostLikeListReq = slowwildserver.GetUserPostLikeListReq
  44. GetUserPostLikeListRsp = slowwildserver.GetUserPostLikeListRsp
  45. GetUserPostListReq = slowwildserver.GetUserPostListReq
  46. GetUserPostListRsp = slowwildserver.GetUserPostListRsp
  47. GetUserProfileReq = slowwildserver.GetUserProfileReq
  48. GetUserProfileRes = slowwildserver.GetUserProfileRes
  49. LoginAndRegisterRsp = slowwildserver.LoginAndRegisterRsp
  50. LoginReq = slowwildserver.LoginReq
  51. PostCollectionReq = slowwildserver.PostCollectionReq
  52. PostCollectionRsp = slowwildserver.PostCollectionRsp
  53. PostCommentReq = slowwildserver.PostCommentReq
  54. PostCommentRsp = slowwildserver.PostCommentRsp
  55. PostCommentUpvoteReq = slowwildserver.PostCommentUpvoteReq
  56. PostCommentUpvoteRsp = slowwildserver.PostCommentUpvoteRsp
  57. PostDeleteReq = slowwildserver.PostDeleteReq
  58. PostDeleteRsp = slowwildserver.PostDeleteRsp
  59. PostReplyReq = slowwildserver.PostReplyReq
  60. PostReplyRsp = slowwildserver.PostReplyRsp
  61. PostShareReq = slowwildserver.PostShareReq
  62. PostShareRsp = slowwildserver.PostShareRsp
  63. PostUpvoteReq = slowwildserver.PostUpvoteReq
  64. PostUpvoteRsp = slowwildserver.PostUpvoteRsp
  65. RegisterReq = slowwildserver.RegisterReq
  66. RepliesItem = slowwildserver.RepliesItem
  67. SearchUsernameItem = slowwildserver.SearchUsernameItem
  68. SearchUsernameReq = slowwildserver.SearchUsernameReq
  69. SearchUsernameRes = slowwildserver.SearchUsernameRes
  70. TagItem = slowwildserver.TagItem
  71. UnFollowUserReq = slowwildserver.UnFollowUserReq
  72. UnFollowUserRes = slowwildserver.UnFollowUserRes
  73. UserEntity = slowwildserver.UserEntity
  74. UserInfo = slowwildserver.UserInfo
  75. SlowWildServer interface {
  76. // 用户登录
  77. Login(ctx context.Context, in *LoginReq, opts ...grpc.CallOption) (*LoginAndRegisterRsp, error)
  78. // 用户注册
  79. Register(ctx context.Context, in *RegisterReq, opts ...grpc.CallOption) (*LoginAndRegisterRsp, error)
  80. // 获取用户信息
  81. GetUserInfo(ctx context.Context, in *GetUserInfoReq, opts ...grpc.CallOption) (*GetUserInfoResp, error)
  82. // 查询用户信息
  83. FindUser(ctx context.Context, in *FindUserReq, opts ...grpc.CallOption) (*FindUserResp, error)
  84. // 关注用户
  85. UserFollow(ctx context.Context, in *FollowUserReq, opts ...grpc.CallOption) (*FollowUserRes, error)
  86. // 取消关注用户
  87. UnUserFollow(ctx context.Context, in *UnFollowUserReq, opts ...grpc.CallOption) (*UnFollowUserRes, error)
  88. // 获取我得粉丝
  89. GetFans(ctx context.Context, in *GetFollowingReq, opts ...grpc.CallOption) (*GetFollowingRes, error)
  90. // 查询我的关注
  91. GetFollows(ctx context.Context, in *GetFollowingReq, opts ...grpc.CallOption) (*GetFollowingRes, error)
  92. // 查询用户的详细信息
  93. GetUserProfile(ctx context.Context, in *GetUserProfileReq, opts ...grpc.CallOption) (*GetUserProfileRes, error)
  94. // 搜索用户名称
  95. SearchUsername(ctx context.Context, in *SearchUsernameReq, opts ...grpc.CallOption) (*SearchUsernameRes, error)
  96. // 发布帖子
  97. CreatePost(ctx context.Context, in *CreatePostReq, opts ...grpc.CallOption) (*CreatePostRsp, error)
  98. // 获取话题列表
  99. GetTagList(ctx context.Context, in *GetTagListReq, opts ...grpc.CallOption) (*GetTagListRsp, error)
  100. // 获取话题详情
  101. GetTag(ctx context.Context, in *GetTagReq, opts ...grpc.CallOption) (*GetTagRsp, error)
  102. // 获取帖子列表
  103. GetPostList(ctx context.Context, in *GetPostListReq, opts ...grpc.CallOption) (*GetPostListRsp, error)
  104. // 获取帖子详情
  105. GetPost(ctx context.Context, in *GetPostReq, opts ...grpc.CallOption) (*GetPostRsp, error)
  106. // 点赞帖子
  107. PostUpvote(ctx context.Context, in *PostUpvoteReq, opts ...grpc.CallOption) (*PostUpvoteRsp, error)
  108. // 分享帖子
  109. PostShare(ctx context.Context, in *PostShareReq, opts ...grpc.CallOption) (*PostShareRsp, error)
  110. // 收藏帖子
  111. PostCollection(ctx context.Context, in *PostCollectionReq, opts ...grpc.CallOption) (*PostCollectionRsp, error)
  112. // 发布评论
  113. PostComment(ctx context.Context, in *PostCommentReq, opts ...grpc.CallOption) (*PostCommentRsp, error)
  114. // 发布回复
  115. PostReply(ctx context.Context, in *PostReplyReq, opts ...grpc.CallOption) (*PostReplyRsp, error)
  116. // 获取评论列表
  117. GetPostCommentList(ctx context.Context, in *GetPostCommentListReq, opts ...grpc.CallOption) (*GetPostCommentListRsp, error)
  118. // 获取回复列表
  119. GetReplyList(ctx context.Context, in *GetReplyListReq, opts ...grpc.CallOption) (*GetReplyListRsp, error)
  120. // 评论点赞
  121. PostCommentUpvote(ctx context.Context, in *PostCommentUpvoteReq, opts ...grpc.CallOption) (*PostCommentUpvoteRsp, error)
  122. // 删除帖子
  123. PostDelete(ctx context.Context, in *PostDeleteReq, opts ...grpc.CallOption) (*PostDeleteRsp, error)
  124. // 删除回复/评论
  125. CommentDelete(ctx context.Context, in *CommentDeleteReq, opts ...grpc.CallOption) (*CommentDeleteRsp, error)
  126. // 获取用户发布的帖子
  127. GetUserPostList(ctx context.Context, in *GetUserPostListReq, opts ...grpc.CallOption) (*GetUserPostListRsp, error)
  128. // 获取用户收藏的帖子
  129. GetUserPostCollectionList(ctx context.Context, in *GetUserPostCollectionListReq, opts ...grpc.CallOption) (*GetUserPostCollectionListRsp, error)
  130. // 获取用户点赞过的帖子
  131. GetUserPostLikeList(ctx context.Context, in *GetUserPostLikeListReq, opts ...grpc.CallOption) (*GetUserPostLikeListRsp, error)
  132. }
  133. defaultSlowWildServer struct {
  134. cli zrpc.Client
  135. }
  136. )
  137. func NewSlowWildServer(cli zrpc.Client) SlowWildServer {
  138. return &defaultSlowWildServer{
  139. cli: cli,
  140. }
  141. }
  142. // 用户登录
  143. func (m *defaultSlowWildServer) Login(ctx context.Context, in *LoginReq, opts ...grpc.CallOption) (*LoginAndRegisterRsp, error) {
  144. client := slowwildserver.NewSlowWildServerClient(m.cli.Conn())
  145. return client.Login(ctx, in, opts...)
  146. }
  147. // 用户注册
  148. func (m *defaultSlowWildServer) Register(ctx context.Context, in *RegisterReq, opts ...grpc.CallOption) (*LoginAndRegisterRsp, error) {
  149. client := slowwildserver.NewSlowWildServerClient(m.cli.Conn())
  150. return client.Register(ctx, in, opts...)
  151. }
  152. // 获取用户信息
  153. func (m *defaultSlowWildServer) GetUserInfo(ctx context.Context, in *GetUserInfoReq, opts ...grpc.CallOption) (*GetUserInfoResp, error) {
  154. client := slowwildserver.NewSlowWildServerClient(m.cli.Conn())
  155. return client.GetUserInfo(ctx, in, opts...)
  156. }
  157. // 查询用户信息
  158. func (m *defaultSlowWildServer) FindUser(ctx context.Context, in *FindUserReq, opts ...grpc.CallOption) (*FindUserResp, error) {
  159. client := slowwildserver.NewSlowWildServerClient(m.cli.Conn())
  160. return client.FindUser(ctx, in, opts...)
  161. }
  162. // 关注用户
  163. func (m *defaultSlowWildServer) UserFollow(ctx context.Context, in *FollowUserReq, opts ...grpc.CallOption) (*FollowUserRes, error) {
  164. client := slowwildserver.NewSlowWildServerClient(m.cli.Conn())
  165. return client.UserFollow(ctx, in, opts...)
  166. }
  167. // 取消关注用户
  168. func (m *defaultSlowWildServer) UnUserFollow(ctx context.Context, in *UnFollowUserReq, opts ...grpc.CallOption) (*UnFollowUserRes, error) {
  169. client := slowwildserver.NewSlowWildServerClient(m.cli.Conn())
  170. return client.UnUserFollow(ctx, in, opts...)
  171. }
  172. // 获取我得粉丝
  173. func (m *defaultSlowWildServer) GetFans(ctx context.Context, in *GetFollowingReq, opts ...grpc.CallOption) (*GetFollowingRes, error) {
  174. client := slowwildserver.NewSlowWildServerClient(m.cli.Conn())
  175. return client.GetFans(ctx, in, opts...)
  176. }
  177. // 查询我的关注
  178. func (m *defaultSlowWildServer) GetFollows(ctx context.Context, in *GetFollowingReq, opts ...grpc.CallOption) (*GetFollowingRes, error) {
  179. client := slowwildserver.NewSlowWildServerClient(m.cli.Conn())
  180. return client.GetFollows(ctx, in, opts...)
  181. }
  182. // 查询用户的详细信息
  183. func (m *defaultSlowWildServer) GetUserProfile(ctx context.Context, in *GetUserProfileReq, opts ...grpc.CallOption) (*GetUserProfileRes, error) {
  184. client := slowwildserver.NewSlowWildServerClient(m.cli.Conn())
  185. return client.GetUserProfile(ctx, in, opts...)
  186. }
  187. // 搜索用户名称
  188. func (m *defaultSlowWildServer) SearchUsername(ctx context.Context, in *SearchUsernameReq, opts ...grpc.CallOption) (*SearchUsernameRes, error) {
  189. client := slowwildserver.NewSlowWildServerClient(m.cli.Conn())
  190. return client.SearchUsername(ctx, in, opts...)
  191. }
  192. // 发布帖子
  193. func (m *defaultSlowWildServer) CreatePost(ctx context.Context, in *CreatePostReq, opts ...grpc.CallOption) (*CreatePostRsp, error) {
  194. client := slowwildserver.NewSlowWildServerClient(m.cli.Conn())
  195. return client.CreatePost(ctx, in, opts...)
  196. }
  197. // 获取话题列表
  198. func (m *defaultSlowWildServer) GetTagList(ctx context.Context, in *GetTagListReq, opts ...grpc.CallOption) (*GetTagListRsp, error) {
  199. client := slowwildserver.NewSlowWildServerClient(m.cli.Conn())
  200. return client.GetTagList(ctx, in, opts...)
  201. }
  202. // 获取话题详情
  203. func (m *defaultSlowWildServer) GetTag(ctx context.Context, in *GetTagReq, opts ...grpc.CallOption) (*GetTagRsp, error) {
  204. client := slowwildserver.NewSlowWildServerClient(m.cli.Conn())
  205. return client.GetTag(ctx, in, opts...)
  206. }
  207. // 获取帖子列表
  208. func (m *defaultSlowWildServer) GetPostList(ctx context.Context, in *GetPostListReq, opts ...grpc.CallOption) (*GetPostListRsp, error) {
  209. client := slowwildserver.NewSlowWildServerClient(m.cli.Conn())
  210. return client.GetPostList(ctx, in, opts...)
  211. }
  212. // 获取帖子详情
  213. func (m *defaultSlowWildServer) GetPost(ctx context.Context, in *GetPostReq, opts ...grpc.CallOption) (*GetPostRsp, error) {
  214. client := slowwildserver.NewSlowWildServerClient(m.cli.Conn())
  215. return client.GetPost(ctx, in, opts...)
  216. }
  217. // 点赞帖子
  218. func (m *defaultSlowWildServer) PostUpvote(ctx context.Context, in *PostUpvoteReq, opts ...grpc.CallOption) (*PostUpvoteRsp, error) {
  219. client := slowwildserver.NewSlowWildServerClient(m.cli.Conn())
  220. return client.PostUpvote(ctx, in, opts...)
  221. }
  222. // 分享帖子
  223. func (m *defaultSlowWildServer) PostShare(ctx context.Context, in *PostShareReq, opts ...grpc.CallOption) (*PostShareRsp, error) {
  224. client := slowwildserver.NewSlowWildServerClient(m.cli.Conn())
  225. return client.PostShare(ctx, in, opts...)
  226. }
  227. // 收藏帖子
  228. func (m *defaultSlowWildServer) PostCollection(ctx context.Context, in *PostCollectionReq, opts ...grpc.CallOption) (*PostCollectionRsp, error) {
  229. client := slowwildserver.NewSlowWildServerClient(m.cli.Conn())
  230. return client.PostCollection(ctx, in, opts...)
  231. }
  232. // 发布评论
  233. func (m *defaultSlowWildServer) PostComment(ctx context.Context, in *PostCommentReq, opts ...grpc.CallOption) (*PostCommentRsp, error) {
  234. client := slowwildserver.NewSlowWildServerClient(m.cli.Conn())
  235. return client.PostComment(ctx, in, opts...)
  236. }
  237. // 发布回复
  238. func (m *defaultSlowWildServer) PostReply(ctx context.Context, in *PostReplyReq, opts ...grpc.CallOption) (*PostReplyRsp, error) {
  239. client := slowwildserver.NewSlowWildServerClient(m.cli.Conn())
  240. return client.PostReply(ctx, in, opts...)
  241. }
  242. // 获取评论列表
  243. func (m *defaultSlowWildServer) GetPostCommentList(ctx context.Context, in *GetPostCommentListReq, opts ...grpc.CallOption) (*GetPostCommentListRsp, error) {
  244. client := slowwildserver.NewSlowWildServerClient(m.cli.Conn())
  245. return client.GetPostCommentList(ctx, in, opts...)
  246. }
  247. // 获取回复列表
  248. func (m *defaultSlowWildServer) GetReplyList(ctx context.Context, in *GetReplyListReq, opts ...grpc.CallOption) (*GetReplyListRsp, error) {
  249. client := slowwildserver.NewSlowWildServerClient(m.cli.Conn())
  250. return client.GetReplyList(ctx, in, opts...)
  251. }
  252. // 评论点赞
  253. func (m *defaultSlowWildServer) PostCommentUpvote(ctx context.Context, in *PostCommentUpvoteReq, opts ...grpc.CallOption) (*PostCommentUpvoteRsp, error) {
  254. client := slowwildserver.NewSlowWildServerClient(m.cli.Conn())
  255. return client.PostCommentUpvote(ctx, in, opts...)
  256. }
  257. // 删除帖子
  258. func (m *defaultSlowWildServer) PostDelete(ctx context.Context, in *PostDeleteReq, opts ...grpc.CallOption) (*PostDeleteRsp, error) {
  259. client := slowwildserver.NewSlowWildServerClient(m.cli.Conn())
  260. return client.PostDelete(ctx, in, opts...)
  261. }
  262. // 删除回复/评论
  263. func (m *defaultSlowWildServer) CommentDelete(ctx context.Context, in *CommentDeleteReq, opts ...grpc.CallOption) (*CommentDeleteRsp, error) {
  264. client := slowwildserver.NewSlowWildServerClient(m.cli.Conn())
  265. return client.CommentDelete(ctx, in, opts...)
  266. }
  267. // 获取用户发布的帖子
  268. func (m *defaultSlowWildServer) GetUserPostList(ctx context.Context, in *GetUserPostListReq, opts ...grpc.CallOption) (*GetUserPostListRsp, error) {
  269. client := slowwildserver.NewSlowWildServerClient(m.cli.Conn())
  270. return client.GetUserPostList(ctx, in, opts...)
  271. }
  272. // 获取用户收藏的帖子
  273. func (m *defaultSlowWildServer) GetUserPostCollectionList(ctx context.Context, in *GetUserPostCollectionListReq, opts ...grpc.CallOption) (*GetUserPostCollectionListRsp, error) {
  274. client := slowwildserver.NewSlowWildServerClient(m.cli.Conn())
  275. return client.GetUserPostCollectionList(ctx, in, opts...)
  276. }
  277. // 获取用户点赞过的帖子
  278. func (m *defaultSlowWildServer) GetUserPostLikeList(ctx context.Context, in *GetUserPostLikeListReq, opts ...grpc.CallOption) (*GetUserPostLikeListRsp, error) {
  279. client := slowwildserver.NewSlowWildServerClient(m.cli.Conn())
  280. return client.GetUserPostLikeList(ctx, in, opts...)
  281. }