cmd.go 5.2 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117
  1. // Code generated by goctl. DO NOT EDIT!
  2. // Source: cmd.proto
  3. package cmd
  4. import (
  5. "context"
  6. "ylink/core/cmd/rpc/pb"
  7. "github.com/zeromicro/go-zero/zrpc"
  8. "google.golang.org/grpc"
  9. )
  10. type (
  11. CsConnectPlayerReq = pb.CsConnectPlayerReq
  12. CsConnectPlayerResp = pb.CsConnectPlayerResp
  13. CsFetchHistoryChatReq = pb.CsFetchHistoryChatReq
  14. CsFetchHistoryChatResp = pb.CsFetchHistoryChatResp
  15. CsFetchHistoryMsgReq = pb.CsFetchHistoryMsgReq
  16. CsFetchHistoryMsgResp = pb.CsFetchHistoryMsgResp
  17. CsFetchMsgReq = pb.CsFetchMsgReq
  18. CsFetchMsgResp = pb.CsFetchMsgResp
  19. CsFetchPlayerQueueReq = pb.CsFetchPlayerQueueReq
  20. CsFetchPlayerQueueResp = pb.CsFetchPlayerQueueResp
  21. CsSendMsgReq = pb.CsSendMsgReq
  22. CsSendMsgResp = pb.CsSendMsgResp
  23. PlayerDisconnectReq = pb.PlayerDisconnectReq
  24. PlayerDisconnectResp = pb.PlayerDisconnectResp
  25. PlayerFetchCsInfoReq = pb.PlayerFetchCsInfoReq
  26. PlayerFetchCsInfoResp = pb.PlayerFetchCsInfoResp
  27. PlayerFetchHistoryMsgReq = pb.PlayerFetchHistoryMsgReq
  28. PlayerFetchHistoryMsgResp = pb.PlayerFetchHistoryMsgResp
  29. PlayerFetchMsgReq = pb.PlayerFetchMsgReq
  30. PlayerFetchMsgResp = pb.PlayerFetchMsgResp
  31. PlayerSendMsgReq = pb.PlayerSendMsgReq
  32. PlayerSendMsgResp = pb.PlayerSendMsgResp
  33. Cmd interface {
  34. PlayerFetchCsInfo(ctx context.Context, in *PlayerFetchCsInfoReq, opts ...grpc.CallOption) (*PlayerFetchCsInfoResp, error)
  35. PlayerFetchHistoryMsg(ctx context.Context, in *PlayerFetchHistoryMsgReq, opts ...grpc.CallOption) (*PlayerFetchHistoryMsgResp, error)
  36. PlayerFetchMsg(ctx context.Context, in *PlayerFetchMsgReq, opts ...grpc.CallOption) (*PlayerFetchMsgResp, error)
  37. PlayerSendMsg(ctx context.Context, in *PlayerSendMsgReq, opts ...grpc.CallOption) (*PlayerSendMsgResp, error)
  38. PlayerDisconnect(ctx context.Context, in *PlayerDisconnectReq, opts ...grpc.CallOption) (*PlayerDisconnectResp, error)
  39. CsFetchPlayerQueue(ctx context.Context, in *CsFetchPlayerQueueReq, opts ...grpc.CallOption) (*CsFetchPlayerQueueResp, error)
  40. CsConnectPlayer(ctx context.Context, in *CsConnectPlayerReq, opts ...grpc.CallOption) (*CsConnectPlayerResp, error)
  41. CsFetchHistoryChat(ctx context.Context, in *CsFetchHistoryChatReq, opts ...grpc.CallOption) (*CsFetchHistoryChatResp, error)
  42. CsFetchHistoryMsg(ctx context.Context, in *CsFetchHistoryMsgReq, opts ...grpc.CallOption) (*CsFetchHistoryMsgResp, error)
  43. CsFetchMsg(ctx context.Context, in *CsFetchMsgReq, opts ...grpc.CallOption) (*CsFetchMsgResp, error)
  44. CsSendMsg(ctx context.Context, in *CsSendMsgReq, opts ...grpc.CallOption) (*CsSendMsgResp, error)
  45. }
  46. defaultCmd struct {
  47. cli zrpc.Client
  48. }
  49. )
  50. func NewCmd(cli zrpc.Client) Cmd {
  51. return &defaultCmd{
  52. cli: cli,
  53. }
  54. }
  55. func (m *defaultCmd) PlayerFetchCsInfo(ctx context.Context, in *PlayerFetchCsInfoReq, opts ...grpc.CallOption) (*PlayerFetchCsInfoResp, error) {
  56. client := pb.NewCmdClient(m.cli.Conn())
  57. return client.PlayerFetchCsInfo(ctx, in, opts...)
  58. }
  59. func (m *defaultCmd) PlayerFetchHistoryMsg(ctx context.Context, in *PlayerFetchHistoryMsgReq, opts ...grpc.CallOption) (*PlayerFetchHistoryMsgResp, error) {
  60. client := pb.NewCmdClient(m.cli.Conn())
  61. return client.PlayerFetchHistoryMsg(ctx, in, opts...)
  62. }
  63. func (m *defaultCmd) PlayerFetchMsg(ctx context.Context, in *PlayerFetchMsgReq, opts ...grpc.CallOption) (*PlayerFetchMsgResp, error) {
  64. client := pb.NewCmdClient(m.cli.Conn())
  65. return client.PlayerFetchMsg(ctx, in, opts...)
  66. }
  67. func (m *defaultCmd) PlayerSendMsg(ctx context.Context, in *PlayerSendMsgReq, opts ...grpc.CallOption) (*PlayerSendMsgResp, error) {
  68. client := pb.NewCmdClient(m.cli.Conn())
  69. return client.PlayerSendMsg(ctx, in, opts...)
  70. }
  71. func (m *defaultCmd) PlayerDisconnect(ctx context.Context, in *PlayerDisconnectReq, opts ...grpc.CallOption) (*PlayerDisconnectResp, error) {
  72. client := pb.NewCmdClient(m.cli.Conn())
  73. return client.PlayerDisconnect(ctx, in, opts...)
  74. }
  75. func (m *defaultCmd) CsFetchPlayerQueue(ctx context.Context, in *CsFetchPlayerQueueReq, opts ...grpc.CallOption) (*CsFetchPlayerQueueResp, error) {
  76. client := pb.NewCmdClient(m.cli.Conn())
  77. return client.CsFetchPlayerQueue(ctx, in, opts...)
  78. }
  79. func (m *defaultCmd) CsConnectPlayer(ctx context.Context, in *CsConnectPlayerReq, opts ...grpc.CallOption) (*CsConnectPlayerResp, error) {
  80. client := pb.NewCmdClient(m.cli.Conn())
  81. return client.CsConnectPlayer(ctx, in, opts...)
  82. }
  83. func (m *defaultCmd) CsFetchHistoryChat(ctx context.Context, in *CsFetchHistoryChatReq, opts ...grpc.CallOption) (*CsFetchHistoryChatResp, error) {
  84. client := pb.NewCmdClient(m.cli.Conn())
  85. return client.CsFetchHistoryChat(ctx, in, opts...)
  86. }
  87. func (m *defaultCmd) CsFetchHistoryMsg(ctx context.Context, in *CsFetchHistoryMsgReq, opts ...grpc.CallOption) (*CsFetchHistoryMsgResp, error) {
  88. client := pb.NewCmdClient(m.cli.Conn())
  89. return client.CsFetchHistoryMsg(ctx, in, opts...)
  90. }
  91. func (m *defaultCmd) CsFetchMsg(ctx context.Context, in *CsFetchMsgReq, opts ...grpc.CallOption) (*CsFetchMsgResp, error) {
  92. client := pb.NewCmdClient(m.cli.Conn())
  93. return client.CsFetchMsg(ctx, in, opts...)
  94. }
  95. func (m *defaultCmd) CsSendMsg(ctx context.Context, in *CsSendMsgReq, opts ...grpc.CallOption) (*CsSendMsgResp, error) {
  96. client := pb.NewCmdClient(m.cli.Conn())
  97. return client.CsSendMsg(ctx, in, opts...)
  98. }