HighQps.liverpc.go 2.4 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182838485
  1. // Code generated by protoc-gen-liverpc v0.1, DO NOT EDIT.
  2. // source: v2/HighQps.proto
  3. package v2
  4. import context "context"
  5. import proto "github.com/golang/protobuf/proto"
  6. import "go-common/library/net/rpc/liverpc"
  7. var _ proto.Message // generate to suppress unused imports
  8. // =================
  9. // HighQps Interface
  10. // =================
  11. type HighQps interface {
  12. // * 某个up主动态,评论中的勋章信息,提供给主站调用
  13. //
  14. ReplyMedals(context.Context, *HighQpsReplyMedalsReq) (*HighQpsReplyMedalsResp, error)
  15. // * 获取直播站佩戴中的勋章
  16. //
  17. LiveWeared(context.Context, *HighQpsLiveWearedReq) (*HighQpsLiveWearedResp, error)
  18. // * 获取用户在直播站领取过的勋章
  19. //
  20. LiveReceived(context.Context, *HighQpsLiveReceivedReq) (*HighQpsLiveReceivedResp, error)
  21. // * 获取某个up主的勋章状态
  22. //
  23. UpMedal(context.Context, *HighQpsUpMedalReq) (*HighQpsUpMedalResp, error)
  24. }
  25. // =======================
  26. // HighQps Live Rpc Client
  27. // =======================
  28. type highQpsRpcClient struct {
  29. client *liverpc.Client
  30. }
  31. // NewHighQpsRpcClient creates a Rpc client that implements the HighQps interface.
  32. // It communicates using Rpc and can be configured with a custom HTTPClient.
  33. func NewHighQpsRpcClient(client *liverpc.Client) HighQps {
  34. return &highQpsRpcClient{
  35. client: client,
  36. }
  37. }
  38. func (c *highQpsRpcClient) ReplyMedals(ctx context.Context, in *HighQpsReplyMedalsReq) (*HighQpsReplyMedalsResp, error) {
  39. out := new(HighQpsReplyMedalsResp)
  40. err := doRpcRequest(ctx, c.client, 2, "HighQps.reply_medals", in, out)
  41. if err != nil {
  42. return nil, err
  43. }
  44. return out, nil
  45. }
  46. func (c *highQpsRpcClient) LiveWeared(ctx context.Context, in *HighQpsLiveWearedReq) (*HighQpsLiveWearedResp, error) {
  47. out := new(HighQpsLiveWearedResp)
  48. err := doRpcRequest(ctx, c.client, 2, "HighQps.live_weared", in, out)
  49. if err != nil {
  50. return nil, err
  51. }
  52. return out, nil
  53. }
  54. func (c *highQpsRpcClient) LiveReceived(ctx context.Context, in *HighQpsLiveReceivedReq) (*HighQpsLiveReceivedResp, error) {
  55. out := new(HighQpsLiveReceivedResp)
  56. err := doRpcRequest(ctx, c.client, 2, "HighQps.live_received", in, out)
  57. if err != nil {
  58. return nil, err
  59. }
  60. return out, nil
  61. }
  62. func (c *highQpsRpcClient) UpMedal(ctx context.Context, in *HighQpsUpMedalReq) (*HighQpsUpMedalResp, error) {
  63. out := new(HighQpsUpMedalResp)
  64. err := doRpcRequest(ctx, c.client, 2, "HighQps.up_medal", in, out)
  65. if err != nil {
  66. return nil, err
  67. }
  68. return out, nil
  69. }