cmd_grpc.pb.go 13 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357
  1. // Code generated by protoc-gen-go-grpc. DO NOT EDIT.
  2. // versions:
  3. // - protoc-gen-go-grpc v1.2.0
  4. // - protoc v3.19.4
  5. // source: pb/cmd.proto
  6. package pb
  7. import (
  8. context "context"
  9. grpc "google.golang.org/grpc"
  10. codes "google.golang.org/grpc/codes"
  11. status "google.golang.org/grpc/status"
  12. )
  13. // This is a compile-time assertion to ensure that this generated file
  14. // is compatible with the grpc package it is being compiled against.
  15. // Requires gRPC-Go v1.32.0 or later.
  16. const _ = grpc.SupportPackageIsVersion7
  17. // CmdClient is the client API for Cmd service.
  18. //
  19. // For semantics around ctx use and closing/ending streaming RPCs, please refer to https://pkg.go.dev/google.golang.org/grpc/?tab=doc#ClientConn.NewStream.
  20. type CmdClient interface {
  21. PlayerFetchCsInfo(ctx context.Context, in *PlayerFetchCsInfoReq, opts ...grpc.CallOption) (*PlayerFetchCsInfoResp, error)
  22. PlayerFetchHistoryMsg(ctx context.Context, in *PlayerFetchHistoryMsgReq, opts ...grpc.CallOption) (*PlayerFetchHistoryMsgResp, error)
  23. PlayerSendMsg(ctx context.Context, in *PlayerSendMsgReq, opts ...grpc.CallOption) (*PlayerSendMsgResp, error)
  24. CsFetchPlayerQueue(ctx context.Context, in *CsFetchPlayerQueueReq, opts ...grpc.CallOption) (*CsFetchPlayerQueueResp, error)
  25. CsConnectPlayer(ctx context.Context, in *CsConnectPlayerReq, opts ...grpc.CallOption) (*CsConnectPlayerResp, error)
  26. CsFetchHistoryChat(ctx context.Context, in *CsFetchHistoryChatReq, opts ...grpc.CallOption) (*CsFetchHistoryChatResp, error)
  27. CsFetchHistoryMsg(ctx context.Context, in *CsFetchHistoryMsgReq, opts ...grpc.CallOption) (*CsFetchHistoryMsgResp, error)
  28. CsSendMsg(ctx context.Context, in *CsSendMsgReq, opts ...grpc.CallOption) (*CsSendMsgResp, error)
  29. }
  30. type cmdClient struct {
  31. cc grpc.ClientConnInterface
  32. }
  33. func NewCmdClient(cc grpc.ClientConnInterface) CmdClient {
  34. return &cmdClient{cc}
  35. }
  36. func (c *cmdClient) PlayerFetchCsInfo(ctx context.Context, in *PlayerFetchCsInfoReq, opts ...grpc.CallOption) (*PlayerFetchCsInfoResp, error) {
  37. out := new(PlayerFetchCsInfoResp)
  38. err := c.cc.Invoke(ctx, "/pb.Cmd/playerFetchCsInfo", in, out, opts...)
  39. if err != nil {
  40. return nil, err
  41. }
  42. return out, nil
  43. }
  44. func (c *cmdClient) PlayerFetchHistoryMsg(ctx context.Context, in *PlayerFetchHistoryMsgReq, opts ...grpc.CallOption) (*PlayerFetchHistoryMsgResp, error) {
  45. out := new(PlayerFetchHistoryMsgResp)
  46. err := c.cc.Invoke(ctx, "/pb.Cmd/playerFetchHistoryMsg", in, out, opts...)
  47. if err != nil {
  48. return nil, err
  49. }
  50. return out, nil
  51. }
  52. func (c *cmdClient) PlayerSendMsg(ctx context.Context, in *PlayerSendMsgReq, opts ...grpc.CallOption) (*PlayerSendMsgResp, error) {
  53. out := new(PlayerSendMsgResp)
  54. err := c.cc.Invoke(ctx, "/pb.Cmd/playerSendMsg", in, out, opts...)
  55. if err != nil {
  56. return nil, err
  57. }
  58. return out, nil
  59. }
  60. func (c *cmdClient) CsFetchPlayerQueue(ctx context.Context, in *CsFetchPlayerQueueReq, opts ...grpc.CallOption) (*CsFetchPlayerQueueResp, error) {
  61. out := new(CsFetchPlayerQueueResp)
  62. err := c.cc.Invoke(ctx, "/pb.Cmd/csFetchPlayerQueue", in, out, opts...)
  63. if err != nil {
  64. return nil, err
  65. }
  66. return out, nil
  67. }
  68. func (c *cmdClient) CsConnectPlayer(ctx context.Context, in *CsConnectPlayerReq, opts ...grpc.CallOption) (*CsConnectPlayerResp, error) {
  69. out := new(CsConnectPlayerResp)
  70. err := c.cc.Invoke(ctx, "/pb.Cmd/csConnectPlayer", in, out, opts...)
  71. if err != nil {
  72. return nil, err
  73. }
  74. return out, nil
  75. }
  76. func (c *cmdClient) CsFetchHistoryChat(ctx context.Context, in *CsFetchHistoryChatReq, opts ...grpc.CallOption) (*CsFetchHistoryChatResp, error) {
  77. out := new(CsFetchHistoryChatResp)
  78. err := c.cc.Invoke(ctx, "/pb.Cmd/csFetchHistoryChat", in, out, opts...)
  79. if err != nil {
  80. return nil, err
  81. }
  82. return out, nil
  83. }
  84. func (c *cmdClient) CsFetchHistoryMsg(ctx context.Context, in *CsFetchHistoryMsgReq, opts ...grpc.CallOption) (*CsFetchHistoryMsgResp, error) {
  85. out := new(CsFetchHistoryMsgResp)
  86. err := c.cc.Invoke(ctx, "/pb.Cmd/csFetchHistoryMsg", in, out, opts...)
  87. if err != nil {
  88. return nil, err
  89. }
  90. return out, nil
  91. }
  92. func (c *cmdClient) CsSendMsg(ctx context.Context, in *CsSendMsgReq, opts ...grpc.CallOption) (*CsSendMsgResp, error) {
  93. out := new(CsSendMsgResp)
  94. err := c.cc.Invoke(ctx, "/pb.Cmd/csSendMsg", in, out, opts...)
  95. if err != nil {
  96. return nil, err
  97. }
  98. return out, nil
  99. }
  100. // CmdServer is the server API for Cmd service.
  101. // All implementations must embed UnimplementedCmdServer
  102. // for forward compatibility
  103. type CmdServer interface {
  104. PlayerFetchCsInfo(context.Context, *PlayerFetchCsInfoReq) (*PlayerFetchCsInfoResp, error)
  105. PlayerFetchHistoryMsg(context.Context, *PlayerFetchHistoryMsgReq) (*PlayerFetchHistoryMsgResp, error)
  106. PlayerSendMsg(context.Context, *PlayerSendMsgReq) (*PlayerSendMsgResp, error)
  107. CsFetchPlayerQueue(context.Context, *CsFetchPlayerQueueReq) (*CsFetchPlayerQueueResp, error)
  108. CsConnectPlayer(context.Context, *CsConnectPlayerReq) (*CsConnectPlayerResp, error)
  109. CsFetchHistoryChat(context.Context, *CsFetchHistoryChatReq) (*CsFetchHistoryChatResp, error)
  110. CsFetchHistoryMsg(context.Context, *CsFetchHistoryMsgReq) (*CsFetchHistoryMsgResp, error)
  111. CsSendMsg(context.Context, *CsSendMsgReq) (*CsSendMsgResp, error)
  112. mustEmbedUnimplementedCmdServer()
  113. }
  114. // UnimplementedCmdServer must be embedded to have forward compatible implementations.
  115. type UnimplementedCmdServer struct {
  116. }
  117. func (UnimplementedCmdServer) PlayerFetchCsInfo(context.Context, *PlayerFetchCsInfoReq) (*PlayerFetchCsInfoResp, error) {
  118. return nil, status.Errorf(codes.Unimplemented, "method PlayerFetchCsInfo not implemented")
  119. }
  120. func (UnimplementedCmdServer) PlayerFetchHistoryMsg(context.Context, *PlayerFetchHistoryMsgReq) (*PlayerFetchHistoryMsgResp, error) {
  121. return nil, status.Errorf(codes.Unimplemented, "method PlayerFetchHistoryMsg not implemented")
  122. }
  123. func (UnimplementedCmdServer) PlayerSendMsg(context.Context, *PlayerSendMsgReq) (*PlayerSendMsgResp, error) {
  124. return nil, status.Errorf(codes.Unimplemented, "method PlayerSendMsg not implemented")
  125. }
  126. func (UnimplementedCmdServer) CsFetchPlayerQueue(context.Context, *CsFetchPlayerQueueReq) (*CsFetchPlayerQueueResp, error) {
  127. return nil, status.Errorf(codes.Unimplemented, "method CsFetchPlayerQueue not implemented")
  128. }
  129. func (UnimplementedCmdServer) CsConnectPlayer(context.Context, *CsConnectPlayerReq) (*CsConnectPlayerResp, error) {
  130. return nil, status.Errorf(codes.Unimplemented, "method CsConnectPlayer not implemented")
  131. }
  132. func (UnimplementedCmdServer) CsFetchHistoryChat(context.Context, *CsFetchHistoryChatReq) (*CsFetchHistoryChatResp, error) {
  133. return nil, status.Errorf(codes.Unimplemented, "method CsFetchHistoryChat not implemented")
  134. }
  135. func (UnimplementedCmdServer) CsFetchHistoryMsg(context.Context, *CsFetchHistoryMsgReq) (*CsFetchHistoryMsgResp, error) {
  136. return nil, status.Errorf(codes.Unimplemented, "method CsFetchHistoryMsg not implemented")
  137. }
  138. func (UnimplementedCmdServer) CsSendMsg(context.Context, *CsSendMsgReq) (*CsSendMsgResp, error) {
  139. return nil, status.Errorf(codes.Unimplemented, "method CsSendMsg not implemented")
  140. }
  141. func (UnimplementedCmdServer) mustEmbedUnimplementedCmdServer() {}
  142. // UnsafeCmdServer may be embedded to opt out of forward compatibility for this service.
  143. // Use of this interface is not recommended, as added methods to CmdServer will
  144. // result in compilation errors.
  145. type UnsafeCmdServer interface {
  146. mustEmbedUnimplementedCmdServer()
  147. }
  148. func RegisterCmdServer(s grpc.ServiceRegistrar, srv CmdServer) {
  149. s.RegisterService(&Cmd_ServiceDesc, srv)
  150. }
  151. func _Cmd_PlayerFetchCsInfo_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
  152. in := new(PlayerFetchCsInfoReq)
  153. if err := dec(in); err != nil {
  154. return nil, err
  155. }
  156. if interceptor == nil {
  157. return srv.(CmdServer).PlayerFetchCsInfo(ctx, in)
  158. }
  159. info := &grpc.UnaryServerInfo{
  160. Server: srv,
  161. FullMethod: "/pb.Cmd/playerFetchCsInfo",
  162. }
  163. handler := func(ctx context.Context, req interface{}) (interface{}, error) {
  164. return srv.(CmdServer).PlayerFetchCsInfo(ctx, req.(*PlayerFetchCsInfoReq))
  165. }
  166. return interceptor(ctx, in, info, handler)
  167. }
  168. func _Cmd_PlayerFetchHistoryMsg_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
  169. in := new(PlayerFetchHistoryMsgReq)
  170. if err := dec(in); err != nil {
  171. return nil, err
  172. }
  173. if interceptor == nil {
  174. return srv.(CmdServer).PlayerFetchHistoryMsg(ctx, in)
  175. }
  176. info := &grpc.UnaryServerInfo{
  177. Server: srv,
  178. FullMethod: "/pb.Cmd/playerFetchHistoryMsg",
  179. }
  180. handler := func(ctx context.Context, req interface{}) (interface{}, error) {
  181. return srv.(CmdServer).PlayerFetchHistoryMsg(ctx, req.(*PlayerFetchHistoryMsgReq))
  182. }
  183. return interceptor(ctx, in, info, handler)
  184. }
  185. func _Cmd_PlayerSendMsg_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
  186. in := new(PlayerSendMsgReq)
  187. if err := dec(in); err != nil {
  188. return nil, err
  189. }
  190. if interceptor == nil {
  191. return srv.(CmdServer).PlayerSendMsg(ctx, in)
  192. }
  193. info := &grpc.UnaryServerInfo{
  194. Server: srv,
  195. FullMethod: "/pb.Cmd/playerSendMsg",
  196. }
  197. handler := func(ctx context.Context, req interface{}) (interface{}, error) {
  198. return srv.(CmdServer).PlayerSendMsg(ctx, req.(*PlayerSendMsgReq))
  199. }
  200. return interceptor(ctx, in, info, handler)
  201. }
  202. func _Cmd_CsFetchPlayerQueue_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
  203. in := new(CsFetchPlayerQueueReq)
  204. if err := dec(in); err != nil {
  205. return nil, err
  206. }
  207. if interceptor == nil {
  208. return srv.(CmdServer).CsFetchPlayerQueue(ctx, in)
  209. }
  210. info := &grpc.UnaryServerInfo{
  211. Server: srv,
  212. FullMethod: "/pb.Cmd/csFetchPlayerQueue",
  213. }
  214. handler := func(ctx context.Context, req interface{}) (interface{}, error) {
  215. return srv.(CmdServer).CsFetchPlayerQueue(ctx, req.(*CsFetchPlayerQueueReq))
  216. }
  217. return interceptor(ctx, in, info, handler)
  218. }
  219. func _Cmd_CsConnectPlayer_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
  220. in := new(CsConnectPlayerReq)
  221. if err := dec(in); err != nil {
  222. return nil, err
  223. }
  224. if interceptor == nil {
  225. return srv.(CmdServer).CsConnectPlayer(ctx, in)
  226. }
  227. info := &grpc.UnaryServerInfo{
  228. Server: srv,
  229. FullMethod: "/pb.Cmd/csConnectPlayer",
  230. }
  231. handler := func(ctx context.Context, req interface{}) (interface{}, error) {
  232. return srv.(CmdServer).CsConnectPlayer(ctx, req.(*CsConnectPlayerReq))
  233. }
  234. return interceptor(ctx, in, info, handler)
  235. }
  236. func _Cmd_CsFetchHistoryChat_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
  237. in := new(CsFetchHistoryChatReq)
  238. if err := dec(in); err != nil {
  239. return nil, err
  240. }
  241. if interceptor == nil {
  242. return srv.(CmdServer).CsFetchHistoryChat(ctx, in)
  243. }
  244. info := &grpc.UnaryServerInfo{
  245. Server: srv,
  246. FullMethod: "/pb.Cmd/csFetchHistoryChat",
  247. }
  248. handler := func(ctx context.Context, req interface{}) (interface{}, error) {
  249. return srv.(CmdServer).CsFetchHistoryChat(ctx, req.(*CsFetchHistoryChatReq))
  250. }
  251. return interceptor(ctx, in, info, handler)
  252. }
  253. func _Cmd_CsFetchHistoryMsg_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
  254. in := new(CsFetchHistoryMsgReq)
  255. if err := dec(in); err != nil {
  256. return nil, err
  257. }
  258. if interceptor == nil {
  259. return srv.(CmdServer).CsFetchHistoryMsg(ctx, in)
  260. }
  261. info := &grpc.UnaryServerInfo{
  262. Server: srv,
  263. FullMethod: "/pb.Cmd/csFetchHistoryMsg",
  264. }
  265. handler := func(ctx context.Context, req interface{}) (interface{}, error) {
  266. return srv.(CmdServer).CsFetchHistoryMsg(ctx, req.(*CsFetchHistoryMsgReq))
  267. }
  268. return interceptor(ctx, in, info, handler)
  269. }
  270. func _Cmd_CsSendMsg_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
  271. in := new(CsSendMsgReq)
  272. if err := dec(in); err != nil {
  273. return nil, err
  274. }
  275. if interceptor == nil {
  276. return srv.(CmdServer).CsSendMsg(ctx, in)
  277. }
  278. info := &grpc.UnaryServerInfo{
  279. Server: srv,
  280. FullMethod: "/pb.Cmd/csSendMsg",
  281. }
  282. handler := func(ctx context.Context, req interface{}) (interface{}, error) {
  283. return srv.(CmdServer).CsSendMsg(ctx, req.(*CsSendMsgReq))
  284. }
  285. return interceptor(ctx, in, info, handler)
  286. }
  287. // Cmd_ServiceDesc is the grpc.ServiceDesc for Cmd service.
  288. // It's only intended for direct use with grpc.RegisterService,
  289. // and not to be introspected or modified (even as a copy)
  290. var Cmd_ServiceDesc = grpc.ServiceDesc{
  291. ServiceName: "pb.Cmd",
  292. HandlerType: (*CmdServer)(nil),
  293. Methods: []grpc.MethodDesc{
  294. {
  295. MethodName: "playerFetchCsInfo",
  296. Handler: _Cmd_PlayerFetchCsInfo_Handler,
  297. },
  298. {
  299. MethodName: "playerFetchHistoryMsg",
  300. Handler: _Cmd_PlayerFetchHistoryMsg_Handler,
  301. },
  302. {
  303. MethodName: "playerSendMsg",
  304. Handler: _Cmd_PlayerSendMsg_Handler,
  305. },
  306. {
  307. MethodName: "csFetchPlayerQueue",
  308. Handler: _Cmd_CsFetchPlayerQueue_Handler,
  309. },
  310. {
  311. MethodName: "csConnectPlayer",
  312. Handler: _Cmd_CsConnectPlayer_Handler,
  313. },
  314. {
  315. MethodName: "csFetchHistoryChat",
  316. Handler: _Cmd_CsFetchHistoryChat_Handler,
  317. },
  318. {
  319. MethodName: "csFetchHistoryMsg",
  320. Handler: _Cmd_CsFetchHistoryMsg_Handler,
  321. },
  322. {
  323. MethodName: "csSendMsg",
  324. Handler: _Cmd_CsSendMsg_Handler,
  325. },
  326. },
  327. Streams: []grpc.StreamDesc{},
  328. Metadata: "pb/cmd.proto",
  329. }