BaseInfo.liverpc.go 1.6 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859
  1. // Code generated by protoc-gen-liverpc v0.1, DO NOT EDIT.
  2. // source: v1/BaseInfo.proto
  3. package v1
  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. // BaseInfo Interface
  10. // ==================
  11. type BaseInfo interface {
  12. // * uid获取关注列表和粉丝数
  13. //
  14. GetFollowType(context.Context, *BaseInfoGetFollowTypeReq) (*BaseInfoGetFollowTypeResp, error)
  15. // * uid获取最近30天送礼数据
  16. //
  17. GetGiftInfo(context.Context, *BaseInfoGetGiftInfoReq) (*BaseInfoGetGiftInfoResp, error)
  18. }
  19. // ========================
  20. // BaseInfo Live Rpc Client
  21. // ========================
  22. type baseInfoRpcClient struct {
  23. client *liverpc.Client
  24. }
  25. // NewBaseInfoRpcClient creates a Rpc client that implements the BaseInfo interface.
  26. // It communicates using Rpc and can be configured with a custom HTTPClient.
  27. func NewBaseInfoRpcClient(client *liverpc.Client) BaseInfo {
  28. return &baseInfoRpcClient{
  29. client: client,
  30. }
  31. }
  32. func (c *baseInfoRpcClient) GetFollowType(ctx context.Context, in *BaseInfoGetFollowTypeReq) (*BaseInfoGetFollowTypeResp, error) {
  33. out := new(BaseInfoGetFollowTypeResp)
  34. err := doRpcRequest(ctx, c.client, 1, "BaseInfo.getFollowType", in, out)
  35. if err != nil {
  36. return nil, err
  37. }
  38. return out, nil
  39. }
  40. func (c *baseInfoRpcClient) GetGiftInfo(ctx context.Context, in *BaseInfoGetGiftInfoReq) (*BaseInfoGetGiftInfoResp, error) {
  41. out := new(BaseInfoGetGiftInfoResp)
  42. err := doRpcRequest(ctx, c.client, 1, "BaseInfo.getGiftInfo", in, out)
  43. if err != nil {
  44. return nil, err
  45. }
  46. return out, nil
  47. }