base_grpc.pb.go 16 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442
  1. // Code generated by protoc-gen-go-grpc. DO NOT EDIT.
  2. package base
  3. import (
  4. context "context"
  5. common "git.ikuban.com/server/pw-protobuf/api/common"
  6. grpc "google.golang.org/grpc"
  7. codes "google.golang.org/grpc/codes"
  8. status "google.golang.org/grpc/status"
  9. )
  10. // This is a compile-time assertion to ensure that this generated file
  11. // is compatible with the grpc package it is being compiled against.
  12. // Requires gRPC-Go v1.32.0 or later.
  13. const _ = grpc.SupportPackageIsVersion7
  14. // BaseClient is the client API for Base service.
  15. //
  16. // For semantics around ctx use and closing/ending streaming RPCs, please refer to https://pkg.go.dev/google.golang.org/grpc/?tab=doc#ClientConn.NewStream.
  17. type BaseClient interface {
  18. RandomNickname(ctx context.Context, in *common.SexReq, opts ...grpc.CallOption) (*RandomNicknameReply, error)
  19. RandomAvatar(ctx context.Context, in *common.SexReq, opts ...grpc.CallOption) (*RandomAvatarReply, error)
  20. // 随机介绍接口
  21. RandomIntroduce(ctx context.Context, in *common.SexReq, opts ...grpc.CallOption) (*common.RandomIntroduceReply, error)
  22. // 随机头像列表
  23. RandomAvatarList(ctx context.Context, in *common.SexReq, opts ...grpc.CallOption) (*RandomAvatarListReply, error)
  24. // 通过分组名和性别查询标签
  25. FindTagListBySex(ctx context.Context, in *common.SexReq, opts ...grpc.CallOption) (*common.TagListReply, error)
  26. // 通过标签IDs查询标签
  27. FindTagsByIDs(ctx context.Context, in *common.Ids, opts ...grpc.CallOption) (*common.TagListReply, error)
  28. // 通过类型获取表情包列表
  29. FindMemeByType(ctx context.Context, in *common.MemeRequest, opts ...grpc.CallOption) (*common.MemeList, error)
  30. // 获取对方性别的聊天话题
  31. FindChatTopic(ctx context.Context, in *common.FindChatTopicRequest, opts ...grpc.CallOption) (*common.ChatTopicList, error)
  32. // 随机表情包
  33. RandomMeme(ctx context.Context, in *common.RandomNum, opts ...grpc.CallOption) (*common.CommonTextList, error)
  34. // 随机打招呼
  35. RandomSwiftMessage(ctx context.Context, in *common.RandomNumAndSex, opts ...grpc.CallOption) (*common.CommonTextList, error)
  36. }
  37. type baseClient struct {
  38. cc grpc.ClientConnInterface
  39. }
  40. func NewBaseClient(cc grpc.ClientConnInterface) BaseClient {
  41. return &baseClient{cc}
  42. }
  43. func (c *baseClient) RandomNickname(ctx context.Context, in *common.SexReq, opts ...grpc.CallOption) (*RandomNicknameReply, error) {
  44. out := new(RandomNicknameReply)
  45. err := c.cc.Invoke(ctx, "/api.base.Base/RandomNickname", in, out, opts...)
  46. if err != nil {
  47. return nil, err
  48. }
  49. return out, nil
  50. }
  51. func (c *baseClient) RandomAvatar(ctx context.Context, in *common.SexReq, opts ...grpc.CallOption) (*RandomAvatarReply, error) {
  52. out := new(RandomAvatarReply)
  53. err := c.cc.Invoke(ctx, "/api.base.Base/RandomAvatar", in, out, opts...)
  54. if err != nil {
  55. return nil, err
  56. }
  57. return out, nil
  58. }
  59. func (c *baseClient) RandomIntroduce(ctx context.Context, in *common.SexReq, opts ...grpc.CallOption) (*common.RandomIntroduceReply, error) {
  60. out := new(common.RandomIntroduceReply)
  61. err := c.cc.Invoke(ctx, "/api.base.Base/RandomIntroduce", in, out, opts...)
  62. if err != nil {
  63. return nil, err
  64. }
  65. return out, nil
  66. }
  67. func (c *baseClient) RandomAvatarList(ctx context.Context, in *common.SexReq, opts ...grpc.CallOption) (*RandomAvatarListReply, error) {
  68. out := new(RandomAvatarListReply)
  69. err := c.cc.Invoke(ctx, "/api.base.Base/RandomAvatarList", in, out, opts...)
  70. if err != nil {
  71. return nil, err
  72. }
  73. return out, nil
  74. }
  75. func (c *baseClient) FindTagListBySex(ctx context.Context, in *common.SexReq, opts ...grpc.CallOption) (*common.TagListReply, error) {
  76. out := new(common.TagListReply)
  77. err := c.cc.Invoke(ctx, "/api.base.Base/FindTagListBySex", in, out, opts...)
  78. if err != nil {
  79. return nil, err
  80. }
  81. return out, nil
  82. }
  83. func (c *baseClient) FindTagsByIDs(ctx context.Context, in *common.Ids, opts ...grpc.CallOption) (*common.TagListReply, error) {
  84. out := new(common.TagListReply)
  85. err := c.cc.Invoke(ctx, "/api.base.Base/FindTagsByIDs", in, out, opts...)
  86. if err != nil {
  87. return nil, err
  88. }
  89. return out, nil
  90. }
  91. func (c *baseClient) FindMemeByType(ctx context.Context, in *common.MemeRequest, opts ...grpc.CallOption) (*common.MemeList, error) {
  92. out := new(common.MemeList)
  93. err := c.cc.Invoke(ctx, "/api.base.Base/FindMemeByType", in, out, opts...)
  94. if err != nil {
  95. return nil, err
  96. }
  97. return out, nil
  98. }
  99. func (c *baseClient) FindChatTopic(ctx context.Context, in *common.FindChatTopicRequest, opts ...grpc.CallOption) (*common.ChatTopicList, error) {
  100. out := new(common.ChatTopicList)
  101. err := c.cc.Invoke(ctx, "/api.base.Base/FindChatTopic", in, out, opts...)
  102. if err != nil {
  103. return nil, err
  104. }
  105. return out, nil
  106. }
  107. func (c *baseClient) RandomMeme(ctx context.Context, in *common.RandomNum, opts ...grpc.CallOption) (*common.CommonTextList, error) {
  108. out := new(common.CommonTextList)
  109. err := c.cc.Invoke(ctx, "/api.base.Base/RandomMeme", in, out, opts...)
  110. if err != nil {
  111. return nil, err
  112. }
  113. return out, nil
  114. }
  115. func (c *baseClient) RandomSwiftMessage(ctx context.Context, in *common.RandomNumAndSex, opts ...grpc.CallOption) (*common.CommonTextList, error) {
  116. out := new(common.CommonTextList)
  117. err := c.cc.Invoke(ctx, "/api.base.Base/RandomSwiftMessage", in, out, opts...)
  118. if err != nil {
  119. return nil, err
  120. }
  121. return out, nil
  122. }
  123. // BaseServer is the server API for Base service.
  124. // All implementations must embed UnimplementedBaseServer
  125. // for forward compatibility
  126. type BaseServer interface {
  127. RandomNickname(context.Context, *common.SexReq) (*RandomNicknameReply, error)
  128. RandomAvatar(context.Context, *common.SexReq) (*RandomAvatarReply, error)
  129. // 随机介绍接口
  130. RandomIntroduce(context.Context, *common.SexReq) (*common.RandomIntroduceReply, error)
  131. // 随机头像列表
  132. RandomAvatarList(context.Context, *common.SexReq) (*RandomAvatarListReply, error)
  133. // 通过分组名和性别查询标签
  134. FindTagListBySex(context.Context, *common.SexReq) (*common.TagListReply, error)
  135. // 通过标签IDs查询标签
  136. FindTagsByIDs(context.Context, *common.Ids) (*common.TagListReply, error)
  137. // 通过类型获取表情包列表
  138. FindMemeByType(context.Context, *common.MemeRequest) (*common.MemeList, error)
  139. // 获取对方性别的聊天话题
  140. FindChatTopic(context.Context, *common.FindChatTopicRequest) (*common.ChatTopicList, error)
  141. // 随机表情包
  142. RandomMeme(context.Context, *common.RandomNum) (*common.CommonTextList, error)
  143. // 随机打招呼
  144. RandomSwiftMessage(context.Context, *common.RandomNumAndSex) (*common.CommonTextList, error)
  145. mustEmbedUnimplementedBaseServer()
  146. }
  147. // UnimplementedBaseServer must be embedded to have forward compatible implementations.
  148. type UnimplementedBaseServer struct {
  149. }
  150. func (UnimplementedBaseServer) RandomNickname(context.Context, *common.SexReq) (*RandomNicknameReply, error) {
  151. return nil, status.Errorf(codes.Unimplemented, "method RandomNickname not implemented")
  152. }
  153. func (UnimplementedBaseServer) RandomAvatar(context.Context, *common.SexReq) (*RandomAvatarReply, error) {
  154. return nil, status.Errorf(codes.Unimplemented, "method RandomAvatar not implemented")
  155. }
  156. func (UnimplementedBaseServer) RandomIntroduce(context.Context, *common.SexReq) (*common.RandomIntroduceReply, error) {
  157. return nil, status.Errorf(codes.Unimplemented, "method RandomIntroduce not implemented")
  158. }
  159. func (UnimplementedBaseServer) RandomAvatarList(context.Context, *common.SexReq) (*RandomAvatarListReply, error) {
  160. return nil, status.Errorf(codes.Unimplemented, "method RandomAvatarList not implemented")
  161. }
  162. func (UnimplementedBaseServer) FindTagListBySex(context.Context, *common.SexReq) (*common.TagListReply, error) {
  163. return nil, status.Errorf(codes.Unimplemented, "method FindTagListBySex not implemented")
  164. }
  165. func (UnimplementedBaseServer) FindTagsByIDs(context.Context, *common.Ids) (*common.TagListReply, error) {
  166. return nil, status.Errorf(codes.Unimplemented, "method FindTagsByIDs not implemented")
  167. }
  168. func (UnimplementedBaseServer) FindMemeByType(context.Context, *common.MemeRequest) (*common.MemeList, error) {
  169. return nil, status.Errorf(codes.Unimplemented, "method FindMemeByType not implemented")
  170. }
  171. func (UnimplementedBaseServer) FindChatTopic(context.Context, *common.FindChatTopicRequest) (*common.ChatTopicList, error) {
  172. return nil, status.Errorf(codes.Unimplemented, "method FindChatTopic not implemented")
  173. }
  174. func (UnimplementedBaseServer) RandomMeme(context.Context, *common.RandomNum) (*common.CommonTextList, error) {
  175. return nil, status.Errorf(codes.Unimplemented, "method RandomMeme not implemented")
  176. }
  177. func (UnimplementedBaseServer) RandomSwiftMessage(context.Context, *common.RandomNumAndSex) (*common.CommonTextList, error) {
  178. return nil, status.Errorf(codes.Unimplemented, "method RandomSwiftMessage not implemented")
  179. }
  180. func (UnimplementedBaseServer) mustEmbedUnimplementedBaseServer() {}
  181. // UnsafeBaseServer may be embedded to opt out of forward compatibility for this service.
  182. // Use of this interface is not recommended, as added methods to BaseServer will
  183. // result in compilation errors.
  184. type UnsafeBaseServer interface {
  185. mustEmbedUnimplementedBaseServer()
  186. }
  187. func RegisterBaseServer(s grpc.ServiceRegistrar, srv BaseServer) {
  188. s.RegisterService(&Base_ServiceDesc, srv)
  189. }
  190. func _Base_RandomNickname_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
  191. in := new(common.SexReq)
  192. if err := dec(in); err != nil {
  193. return nil, err
  194. }
  195. if interceptor == nil {
  196. return srv.(BaseServer).RandomNickname(ctx, in)
  197. }
  198. info := &grpc.UnaryServerInfo{
  199. Server: srv,
  200. FullMethod: "/api.base.Base/RandomNickname",
  201. }
  202. handler := func(ctx context.Context, req interface{}) (interface{}, error) {
  203. return srv.(BaseServer).RandomNickname(ctx, req.(*common.SexReq))
  204. }
  205. return interceptor(ctx, in, info, handler)
  206. }
  207. func _Base_RandomAvatar_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
  208. in := new(common.SexReq)
  209. if err := dec(in); err != nil {
  210. return nil, err
  211. }
  212. if interceptor == nil {
  213. return srv.(BaseServer).RandomAvatar(ctx, in)
  214. }
  215. info := &grpc.UnaryServerInfo{
  216. Server: srv,
  217. FullMethod: "/api.base.Base/RandomAvatar",
  218. }
  219. handler := func(ctx context.Context, req interface{}) (interface{}, error) {
  220. return srv.(BaseServer).RandomAvatar(ctx, req.(*common.SexReq))
  221. }
  222. return interceptor(ctx, in, info, handler)
  223. }
  224. func _Base_RandomIntroduce_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
  225. in := new(common.SexReq)
  226. if err := dec(in); err != nil {
  227. return nil, err
  228. }
  229. if interceptor == nil {
  230. return srv.(BaseServer).RandomIntroduce(ctx, in)
  231. }
  232. info := &grpc.UnaryServerInfo{
  233. Server: srv,
  234. FullMethod: "/api.base.Base/RandomIntroduce",
  235. }
  236. handler := func(ctx context.Context, req interface{}) (interface{}, error) {
  237. return srv.(BaseServer).RandomIntroduce(ctx, req.(*common.SexReq))
  238. }
  239. return interceptor(ctx, in, info, handler)
  240. }
  241. func _Base_RandomAvatarList_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
  242. in := new(common.SexReq)
  243. if err := dec(in); err != nil {
  244. return nil, err
  245. }
  246. if interceptor == nil {
  247. return srv.(BaseServer).RandomAvatarList(ctx, in)
  248. }
  249. info := &grpc.UnaryServerInfo{
  250. Server: srv,
  251. FullMethod: "/api.base.Base/RandomAvatarList",
  252. }
  253. handler := func(ctx context.Context, req interface{}) (interface{}, error) {
  254. return srv.(BaseServer).RandomAvatarList(ctx, req.(*common.SexReq))
  255. }
  256. return interceptor(ctx, in, info, handler)
  257. }
  258. func _Base_FindTagListBySex_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
  259. in := new(common.SexReq)
  260. if err := dec(in); err != nil {
  261. return nil, err
  262. }
  263. if interceptor == nil {
  264. return srv.(BaseServer).FindTagListBySex(ctx, in)
  265. }
  266. info := &grpc.UnaryServerInfo{
  267. Server: srv,
  268. FullMethod: "/api.base.Base/FindTagListBySex",
  269. }
  270. handler := func(ctx context.Context, req interface{}) (interface{}, error) {
  271. return srv.(BaseServer).FindTagListBySex(ctx, req.(*common.SexReq))
  272. }
  273. return interceptor(ctx, in, info, handler)
  274. }
  275. func _Base_FindTagsByIDs_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
  276. in := new(common.Ids)
  277. if err := dec(in); err != nil {
  278. return nil, err
  279. }
  280. if interceptor == nil {
  281. return srv.(BaseServer).FindTagsByIDs(ctx, in)
  282. }
  283. info := &grpc.UnaryServerInfo{
  284. Server: srv,
  285. FullMethod: "/api.base.Base/FindTagsByIDs",
  286. }
  287. handler := func(ctx context.Context, req interface{}) (interface{}, error) {
  288. return srv.(BaseServer).FindTagsByIDs(ctx, req.(*common.Ids))
  289. }
  290. return interceptor(ctx, in, info, handler)
  291. }
  292. func _Base_FindMemeByType_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
  293. in := new(common.MemeRequest)
  294. if err := dec(in); err != nil {
  295. return nil, err
  296. }
  297. if interceptor == nil {
  298. return srv.(BaseServer).FindMemeByType(ctx, in)
  299. }
  300. info := &grpc.UnaryServerInfo{
  301. Server: srv,
  302. FullMethod: "/api.base.Base/FindMemeByType",
  303. }
  304. handler := func(ctx context.Context, req interface{}) (interface{}, error) {
  305. return srv.(BaseServer).FindMemeByType(ctx, req.(*common.MemeRequest))
  306. }
  307. return interceptor(ctx, in, info, handler)
  308. }
  309. func _Base_FindChatTopic_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
  310. in := new(common.FindChatTopicRequest)
  311. if err := dec(in); err != nil {
  312. return nil, err
  313. }
  314. if interceptor == nil {
  315. return srv.(BaseServer).FindChatTopic(ctx, in)
  316. }
  317. info := &grpc.UnaryServerInfo{
  318. Server: srv,
  319. FullMethod: "/api.base.Base/FindChatTopic",
  320. }
  321. handler := func(ctx context.Context, req interface{}) (interface{}, error) {
  322. return srv.(BaseServer).FindChatTopic(ctx, req.(*common.FindChatTopicRequest))
  323. }
  324. return interceptor(ctx, in, info, handler)
  325. }
  326. func _Base_RandomMeme_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
  327. in := new(common.RandomNum)
  328. if err := dec(in); err != nil {
  329. return nil, err
  330. }
  331. if interceptor == nil {
  332. return srv.(BaseServer).RandomMeme(ctx, in)
  333. }
  334. info := &grpc.UnaryServerInfo{
  335. Server: srv,
  336. FullMethod: "/api.base.Base/RandomMeme",
  337. }
  338. handler := func(ctx context.Context, req interface{}) (interface{}, error) {
  339. return srv.(BaseServer).RandomMeme(ctx, req.(*common.RandomNum))
  340. }
  341. return interceptor(ctx, in, info, handler)
  342. }
  343. func _Base_RandomSwiftMessage_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
  344. in := new(common.RandomNumAndSex)
  345. if err := dec(in); err != nil {
  346. return nil, err
  347. }
  348. if interceptor == nil {
  349. return srv.(BaseServer).RandomSwiftMessage(ctx, in)
  350. }
  351. info := &grpc.UnaryServerInfo{
  352. Server: srv,
  353. FullMethod: "/api.base.Base/RandomSwiftMessage",
  354. }
  355. handler := func(ctx context.Context, req interface{}) (interface{}, error) {
  356. return srv.(BaseServer).RandomSwiftMessage(ctx, req.(*common.RandomNumAndSex))
  357. }
  358. return interceptor(ctx, in, info, handler)
  359. }
  360. // Base_ServiceDesc is the grpc.ServiceDesc for Base service.
  361. // It's only intended for direct use with grpc.RegisterService,
  362. // and not to be introspected or modified (even as a copy)
  363. var Base_ServiceDesc = grpc.ServiceDesc{
  364. ServiceName: "api.base.Base",
  365. HandlerType: (*BaseServer)(nil),
  366. Methods: []grpc.MethodDesc{
  367. {
  368. MethodName: "RandomNickname",
  369. Handler: _Base_RandomNickname_Handler,
  370. },
  371. {
  372. MethodName: "RandomAvatar",
  373. Handler: _Base_RandomAvatar_Handler,
  374. },
  375. {
  376. MethodName: "RandomIntroduce",
  377. Handler: _Base_RandomIntroduce_Handler,
  378. },
  379. {
  380. MethodName: "RandomAvatarList",
  381. Handler: _Base_RandomAvatarList_Handler,
  382. },
  383. {
  384. MethodName: "FindTagListBySex",
  385. Handler: _Base_FindTagListBySex_Handler,
  386. },
  387. {
  388. MethodName: "FindTagsByIDs",
  389. Handler: _Base_FindTagsByIDs_Handler,
  390. },
  391. {
  392. MethodName: "FindMemeByType",
  393. Handler: _Base_FindMemeByType_Handler,
  394. },
  395. {
  396. MethodName: "FindChatTopic",
  397. Handler: _Base_FindChatTopic_Handler,
  398. },
  399. {
  400. MethodName: "RandomMeme",
  401. Handler: _Base_RandomMeme_Handler,
  402. },
  403. {
  404. MethodName: "RandomSwiftMessage",
  405. Handler: _Base_RandomSwiftMessage_Handler,
  406. },
  407. },
  408. Streams: []grpc.StreamDesc{},
  409. Metadata: "base.proto",
  410. }