slowwildserver.go 15 KB

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