cmd_grpc.pb.go 15 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393
  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. PlayerDisconnect(ctx context.Context, in *PlayerDisconnectReq, opts ...grpc.CallOption) (*PlayerDisconnectResp, error)
  25. CsFetchPlayerQueue(ctx context.Context, in *CsFetchPlayerQueueReq, opts ...grpc.CallOption) (*CsFetchPlayerQueueResp, error)
  26. CsConnectPlayer(ctx context.Context, in *CsConnectPlayerReq, opts ...grpc.CallOption) (*CsConnectPlayerResp, error)
  27. CsFetchHistoryChat(ctx context.Context, in *CsFetchHistoryChatReq, opts ...grpc.CallOption) (*CsFetchHistoryChatResp, error)
  28. CsFetchHistoryMsg(ctx context.Context, in *CsFetchHistoryMsgReq, opts ...grpc.CallOption) (*CsFetchHistoryMsgResp, error)
  29. CsSendMsg(ctx context.Context, in *CsSendMsgReq, opts ...grpc.CallOption) (*CsSendMsgResp, error)
  30. }
  31. type cmdClient struct {
  32. cc grpc.ClientConnInterface
  33. }
  34. func NewCmdClient(cc grpc.ClientConnInterface) CmdClient {
  35. return &cmdClient{cc}
  36. }
  37. func (c *cmdClient) PlayerFetchCsInfo(ctx context.Context, in *PlayerFetchCsInfoReq, opts ...grpc.CallOption) (*PlayerFetchCsInfoResp, error) {
  38. out := new(PlayerFetchCsInfoResp)
  39. err := c.cc.Invoke(ctx, "/pb.Cmd/playerFetchCsInfo", in, out, opts...)
  40. if err != nil {
  41. return nil, err
  42. }
  43. return out, nil
  44. }
  45. func (c *cmdClient) PlayerFetchHistoryMsg(ctx context.Context, in *PlayerFetchHistoryMsgReq, opts ...grpc.CallOption) (*PlayerFetchHistoryMsgResp, error) {
  46. out := new(PlayerFetchHistoryMsgResp)
  47. err := c.cc.Invoke(ctx, "/pb.Cmd/playerFetchHistoryMsg", in, out, opts...)
  48. if err != nil {
  49. return nil, err
  50. }
  51. return out, nil
  52. }
  53. func (c *cmdClient) PlayerSendMsg(ctx context.Context, in *PlayerSendMsgReq, opts ...grpc.CallOption) (*PlayerSendMsgResp, error) {
  54. out := new(PlayerSendMsgResp)
  55. err := c.cc.Invoke(ctx, "/pb.Cmd/playerSendMsg", in, out, opts...)
  56. if err != nil {
  57. return nil, err
  58. }
  59. return out, nil
  60. }
  61. func (c *cmdClient) PlayerDisconnect(ctx context.Context, in *PlayerDisconnectReq, opts ...grpc.CallOption) (*PlayerDisconnectResp, error) {
  62. out := new(PlayerDisconnectResp)
  63. err := c.cc.Invoke(ctx, "/pb.Cmd/playerDisconnect", in, out, opts...)
  64. if err != nil {
  65. return nil, err
  66. }
  67. return out, nil
  68. }
  69. func (c *cmdClient) CsFetchPlayerQueue(ctx context.Context, in *CsFetchPlayerQueueReq, opts ...grpc.CallOption) (*CsFetchPlayerQueueResp, error) {
  70. out := new(CsFetchPlayerQueueResp)
  71. err := c.cc.Invoke(ctx, "/pb.Cmd/csFetchPlayerQueue", in, out, opts...)
  72. if err != nil {
  73. return nil, err
  74. }
  75. return out, nil
  76. }
  77. func (c *cmdClient) CsConnectPlayer(ctx context.Context, in *CsConnectPlayerReq, opts ...grpc.CallOption) (*CsConnectPlayerResp, error) {
  78. out := new(CsConnectPlayerResp)
  79. err := c.cc.Invoke(ctx, "/pb.Cmd/csConnectPlayer", in, out, opts...)
  80. if err != nil {
  81. return nil, err
  82. }
  83. return out, nil
  84. }
  85. func (c *cmdClient) CsFetchHistoryChat(ctx context.Context, in *CsFetchHistoryChatReq, opts ...grpc.CallOption) (*CsFetchHistoryChatResp, error) {
  86. out := new(CsFetchHistoryChatResp)
  87. err := c.cc.Invoke(ctx, "/pb.Cmd/csFetchHistoryChat", in, out, opts...)
  88. if err != nil {
  89. return nil, err
  90. }
  91. return out, nil
  92. }
  93. func (c *cmdClient) CsFetchHistoryMsg(ctx context.Context, in *CsFetchHistoryMsgReq, opts ...grpc.CallOption) (*CsFetchHistoryMsgResp, error) {
  94. out := new(CsFetchHistoryMsgResp)
  95. err := c.cc.Invoke(ctx, "/pb.Cmd/csFetchHistoryMsg", in, out, opts...)
  96. if err != nil {
  97. return nil, err
  98. }
  99. return out, nil
  100. }
  101. func (c *cmdClient) CsSendMsg(ctx context.Context, in *CsSendMsgReq, opts ...grpc.CallOption) (*CsSendMsgResp, error) {
  102. out := new(CsSendMsgResp)
  103. err := c.cc.Invoke(ctx, "/pb.Cmd/csSendMsg", in, out, opts...)
  104. if err != nil {
  105. return nil, err
  106. }
  107. return out, nil
  108. }
  109. // CmdServer is the server API for Cmd service.
  110. // All implementations must embed UnimplementedCmdServer
  111. // for forward compatibility
  112. type CmdServer interface {
  113. PlayerFetchCsInfo(context.Context, *PlayerFetchCsInfoReq) (*PlayerFetchCsInfoResp, error)
  114. PlayerFetchHistoryMsg(context.Context, *PlayerFetchHistoryMsgReq) (*PlayerFetchHistoryMsgResp, error)
  115. PlayerSendMsg(context.Context, *PlayerSendMsgReq) (*PlayerSendMsgResp, error)
  116. PlayerDisconnect(context.Context, *PlayerDisconnectReq) (*PlayerDisconnectResp, error)
  117. CsFetchPlayerQueue(context.Context, *CsFetchPlayerQueueReq) (*CsFetchPlayerQueueResp, error)
  118. CsConnectPlayer(context.Context, *CsConnectPlayerReq) (*CsConnectPlayerResp, error)
  119. CsFetchHistoryChat(context.Context, *CsFetchHistoryChatReq) (*CsFetchHistoryChatResp, error)
  120. CsFetchHistoryMsg(context.Context, *CsFetchHistoryMsgReq) (*CsFetchHistoryMsgResp, error)
  121. CsSendMsg(context.Context, *CsSendMsgReq) (*CsSendMsgResp, error)
  122. mustEmbedUnimplementedCmdServer()
  123. }
  124. // UnimplementedCmdServer must be embedded to have forward compatible implementations.
  125. type UnimplementedCmdServer struct {
  126. }
  127. func (UnimplementedCmdServer) PlayerFetchCsInfo(context.Context, *PlayerFetchCsInfoReq) (*PlayerFetchCsInfoResp, error) {
  128. return nil, status.Errorf(codes.Unimplemented, "method PlayerFetchCsInfo not implemented")
  129. }
  130. func (UnimplementedCmdServer) PlayerFetchHistoryMsg(context.Context, *PlayerFetchHistoryMsgReq) (*PlayerFetchHistoryMsgResp, error) {
  131. return nil, status.Errorf(codes.Unimplemented, "method PlayerFetchHistoryMsg not implemented")
  132. }
  133. func (UnimplementedCmdServer) PlayerSendMsg(context.Context, *PlayerSendMsgReq) (*PlayerSendMsgResp, error) {
  134. return nil, status.Errorf(codes.Unimplemented, "method PlayerSendMsg not implemented")
  135. }
  136. func (UnimplementedCmdServer) PlayerDisconnect(context.Context, *PlayerDisconnectReq) (*PlayerDisconnectResp, error) {
  137. return nil, status.Errorf(codes.Unimplemented, "method PlayerDisconnect not implemented")
  138. }
  139. func (UnimplementedCmdServer) CsFetchPlayerQueue(context.Context, *CsFetchPlayerQueueReq) (*CsFetchPlayerQueueResp, error) {
  140. return nil, status.Errorf(codes.Unimplemented, "method CsFetchPlayerQueue not implemented")
  141. }
  142. func (UnimplementedCmdServer) CsConnectPlayer(context.Context, *CsConnectPlayerReq) (*CsConnectPlayerResp, error) {
  143. return nil, status.Errorf(codes.Unimplemented, "method CsConnectPlayer not implemented")
  144. }
  145. func (UnimplementedCmdServer) CsFetchHistoryChat(context.Context, *CsFetchHistoryChatReq) (*CsFetchHistoryChatResp, error) {
  146. return nil, status.Errorf(codes.Unimplemented, "method CsFetchHistoryChat not implemented")
  147. }
  148. func (UnimplementedCmdServer) CsFetchHistoryMsg(context.Context, *CsFetchHistoryMsgReq) (*CsFetchHistoryMsgResp, error) {
  149. return nil, status.Errorf(codes.Unimplemented, "method CsFetchHistoryMsg not implemented")
  150. }
  151. func (UnimplementedCmdServer) CsSendMsg(context.Context, *CsSendMsgReq) (*CsSendMsgResp, error) {
  152. return nil, status.Errorf(codes.Unimplemented, "method CsSendMsg not implemented")
  153. }
  154. func (UnimplementedCmdServer) mustEmbedUnimplementedCmdServer() {}
  155. // UnsafeCmdServer may be embedded to opt out of forward compatibility for this service.
  156. // Use of this interface is not recommended, as added methods to CmdServer will
  157. // result in compilation errors.
  158. type UnsafeCmdServer interface {
  159. mustEmbedUnimplementedCmdServer()
  160. }
  161. func RegisterCmdServer(s grpc.ServiceRegistrar, srv CmdServer) {
  162. s.RegisterService(&Cmd_ServiceDesc, srv)
  163. }
  164. func _Cmd_PlayerFetchCsInfo_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
  165. in := new(PlayerFetchCsInfoReq)
  166. if err := dec(in); err != nil {
  167. return nil, err
  168. }
  169. if interceptor == nil {
  170. return srv.(CmdServer).PlayerFetchCsInfo(ctx, in)
  171. }
  172. info := &grpc.UnaryServerInfo{
  173. Server: srv,
  174. FullMethod: "/pb.Cmd/playerFetchCsInfo",
  175. }
  176. handler := func(ctx context.Context, req interface{}) (interface{}, error) {
  177. return srv.(CmdServer).PlayerFetchCsInfo(ctx, req.(*PlayerFetchCsInfoReq))
  178. }
  179. return interceptor(ctx, in, info, handler)
  180. }
  181. func _Cmd_PlayerFetchHistoryMsg_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
  182. in := new(PlayerFetchHistoryMsgReq)
  183. if err := dec(in); err != nil {
  184. return nil, err
  185. }
  186. if interceptor == nil {
  187. return srv.(CmdServer).PlayerFetchHistoryMsg(ctx, in)
  188. }
  189. info := &grpc.UnaryServerInfo{
  190. Server: srv,
  191. FullMethod: "/pb.Cmd/playerFetchHistoryMsg",
  192. }
  193. handler := func(ctx context.Context, req interface{}) (interface{}, error) {
  194. return srv.(CmdServer).PlayerFetchHistoryMsg(ctx, req.(*PlayerFetchHistoryMsgReq))
  195. }
  196. return interceptor(ctx, in, info, handler)
  197. }
  198. func _Cmd_PlayerSendMsg_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
  199. in := new(PlayerSendMsgReq)
  200. if err := dec(in); err != nil {
  201. return nil, err
  202. }
  203. if interceptor == nil {
  204. return srv.(CmdServer).PlayerSendMsg(ctx, in)
  205. }
  206. info := &grpc.UnaryServerInfo{
  207. Server: srv,
  208. FullMethod: "/pb.Cmd/playerSendMsg",
  209. }
  210. handler := func(ctx context.Context, req interface{}) (interface{}, error) {
  211. return srv.(CmdServer).PlayerSendMsg(ctx, req.(*PlayerSendMsgReq))
  212. }
  213. return interceptor(ctx, in, info, handler)
  214. }
  215. func _Cmd_PlayerDisconnect_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
  216. in := new(PlayerDisconnectReq)
  217. if err := dec(in); err != nil {
  218. return nil, err
  219. }
  220. if interceptor == nil {
  221. return srv.(CmdServer).PlayerDisconnect(ctx, in)
  222. }
  223. info := &grpc.UnaryServerInfo{
  224. Server: srv,
  225. FullMethod: "/pb.Cmd/playerDisconnect",
  226. }
  227. handler := func(ctx context.Context, req interface{}) (interface{}, error) {
  228. return srv.(CmdServer).PlayerDisconnect(ctx, req.(*PlayerDisconnectReq))
  229. }
  230. return interceptor(ctx, in, info, handler)
  231. }
  232. func _Cmd_CsFetchPlayerQueue_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
  233. in := new(CsFetchPlayerQueueReq)
  234. if err := dec(in); err != nil {
  235. return nil, err
  236. }
  237. if interceptor == nil {
  238. return srv.(CmdServer).CsFetchPlayerQueue(ctx, in)
  239. }
  240. info := &grpc.UnaryServerInfo{
  241. Server: srv,
  242. FullMethod: "/pb.Cmd/csFetchPlayerQueue",
  243. }
  244. handler := func(ctx context.Context, req interface{}) (interface{}, error) {
  245. return srv.(CmdServer).CsFetchPlayerQueue(ctx, req.(*CsFetchPlayerQueueReq))
  246. }
  247. return interceptor(ctx, in, info, handler)
  248. }
  249. func _Cmd_CsConnectPlayer_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
  250. in := new(CsConnectPlayerReq)
  251. if err := dec(in); err != nil {
  252. return nil, err
  253. }
  254. if interceptor == nil {
  255. return srv.(CmdServer).CsConnectPlayer(ctx, in)
  256. }
  257. info := &grpc.UnaryServerInfo{
  258. Server: srv,
  259. FullMethod: "/pb.Cmd/csConnectPlayer",
  260. }
  261. handler := func(ctx context.Context, req interface{}) (interface{}, error) {
  262. return srv.(CmdServer).CsConnectPlayer(ctx, req.(*CsConnectPlayerReq))
  263. }
  264. return interceptor(ctx, in, info, handler)
  265. }
  266. func _Cmd_CsFetchHistoryChat_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
  267. in := new(CsFetchHistoryChatReq)
  268. if err := dec(in); err != nil {
  269. return nil, err
  270. }
  271. if interceptor == nil {
  272. return srv.(CmdServer).CsFetchHistoryChat(ctx, in)
  273. }
  274. info := &grpc.UnaryServerInfo{
  275. Server: srv,
  276. FullMethod: "/pb.Cmd/csFetchHistoryChat",
  277. }
  278. handler := func(ctx context.Context, req interface{}) (interface{}, error) {
  279. return srv.(CmdServer).CsFetchHistoryChat(ctx, req.(*CsFetchHistoryChatReq))
  280. }
  281. return interceptor(ctx, in, info, handler)
  282. }
  283. func _Cmd_CsFetchHistoryMsg_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
  284. in := new(CsFetchHistoryMsgReq)
  285. if err := dec(in); err != nil {
  286. return nil, err
  287. }
  288. if interceptor == nil {
  289. return srv.(CmdServer).CsFetchHistoryMsg(ctx, in)
  290. }
  291. info := &grpc.UnaryServerInfo{
  292. Server: srv,
  293. FullMethod: "/pb.Cmd/csFetchHistoryMsg",
  294. }
  295. handler := func(ctx context.Context, req interface{}) (interface{}, error) {
  296. return srv.(CmdServer).CsFetchHistoryMsg(ctx, req.(*CsFetchHistoryMsgReq))
  297. }
  298. return interceptor(ctx, in, info, handler)
  299. }
  300. func _Cmd_CsSendMsg_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
  301. in := new(CsSendMsgReq)
  302. if err := dec(in); err != nil {
  303. return nil, err
  304. }
  305. if interceptor == nil {
  306. return srv.(CmdServer).CsSendMsg(ctx, in)
  307. }
  308. info := &grpc.UnaryServerInfo{
  309. Server: srv,
  310. FullMethod: "/pb.Cmd/csSendMsg",
  311. }
  312. handler := func(ctx context.Context, req interface{}) (interface{}, error) {
  313. return srv.(CmdServer).CsSendMsg(ctx, req.(*CsSendMsgReq))
  314. }
  315. return interceptor(ctx, in, info, handler)
  316. }
  317. // Cmd_ServiceDesc is the grpc.ServiceDesc for Cmd service.
  318. // It's only intended for direct use with grpc.RegisterService,
  319. // and not to be introspected or modified (even as a copy)
  320. var Cmd_ServiceDesc = grpc.ServiceDesc{
  321. ServiceName: "pb.Cmd",
  322. HandlerType: (*CmdServer)(nil),
  323. Methods: []grpc.MethodDesc{
  324. {
  325. MethodName: "playerFetchCsInfo",
  326. Handler: _Cmd_PlayerFetchCsInfo_Handler,
  327. },
  328. {
  329. MethodName: "playerFetchHistoryMsg",
  330. Handler: _Cmd_PlayerFetchHistoryMsg_Handler,
  331. },
  332. {
  333. MethodName: "playerSendMsg",
  334. Handler: _Cmd_PlayerSendMsg_Handler,
  335. },
  336. {
  337. MethodName: "playerDisconnect",
  338. Handler: _Cmd_PlayerDisconnect_Handler,
  339. },
  340. {
  341. MethodName: "csFetchPlayerQueue",
  342. Handler: _Cmd_CsFetchPlayerQueue_Handler,
  343. },
  344. {
  345. MethodName: "csConnectPlayer",
  346. Handler: _Cmd_CsConnectPlayer_Handler,
  347. },
  348. {
  349. MethodName: "csFetchHistoryChat",
  350. Handler: _Cmd_CsFetchHistoryChat_Handler,
  351. },
  352. {
  353. MethodName: "csFetchHistoryMsg",
  354. Handler: _Cmd_CsFetchHistoryMsg_Handler,
  355. },
  356. {
  357. MethodName: "csSendMsg",
  358. Handler: _Cmd_CsSendMsg_Handler,
  359. },
  360. },
  361. Streams: []grpc.StreamDesc{},
  362. Metadata: "pb/cmd.proto",
  363. }