Achv.liverpc.go 1.6 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364
  1. // Code generated by protoc-gen-liverpc v0.1, DO NOT EDIT.
  2. // source: v1/Achv.proto
  3. /*
  4. Package v1 is a generated liverpc stub package.
  5. This code was generated with go-common/app/tool/liverpc/protoc-gen-liverpc v0.1.
  6. It is generated from these files:
  7. v1/Achv.proto
  8. v1/TitleStuff.proto
  9. v1/UserTitle.proto
  10. */
  11. package v1
  12. import context "context"
  13. import proto "github.com/golang/protobuf/proto"
  14. import "go-common/library/net/rpc/liverpc"
  15. var _ proto.Message // generate to suppress unused imports
  16. // Imports only used by utility functions:
  17. // ==============
  18. // Achv Interface
  19. // ==============
  20. type AchvRPCClient interface {
  21. // * 用户成就统计
  22. // 用户成就统计
  23. Userstatus(ctx context.Context, req *AchvUserstatusReq, opts ...liverpc.CallOption) (resp *AchvUserstatusResp, err error)
  24. }
  25. // ====================
  26. // Achv Live Rpc Client
  27. // ====================
  28. type achvRPCClient struct {
  29. client *liverpc.Client
  30. }
  31. // NewAchvRPCClient creates a client that implements the AchvRPCClient interface.
  32. func NewAchvRPCClient(client *liverpc.Client) AchvRPCClient {
  33. return &achvRPCClient{
  34. client: client,
  35. }
  36. }
  37. func (c *achvRPCClient) Userstatus(ctx context.Context, in *AchvUserstatusReq, opts ...liverpc.CallOption) (*AchvUserstatusResp, error) {
  38. out := new(AchvUserstatusResp)
  39. err := doRPCRequest(ctx, c.client, 1, "Achv.userstatus", in, out, opts)
  40. if err != nil {
  41. return nil, err
  42. }
  43. return out, nil
  44. }
  45. // =====
  46. // Utils
  47. // =====
  48. func doRPCRequest(ctx context.Context, client *liverpc.Client, version int, method string, in, out proto.Message, opts []liverpc.CallOption) (err error) {
  49. err = client.Call(ctx, version, method, in, out, opts...)
  50. return
  51. }