inner_grpc.pb.go 9.4 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249
  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/inner.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. // InnerClient is the client API for Inner 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 InnerClient interface {
  21. PlayerFetchCsInfo(ctx context.Context, in *InnerPlayerFetchCsInfoReq, opts ...grpc.CallOption) (*InnerPlayerFetchCsInfoResp, error)
  22. CsFetchPlayerQueue(ctx context.Context, in *InnerCsFetchPlayerQueueReq, opts ...grpc.CallOption) (*InnerCsFetchPlayerQueueResp, error)
  23. CsConnectPlayer(ctx context.Context, in *InnerCsConnectPlayerReq, opts ...grpc.CallOption) (*InnerCsConnectPlayerResp, error)
  24. NotifyUserOnline(ctx context.Context, in *NotifyUserStatusReq, opts ...grpc.CallOption) (*NotifyUserStatusResp, error)
  25. NotifyUserOffline(ctx context.Context, in *NotifyUserStatusReq, opts ...grpc.CallOption) (*NotifyUserStatusResp, error)
  26. }
  27. type innerClient struct {
  28. cc grpc.ClientConnInterface
  29. }
  30. func NewInnerClient(cc grpc.ClientConnInterface) InnerClient {
  31. return &innerClient{cc}
  32. }
  33. func (c *innerClient) PlayerFetchCsInfo(ctx context.Context, in *InnerPlayerFetchCsInfoReq, opts ...grpc.CallOption) (*InnerPlayerFetchCsInfoResp, error) {
  34. out := new(InnerPlayerFetchCsInfoResp)
  35. err := c.cc.Invoke(ctx, "/pb.Inner/playerFetchCsInfo", in, out, opts...)
  36. if err != nil {
  37. return nil, err
  38. }
  39. return out, nil
  40. }
  41. func (c *innerClient) CsFetchPlayerQueue(ctx context.Context, in *InnerCsFetchPlayerQueueReq, opts ...grpc.CallOption) (*InnerCsFetchPlayerQueueResp, error) {
  42. out := new(InnerCsFetchPlayerQueueResp)
  43. err := c.cc.Invoke(ctx, "/pb.Inner/csFetchPlayerQueue", in, out, opts...)
  44. if err != nil {
  45. return nil, err
  46. }
  47. return out, nil
  48. }
  49. func (c *innerClient) CsConnectPlayer(ctx context.Context, in *InnerCsConnectPlayerReq, opts ...grpc.CallOption) (*InnerCsConnectPlayerResp, error) {
  50. out := new(InnerCsConnectPlayerResp)
  51. err := c.cc.Invoke(ctx, "/pb.Inner/csConnectPlayer", in, out, opts...)
  52. if err != nil {
  53. return nil, err
  54. }
  55. return out, nil
  56. }
  57. func (c *innerClient) NotifyUserOnline(ctx context.Context, in *NotifyUserStatusReq, opts ...grpc.CallOption) (*NotifyUserStatusResp, error) {
  58. out := new(NotifyUserStatusResp)
  59. err := c.cc.Invoke(ctx, "/pb.Inner/notifyUserOnline", in, out, opts...)
  60. if err != nil {
  61. return nil, err
  62. }
  63. return out, nil
  64. }
  65. func (c *innerClient) NotifyUserOffline(ctx context.Context, in *NotifyUserStatusReq, opts ...grpc.CallOption) (*NotifyUserStatusResp, error) {
  66. out := new(NotifyUserStatusResp)
  67. err := c.cc.Invoke(ctx, "/pb.Inner/notifyUserOffline", in, out, opts...)
  68. if err != nil {
  69. return nil, err
  70. }
  71. return out, nil
  72. }
  73. // InnerServer is the server API for Inner service.
  74. // All implementations must embed UnimplementedInnerServer
  75. // for forward compatibility
  76. type InnerServer interface {
  77. PlayerFetchCsInfo(context.Context, *InnerPlayerFetchCsInfoReq) (*InnerPlayerFetchCsInfoResp, error)
  78. CsFetchPlayerQueue(context.Context, *InnerCsFetchPlayerQueueReq) (*InnerCsFetchPlayerQueueResp, error)
  79. CsConnectPlayer(context.Context, *InnerCsConnectPlayerReq) (*InnerCsConnectPlayerResp, error)
  80. NotifyUserOnline(context.Context, *NotifyUserStatusReq) (*NotifyUserStatusResp, error)
  81. NotifyUserOffline(context.Context, *NotifyUserStatusReq) (*NotifyUserStatusResp, error)
  82. mustEmbedUnimplementedInnerServer()
  83. }
  84. // UnimplementedInnerServer must be embedded to have forward compatible implementations.
  85. type UnimplementedInnerServer struct {
  86. }
  87. func (UnimplementedInnerServer) PlayerFetchCsInfo(context.Context, *InnerPlayerFetchCsInfoReq) (*InnerPlayerFetchCsInfoResp, error) {
  88. return nil, status.Errorf(codes.Unimplemented, "method PlayerFetchCsInfo not implemented")
  89. }
  90. func (UnimplementedInnerServer) CsFetchPlayerQueue(context.Context, *InnerCsFetchPlayerQueueReq) (*InnerCsFetchPlayerQueueResp, error) {
  91. return nil, status.Errorf(codes.Unimplemented, "method CsFetchPlayerQueue not implemented")
  92. }
  93. func (UnimplementedInnerServer) CsConnectPlayer(context.Context, *InnerCsConnectPlayerReq) (*InnerCsConnectPlayerResp, error) {
  94. return nil, status.Errorf(codes.Unimplemented, "method CsConnectPlayer not implemented")
  95. }
  96. func (UnimplementedInnerServer) NotifyUserOnline(context.Context, *NotifyUserStatusReq) (*NotifyUserStatusResp, error) {
  97. return nil, status.Errorf(codes.Unimplemented, "method NotifyUserOnline not implemented")
  98. }
  99. func (UnimplementedInnerServer) NotifyUserOffline(context.Context, *NotifyUserStatusReq) (*NotifyUserStatusResp, error) {
  100. return nil, status.Errorf(codes.Unimplemented, "method NotifyUserOffline not implemented")
  101. }
  102. func (UnimplementedInnerServer) mustEmbedUnimplementedInnerServer() {}
  103. // UnsafeInnerServer may be embedded to opt out of forward compatibility for this service.
  104. // Use of this interface is not recommended, as added methods to InnerServer will
  105. // result in compilation errors.
  106. type UnsafeInnerServer interface {
  107. mustEmbedUnimplementedInnerServer()
  108. }
  109. func RegisterInnerServer(s grpc.ServiceRegistrar, srv InnerServer) {
  110. s.RegisterService(&Inner_ServiceDesc, srv)
  111. }
  112. func _Inner_PlayerFetchCsInfo_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
  113. in := new(InnerPlayerFetchCsInfoReq)
  114. if err := dec(in); err != nil {
  115. return nil, err
  116. }
  117. if interceptor == nil {
  118. return srv.(InnerServer).PlayerFetchCsInfo(ctx, in)
  119. }
  120. info := &grpc.UnaryServerInfo{
  121. Server: srv,
  122. FullMethod: "/pb.Inner/playerFetchCsInfo",
  123. }
  124. handler := func(ctx context.Context, req interface{}) (interface{}, error) {
  125. return srv.(InnerServer).PlayerFetchCsInfo(ctx, req.(*InnerPlayerFetchCsInfoReq))
  126. }
  127. return interceptor(ctx, in, info, handler)
  128. }
  129. func _Inner_CsFetchPlayerQueue_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
  130. in := new(InnerCsFetchPlayerQueueReq)
  131. if err := dec(in); err != nil {
  132. return nil, err
  133. }
  134. if interceptor == nil {
  135. return srv.(InnerServer).CsFetchPlayerQueue(ctx, in)
  136. }
  137. info := &grpc.UnaryServerInfo{
  138. Server: srv,
  139. FullMethod: "/pb.Inner/csFetchPlayerQueue",
  140. }
  141. handler := func(ctx context.Context, req interface{}) (interface{}, error) {
  142. return srv.(InnerServer).CsFetchPlayerQueue(ctx, req.(*InnerCsFetchPlayerQueueReq))
  143. }
  144. return interceptor(ctx, in, info, handler)
  145. }
  146. func _Inner_CsConnectPlayer_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
  147. in := new(InnerCsConnectPlayerReq)
  148. if err := dec(in); err != nil {
  149. return nil, err
  150. }
  151. if interceptor == nil {
  152. return srv.(InnerServer).CsConnectPlayer(ctx, in)
  153. }
  154. info := &grpc.UnaryServerInfo{
  155. Server: srv,
  156. FullMethod: "/pb.Inner/csConnectPlayer",
  157. }
  158. handler := func(ctx context.Context, req interface{}) (interface{}, error) {
  159. return srv.(InnerServer).CsConnectPlayer(ctx, req.(*InnerCsConnectPlayerReq))
  160. }
  161. return interceptor(ctx, in, info, handler)
  162. }
  163. func _Inner_NotifyUserOnline_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
  164. in := new(NotifyUserStatusReq)
  165. if err := dec(in); err != nil {
  166. return nil, err
  167. }
  168. if interceptor == nil {
  169. return srv.(InnerServer).NotifyUserOnline(ctx, in)
  170. }
  171. info := &grpc.UnaryServerInfo{
  172. Server: srv,
  173. FullMethod: "/pb.Inner/notifyUserOnline",
  174. }
  175. handler := func(ctx context.Context, req interface{}) (interface{}, error) {
  176. return srv.(InnerServer).NotifyUserOnline(ctx, req.(*NotifyUserStatusReq))
  177. }
  178. return interceptor(ctx, in, info, handler)
  179. }
  180. func _Inner_NotifyUserOffline_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
  181. in := new(NotifyUserStatusReq)
  182. if err := dec(in); err != nil {
  183. return nil, err
  184. }
  185. if interceptor == nil {
  186. return srv.(InnerServer).NotifyUserOffline(ctx, in)
  187. }
  188. info := &grpc.UnaryServerInfo{
  189. Server: srv,
  190. FullMethod: "/pb.Inner/notifyUserOffline",
  191. }
  192. handler := func(ctx context.Context, req interface{}) (interface{}, error) {
  193. return srv.(InnerServer).NotifyUserOffline(ctx, req.(*NotifyUserStatusReq))
  194. }
  195. return interceptor(ctx, in, info, handler)
  196. }
  197. // Inner_ServiceDesc is the grpc.ServiceDesc for Inner service.
  198. // It's only intended for direct use with grpc.RegisterService,
  199. // and not to be introspected or modified (even as a copy)
  200. var Inner_ServiceDesc = grpc.ServiceDesc{
  201. ServiceName: "pb.Inner",
  202. HandlerType: (*InnerServer)(nil),
  203. Methods: []grpc.MethodDesc{
  204. {
  205. MethodName: "playerFetchCsInfo",
  206. Handler: _Inner_PlayerFetchCsInfo_Handler,
  207. },
  208. {
  209. MethodName: "csFetchPlayerQueue",
  210. Handler: _Inner_CsFetchPlayerQueue_Handler,
  211. },
  212. {
  213. MethodName: "csConnectPlayer",
  214. Handler: _Inner_CsConnectPlayer_Handler,
  215. },
  216. {
  217. MethodName: "notifyUserOnline",
  218. Handler: _Inner_NotifyUserOnline_Handler,
  219. },
  220. {
  221. MethodName: "notifyUserOffline",
  222. Handler: _Inner_NotifyUserOffline_Handler,
  223. },
  224. },
  225. Streams: []grpc.StreamDesc{},
  226. Metadata: "pb/inner.proto",
  227. }