UserTitle.liverpc.go 3.2 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182838485868788899091929394959697
  1. // Code generated by protoc-gen-liverpc v0.1, DO NOT EDIT.
  2. // source: v1/UserTitle.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. // UserTitle Interface
  10. // ===================
  11. type UserTitleRPCClient interface {
  12. // * 根据头衔id获取头衔名称,头衔不存在不返回
  13. //
  14. GetTitleByIds(ctx context.Context, req *UserTitleGetTitleByIdsReq, opts ...liverpc.CallOption) (resp *UserTitleGetTitleByIdsResp, err error)
  15. // * 移动端获取佩戴的头衔
  16. //
  17. GetMobileTitle(ctx context.Context, req *UserTitleGetMobileTitleReq, opts ...liverpc.CallOption) (resp *UserTitleGetMobileTitleResp, err error)
  18. // * 获取弹幕头衔(需要登录态)
  19. //
  20. GetCommentTitle(ctx context.Context, req *UserTitleGetCommentTitleReq, opts ...liverpc.CallOption) (resp *UserTitleGetCommentTitleResp, err error)
  21. // * 添加头衔
  22. //
  23. Add(ctx context.Context, req *UserTitleAddReq, opts ...liverpc.CallOption) (resp *UserTitleAddResp, err error)
  24. // * 个人中心我的头衔列表
  25. //
  26. GetAll(ctx context.Context, req *UserTitleGetAllReq, opts ...liverpc.CallOption) (resp *UserTitleGetAllResp, err error)
  27. }
  28. // =========================
  29. // UserTitle Live Rpc Client
  30. // =========================
  31. type userTitleRPCClient struct {
  32. client *liverpc.Client
  33. }
  34. // NewUserTitleRPCClient creates a client that implements the UserTitleRPCClient interface.
  35. func NewUserTitleRPCClient(client *liverpc.Client) UserTitleRPCClient {
  36. return &userTitleRPCClient{
  37. client: client,
  38. }
  39. }
  40. func (c *userTitleRPCClient) GetTitleByIds(ctx context.Context, in *UserTitleGetTitleByIdsReq, opts ...liverpc.CallOption) (*UserTitleGetTitleByIdsResp, error) {
  41. out := new(UserTitleGetTitleByIdsResp)
  42. err := doRPCRequest(ctx, c.client, 1, "UserTitle.getTitleByIds", in, out, opts)
  43. if err != nil {
  44. return nil, err
  45. }
  46. return out, nil
  47. }
  48. func (c *userTitleRPCClient) GetMobileTitle(ctx context.Context, in *UserTitleGetMobileTitleReq, opts ...liverpc.CallOption) (*UserTitleGetMobileTitleResp, error) {
  49. out := new(UserTitleGetMobileTitleResp)
  50. err := doRPCRequest(ctx, c.client, 1, "UserTitle.getMobileTitle", in, out, opts)
  51. if err != nil {
  52. return nil, err
  53. }
  54. return out, nil
  55. }
  56. func (c *userTitleRPCClient) GetCommentTitle(ctx context.Context, in *UserTitleGetCommentTitleReq, opts ...liverpc.CallOption) (*UserTitleGetCommentTitleResp, error) {
  57. out := new(UserTitleGetCommentTitleResp)
  58. err := doRPCRequest(ctx, c.client, 1, "UserTitle.getCommentTitle", in, out, opts)
  59. if err != nil {
  60. return nil, err
  61. }
  62. return out, nil
  63. }
  64. func (c *userTitleRPCClient) Add(ctx context.Context, in *UserTitleAddReq, opts ...liverpc.CallOption) (*UserTitleAddResp, error) {
  65. out := new(UserTitleAddResp)
  66. err := doRPCRequest(ctx, c.client, 1, "UserTitle.add", in, out, opts)
  67. if err != nil {
  68. return nil, err
  69. }
  70. return out, nil
  71. }
  72. func (c *userTitleRPCClient) GetAll(ctx context.Context, in *UserTitleGetAllReq, opts ...liverpc.CallOption) (*UserTitleGetAllResp, error) {
  73. out := new(UserTitleGetAllResp)
  74. err := doRPCRequest(ctx, c.client, 1, "UserTitle.getAll", in, out, opts)
  75. if err != nil {
  76. return nil, err
  77. }
  78. return out, nil
  79. }