basics_grpc.pb.go 18 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478
  1. // Code generated by protoc-gen-go-grpc. DO NOT EDIT.
  2. package basics
  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. // BasicsClient is the client API for Basics 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 BasicsClient 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. BannerConf(ctx context.Context, in *BannerConfRequest, opts ...grpc.CallOption) (*BannerConfReply, error)
  23. // 随机头像列表
  24. RandomAvatarList(ctx context.Context, in *common.SexReq, opts ...grpc.CallOption) (*RandomAvatarListReply, error)
  25. // 通过分组名和性别查询标签
  26. FindTagListBySex(ctx context.Context, in *common.SexReq, opts ...grpc.CallOption) (*common.TagListReply, error)
  27. // 通过标签IDs查询标签
  28. FindTagsByIDs(ctx context.Context, in *common.Ids, opts ...grpc.CallOption) (*common.TagListReply, error)
  29. // 通过类型获取表情包列表
  30. FindMemeByType(ctx context.Context, in *common.MemeRequest, opts ...grpc.CallOption) (*common.MemeList, error)
  31. // 获取对方性别的聊天话题
  32. FindChatTopic(ctx context.Context, in *common.FindChatTopicRequest, opts ...grpc.CallOption) (*common.ChatTopicList, error)
  33. // 随机表情包
  34. RandomMeme(ctx context.Context, in *common.RandomNum, opts ...grpc.CallOption) (*common.CommonTextList, error)
  35. // 随机打招呼
  36. RandomSwiftMessage(ctx context.Context, in *common.RandomNumAndSex, opts ...grpc.CallOption) (*common.CommonTextList, error)
  37. }
  38. type basicsClient struct {
  39. cc grpc.ClientConnInterface
  40. }
  41. func NewBasicsClient(cc grpc.ClientConnInterface) BasicsClient {
  42. return &basicsClient{cc}
  43. }
  44. func (c *basicsClient) RandomNickname(ctx context.Context, in *common.SexReq, opts ...grpc.CallOption) (*RandomNicknameReply, error) {
  45. out := new(RandomNicknameReply)
  46. err := c.cc.Invoke(ctx, "/api.basics.Basics/RandomNickname", in, out, opts...)
  47. if err != nil {
  48. return nil, err
  49. }
  50. return out, nil
  51. }
  52. func (c *basicsClient) RandomAvatar(ctx context.Context, in *common.SexReq, opts ...grpc.CallOption) (*RandomAvatarReply, error) {
  53. out := new(RandomAvatarReply)
  54. err := c.cc.Invoke(ctx, "/api.basics.Basics/RandomAvatar", in, out, opts...)
  55. if err != nil {
  56. return nil, err
  57. }
  58. return out, nil
  59. }
  60. func (c *basicsClient) RandomIntroduce(ctx context.Context, in *common.SexReq, opts ...grpc.CallOption) (*common.RandomIntroduceReply, error) {
  61. out := new(common.RandomIntroduceReply)
  62. err := c.cc.Invoke(ctx, "/api.basics.Basics/RandomIntroduce", in, out, opts...)
  63. if err != nil {
  64. return nil, err
  65. }
  66. return out, nil
  67. }
  68. func (c *basicsClient) BannerConf(ctx context.Context, in *BannerConfRequest, opts ...grpc.CallOption) (*BannerConfReply, error) {
  69. out := new(BannerConfReply)
  70. err := c.cc.Invoke(ctx, "/api.basics.Basics/BannerConf", in, out, opts...)
  71. if err != nil {
  72. return nil, err
  73. }
  74. return out, nil
  75. }
  76. func (c *basicsClient) RandomAvatarList(ctx context.Context, in *common.SexReq, opts ...grpc.CallOption) (*RandomAvatarListReply, error) {
  77. out := new(RandomAvatarListReply)
  78. err := c.cc.Invoke(ctx, "/api.basics.Basics/RandomAvatarList", in, out, opts...)
  79. if err != nil {
  80. return nil, err
  81. }
  82. return out, nil
  83. }
  84. func (c *basicsClient) FindTagListBySex(ctx context.Context, in *common.SexReq, opts ...grpc.CallOption) (*common.TagListReply, error) {
  85. out := new(common.TagListReply)
  86. err := c.cc.Invoke(ctx, "/api.basics.Basics/FindTagListBySex", in, out, opts...)
  87. if err != nil {
  88. return nil, err
  89. }
  90. return out, nil
  91. }
  92. func (c *basicsClient) FindTagsByIDs(ctx context.Context, in *common.Ids, opts ...grpc.CallOption) (*common.TagListReply, error) {
  93. out := new(common.TagListReply)
  94. err := c.cc.Invoke(ctx, "/api.basics.Basics/FindTagsByIDs", in, out, opts...)
  95. if err != nil {
  96. return nil, err
  97. }
  98. return out, nil
  99. }
  100. func (c *basicsClient) FindMemeByType(ctx context.Context, in *common.MemeRequest, opts ...grpc.CallOption) (*common.MemeList, error) {
  101. out := new(common.MemeList)
  102. err := c.cc.Invoke(ctx, "/api.basics.Basics/FindMemeByType", in, out, opts...)
  103. if err != nil {
  104. return nil, err
  105. }
  106. return out, nil
  107. }
  108. func (c *basicsClient) FindChatTopic(ctx context.Context, in *common.FindChatTopicRequest, opts ...grpc.CallOption) (*common.ChatTopicList, error) {
  109. out := new(common.ChatTopicList)
  110. err := c.cc.Invoke(ctx, "/api.basics.Basics/FindChatTopic", in, out, opts...)
  111. if err != nil {
  112. return nil, err
  113. }
  114. return out, nil
  115. }
  116. func (c *basicsClient) RandomMeme(ctx context.Context, in *common.RandomNum, opts ...grpc.CallOption) (*common.CommonTextList, error) {
  117. out := new(common.CommonTextList)
  118. err := c.cc.Invoke(ctx, "/api.basics.Basics/RandomMeme", in, out, opts...)
  119. if err != nil {
  120. return nil, err
  121. }
  122. return out, nil
  123. }
  124. func (c *basicsClient) RandomSwiftMessage(ctx context.Context, in *common.RandomNumAndSex, opts ...grpc.CallOption) (*common.CommonTextList, error) {
  125. out := new(common.CommonTextList)
  126. err := c.cc.Invoke(ctx, "/api.basics.Basics/RandomSwiftMessage", in, out, opts...)
  127. if err != nil {
  128. return nil, err
  129. }
  130. return out, nil
  131. }
  132. // BasicsServer is the server API for Basics service.
  133. // All implementations must embed UnimplementedBasicsServer
  134. // for forward compatibility
  135. type BasicsServer interface {
  136. RandomNickname(context.Context, *common.SexReq) (*RandomNicknameReply, error)
  137. RandomAvatar(context.Context, *common.SexReq) (*RandomAvatarReply, error)
  138. // 随机介绍接口
  139. RandomIntroduce(context.Context, *common.SexReq) (*common.RandomIntroduceReply, error)
  140. BannerConf(context.Context, *BannerConfRequest) (*BannerConfReply, error)
  141. // 随机头像列表
  142. RandomAvatarList(context.Context, *common.SexReq) (*RandomAvatarListReply, error)
  143. // 通过分组名和性别查询标签
  144. FindTagListBySex(context.Context, *common.SexReq) (*common.TagListReply, error)
  145. // 通过标签IDs查询标签
  146. FindTagsByIDs(context.Context, *common.Ids) (*common.TagListReply, error)
  147. // 通过类型获取表情包列表
  148. FindMemeByType(context.Context, *common.MemeRequest) (*common.MemeList, error)
  149. // 获取对方性别的聊天话题
  150. FindChatTopic(context.Context, *common.FindChatTopicRequest) (*common.ChatTopicList, error)
  151. // 随机表情包
  152. RandomMeme(context.Context, *common.RandomNum) (*common.CommonTextList, error)
  153. // 随机打招呼
  154. RandomSwiftMessage(context.Context, *common.RandomNumAndSex) (*common.CommonTextList, error)
  155. mustEmbedUnimplementedBasicsServer()
  156. }
  157. // UnimplementedBasicsServer must be embedded to have forward compatible implementations.
  158. type UnimplementedBasicsServer struct {
  159. }
  160. func (UnimplementedBasicsServer) RandomNickname(context.Context, *common.SexReq) (*RandomNicknameReply, error) {
  161. return nil, status.Errorf(codes.Unimplemented, "method RandomNickname not implemented")
  162. }
  163. func (UnimplementedBasicsServer) RandomAvatar(context.Context, *common.SexReq) (*RandomAvatarReply, error) {
  164. return nil, status.Errorf(codes.Unimplemented, "method RandomAvatar not implemented")
  165. }
  166. func (UnimplementedBasicsServer) RandomIntroduce(context.Context, *common.SexReq) (*common.RandomIntroduceReply, error) {
  167. return nil, status.Errorf(codes.Unimplemented, "method RandomIntroduce not implemented")
  168. }
  169. func (UnimplementedBasicsServer) BannerConf(context.Context, *BannerConfRequest) (*BannerConfReply, error) {
  170. return nil, status.Errorf(codes.Unimplemented, "method BannerConf not implemented")
  171. }
  172. func (UnimplementedBasicsServer) RandomAvatarList(context.Context, *common.SexReq) (*RandomAvatarListReply, error) {
  173. return nil, status.Errorf(codes.Unimplemented, "method RandomAvatarList not implemented")
  174. }
  175. func (UnimplementedBasicsServer) FindTagListBySex(context.Context, *common.SexReq) (*common.TagListReply, error) {
  176. return nil, status.Errorf(codes.Unimplemented, "method FindTagListBySex not implemented")
  177. }
  178. func (UnimplementedBasicsServer) FindTagsByIDs(context.Context, *common.Ids) (*common.TagListReply, error) {
  179. return nil, status.Errorf(codes.Unimplemented, "method FindTagsByIDs not implemented")
  180. }
  181. func (UnimplementedBasicsServer) FindMemeByType(context.Context, *common.MemeRequest) (*common.MemeList, error) {
  182. return nil, status.Errorf(codes.Unimplemented, "method FindMemeByType not implemented")
  183. }
  184. func (UnimplementedBasicsServer) FindChatTopic(context.Context, *common.FindChatTopicRequest) (*common.ChatTopicList, error) {
  185. return nil, status.Errorf(codes.Unimplemented, "method FindChatTopic not implemented")
  186. }
  187. func (UnimplementedBasicsServer) RandomMeme(context.Context, *common.RandomNum) (*common.CommonTextList, error) {
  188. return nil, status.Errorf(codes.Unimplemented, "method RandomMeme not implemented")
  189. }
  190. func (UnimplementedBasicsServer) RandomSwiftMessage(context.Context, *common.RandomNumAndSex) (*common.CommonTextList, error) {
  191. return nil, status.Errorf(codes.Unimplemented, "method RandomSwiftMessage not implemented")
  192. }
  193. func (UnimplementedBasicsServer) mustEmbedUnimplementedBasicsServer() {}
  194. // UnsafeBasicsServer may be embedded to opt out of forward compatibility for this service.
  195. // Use of this interface is not recommended, as added methods to BasicsServer will
  196. // result in compilation errors.
  197. type UnsafeBasicsServer interface {
  198. mustEmbedUnimplementedBasicsServer()
  199. }
  200. func RegisterBasicsServer(s grpc.ServiceRegistrar, srv BasicsServer) {
  201. s.RegisterService(&Basics_ServiceDesc, srv)
  202. }
  203. func _Basics_RandomNickname_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
  204. in := new(common.SexReq)
  205. if err := dec(in); err != nil {
  206. return nil, err
  207. }
  208. if interceptor == nil {
  209. return srv.(BasicsServer).RandomNickname(ctx, in)
  210. }
  211. info := &grpc.UnaryServerInfo{
  212. Server: srv,
  213. FullMethod: "/api.basics.Basics/RandomNickname",
  214. }
  215. handler := func(ctx context.Context, req interface{}) (interface{}, error) {
  216. return srv.(BasicsServer).RandomNickname(ctx, req.(*common.SexReq))
  217. }
  218. return interceptor(ctx, in, info, handler)
  219. }
  220. func _Basics_RandomAvatar_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
  221. in := new(common.SexReq)
  222. if err := dec(in); err != nil {
  223. return nil, err
  224. }
  225. if interceptor == nil {
  226. return srv.(BasicsServer).RandomAvatar(ctx, in)
  227. }
  228. info := &grpc.UnaryServerInfo{
  229. Server: srv,
  230. FullMethod: "/api.basics.Basics/RandomAvatar",
  231. }
  232. handler := func(ctx context.Context, req interface{}) (interface{}, error) {
  233. return srv.(BasicsServer).RandomAvatar(ctx, req.(*common.SexReq))
  234. }
  235. return interceptor(ctx, in, info, handler)
  236. }
  237. func _Basics_RandomIntroduce_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
  238. in := new(common.SexReq)
  239. if err := dec(in); err != nil {
  240. return nil, err
  241. }
  242. if interceptor == nil {
  243. return srv.(BasicsServer).RandomIntroduce(ctx, in)
  244. }
  245. info := &grpc.UnaryServerInfo{
  246. Server: srv,
  247. FullMethod: "/api.basics.Basics/RandomIntroduce",
  248. }
  249. handler := func(ctx context.Context, req interface{}) (interface{}, error) {
  250. return srv.(BasicsServer).RandomIntroduce(ctx, req.(*common.SexReq))
  251. }
  252. return interceptor(ctx, in, info, handler)
  253. }
  254. func _Basics_BannerConf_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
  255. in := new(BannerConfRequest)
  256. if err := dec(in); err != nil {
  257. return nil, err
  258. }
  259. if interceptor == nil {
  260. return srv.(BasicsServer).BannerConf(ctx, in)
  261. }
  262. info := &grpc.UnaryServerInfo{
  263. Server: srv,
  264. FullMethod: "/api.basics.Basics/BannerConf",
  265. }
  266. handler := func(ctx context.Context, req interface{}) (interface{}, error) {
  267. return srv.(BasicsServer).BannerConf(ctx, req.(*BannerConfRequest))
  268. }
  269. return interceptor(ctx, in, info, handler)
  270. }
  271. func _Basics_RandomAvatarList_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
  272. in := new(common.SexReq)
  273. if err := dec(in); err != nil {
  274. return nil, err
  275. }
  276. if interceptor == nil {
  277. return srv.(BasicsServer).RandomAvatarList(ctx, in)
  278. }
  279. info := &grpc.UnaryServerInfo{
  280. Server: srv,
  281. FullMethod: "/api.basics.Basics/RandomAvatarList",
  282. }
  283. handler := func(ctx context.Context, req interface{}) (interface{}, error) {
  284. return srv.(BasicsServer).RandomAvatarList(ctx, req.(*common.SexReq))
  285. }
  286. return interceptor(ctx, in, info, handler)
  287. }
  288. func _Basics_FindTagListBySex_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
  289. in := new(common.SexReq)
  290. if err := dec(in); err != nil {
  291. return nil, err
  292. }
  293. if interceptor == nil {
  294. return srv.(BasicsServer).FindTagListBySex(ctx, in)
  295. }
  296. info := &grpc.UnaryServerInfo{
  297. Server: srv,
  298. FullMethod: "/api.basics.Basics/FindTagListBySex",
  299. }
  300. handler := func(ctx context.Context, req interface{}) (interface{}, error) {
  301. return srv.(BasicsServer).FindTagListBySex(ctx, req.(*common.SexReq))
  302. }
  303. return interceptor(ctx, in, info, handler)
  304. }
  305. func _Basics_FindTagsByIDs_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
  306. in := new(common.Ids)
  307. if err := dec(in); err != nil {
  308. return nil, err
  309. }
  310. if interceptor == nil {
  311. return srv.(BasicsServer).FindTagsByIDs(ctx, in)
  312. }
  313. info := &grpc.UnaryServerInfo{
  314. Server: srv,
  315. FullMethod: "/api.basics.Basics/FindTagsByIDs",
  316. }
  317. handler := func(ctx context.Context, req interface{}) (interface{}, error) {
  318. return srv.(BasicsServer).FindTagsByIDs(ctx, req.(*common.Ids))
  319. }
  320. return interceptor(ctx, in, info, handler)
  321. }
  322. func _Basics_FindMemeByType_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
  323. in := new(common.MemeRequest)
  324. if err := dec(in); err != nil {
  325. return nil, err
  326. }
  327. if interceptor == nil {
  328. return srv.(BasicsServer).FindMemeByType(ctx, in)
  329. }
  330. info := &grpc.UnaryServerInfo{
  331. Server: srv,
  332. FullMethod: "/api.basics.Basics/FindMemeByType",
  333. }
  334. handler := func(ctx context.Context, req interface{}) (interface{}, error) {
  335. return srv.(BasicsServer).FindMemeByType(ctx, req.(*common.MemeRequest))
  336. }
  337. return interceptor(ctx, in, info, handler)
  338. }
  339. func _Basics_FindChatTopic_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
  340. in := new(common.FindChatTopicRequest)
  341. if err := dec(in); err != nil {
  342. return nil, err
  343. }
  344. if interceptor == nil {
  345. return srv.(BasicsServer).FindChatTopic(ctx, in)
  346. }
  347. info := &grpc.UnaryServerInfo{
  348. Server: srv,
  349. FullMethod: "/api.basics.Basics/FindChatTopic",
  350. }
  351. handler := func(ctx context.Context, req interface{}) (interface{}, error) {
  352. return srv.(BasicsServer).FindChatTopic(ctx, req.(*common.FindChatTopicRequest))
  353. }
  354. return interceptor(ctx, in, info, handler)
  355. }
  356. func _Basics_RandomMeme_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
  357. in := new(common.RandomNum)
  358. if err := dec(in); err != nil {
  359. return nil, err
  360. }
  361. if interceptor == nil {
  362. return srv.(BasicsServer).RandomMeme(ctx, in)
  363. }
  364. info := &grpc.UnaryServerInfo{
  365. Server: srv,
  366. FullMethod: "/api.basics.Basics/RandomMeme",
  367. }
  368. handler := func(ctx context.Context, req interface{}) (interface{}, error) {
  369. return srv.(BasicsServer).RandomMeme(ctx, req.(*common.RandomNum))
  370. }
  371. return interceptor(ctx, in, info, handler)
  372. }
  373. func _Basics_RandomSwiftMessage_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
  374. in := new(common.RandomNumAndSex)
  375. if err := dec(in); err != nil {
  376. return nil, err
  377. }
  378. if interceptor == nil {
  379. return srv.(BasicsServer).RandomSwiftMessage(ctx, in)
  380. }
  381. info := &grpc.UnaryServerInfo{
  382. Server: srv,
  383. FullMethod: "/api.basics.Basics/RandomSwiftMessage",
  384. }
  385. handler := func(ctx context.Context, req interface{}) (interface{}, error) {
  386. return srv.(BasicsServer).RandomSwiftMessage(ctx, req.(*common.RandomNumAndSex))
  387. }
  388. return interceptor(ctx, in, info, handler)
  389. }
  390. // Basics_ServiceDesc is the grpc.ServiceDesc for Basics service.
  391. // It's only intended for direct use with grpc.RegisterService,
  392. // and not to be introspected or modified (even as a copy)
  393. var Basics_ServiceDesc = grpc.ServiceDesc{
  394. ServiceName: "api.basics.Basics",
  395. HandlerType: (*BasicsServer)(nil),
  396. Methods: []grpc.MethodDesc{
  397. {
  398. MethodName: "RandomNickname",
  399. Handler: _Basics_RandomNickname_Handler,
  400. },
  401. {
  402. MethodName: "RandomAvatar",
  403. Handler: _Basics_RandomAvatar_Handler,
  404. },
  405. {
  406. MethodName: "RandomIntroduce",
  407. Handler: _Basics_RandomIntroduce_Handler,
  408. },
  409. {
  410. MethodName: "BannerConf",
  411. Handler: _Basics_BannerConf_Handler,
  412. },
  413. {
  414. MethodName: "RandomAvatarList",
  415. Handler: _Basics_RandomAvatarList_Handler,
  416. },
  417. {
  418. MethodName: "FindTagListBySex",
  419. Handler: _Basics_FindTagListBySex_Handler,
  420. },
  421. {
  422. MethodName: "FindTagsByIDs",
  423. Handler: _Basics_FindTagsByIDs_Handler,
  424. },
  425. {
  426. MethodName: "FindMemeByType",
  427. Handler: _Basics_FindMemeByType_Handler,
  428. },
  429. {
  430. MethodName: "FindChatTopic",
  431. Handler: _Basics_FindChatTopic_Handler,
  432. },
  433. {
  434. MethodName: "RandomMeme",
  435. Handler: _Basics_RandomMeme_Handler,
  436. },
  437. {
  438. MethodName: "RandomSwiftMessage",
  439. Handler: _Basics_RandomSwiftMessage_Handler,
  440. },
  441. },
  442. Streams: []grpc.StreamDesc{},
  443. Metadata: "basics.proto",
  444. }