basics_grpc.pb.go 18 KB

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