gamelang-bingo_grpc.pb.go 12 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353
  1. // Code generated by protoc-gen-go-grpc. DO NOT EDIT.
  2. package bingopb
  3. import (
  4. context "context"
  5. grpc "google.golang.org/grpc"
  6. codes "google.golang.org/grpc/codes"
  7. status "google.golang.org/grpc/status"
  8. )
  9. // This is a compile-time assertion to ensure that this generated file
  10. // is compatible with the grpc package it is being compiled against.
  11. const _ = grpc.SupportPackageIsVersion7
  12. // EventServiceClient is the client API for EventService service.
  13. //
  14. // 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.
  15. type EventServiceClient interface {
  16. Inform(ctx context.Context, in *Event, opts ...grpc.CallOption) (*Event, error)
  17. }
  18. type eventServiceClient struct {
  19. cc grpc.ClientConnInterface
  20. }
  21. func NewEventServiceClient(cc grpc.ClientConnInterface) EventServiceClient {
  22. return &eventServiceClient{cc}
  23. }
  24. func (c *eventServiceClient) Inform(ctx context.Context, in *Event, opts ...grpc.CallOption) (*Event, error) {
  25. out := new(Event)
  26. err := c.cc.Invoke(ctx, "/gamelang.EventService/Inform", in, out, opts...)
  27. if err != nil {
  28. return nil, err
  29. }
  30. return out, nil
  31. }
  32. // EventServiceServer is the server API for EventService service.
  33. // All implementations must embed UnimplementedEventServiceServer
  34. // for forward compatibility
  35. type EventServiceServer interface {
  36. Inform(context.Context, *Event) (*Event, error)
  37. mustEmbedUnimplementedEventServiceServer()
  38. }
  39. // UnimplementedEventServiceServer must be embedded to have forward compatible implementations.
  40. type UnimplementedEventServiceServer struct {
  41. }
  42. func (UnimplementedEventServiceServer) Inform(context.Context, *Event) (*Event, error) {
  43. return nil, status.Errorf(codes.Unimplemented, "method Inform not implemented")
  44. }
  45. func (UnimplementedEventServiceServer) mustEmbedUnimplementedEventServiceServer() {}
  46. // UnsafeEventServiceServer may be embedded to opt out of forward compatibility for this service.
  47. // Use of this interface is not recommended, as added methods to EventServiceServer will
  48. // result in compilation errors.
  49. type UnsafeEventServiceServer interface {
  50. mustEmbedUnimplementedEventServiceServer()
  51. }
  52. func RegisterEventServiceServer(s grpc.ServiceRegistrar, srv EventServiceServer) {
  53. s.RegisterService(&_EventService_serviceDesc, srv)
  54. }
  55. func _EventService_Inform_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
  56. in := new(Event)
  57. if err := dec(in); err != nil {
  58. return nil, err
  59. }
  60. if interceptor == nil {
  61. return srv.(EventServiceServer).Inform(ctx, in)
  62. }
  63. info := &grpc.UnaryServerInfo{
  64. Server: srv,
  65. FullMethod: "/gamelang.EventService/Inform",
  66. }
  67. handler := func(ctx context.Context, req interface{}) (interface{}, error) {
  68. return srv.(EventServiceServer).Inform(ctx, req.(*Event))
  69. }
  70. return interceptor(ctx, in, info, handler)
  71. }
  72. var _EventService_serviceDesc = grpc.ServiceDesc{
  73. ServiceName: "gamelang.EventService",
  74. HandlerType: (*EventServiceServer)(nil),
  75. Methods: []grpc.MethodDesc{
  76. {
  77. MethodName: "Inform",
  78. Handler: _EventService_Inform_Handler,
  79. },
  80. },
  81. Streams: []grpc.StreamDesc{},
  82. Metadata: "gamelang-bingo.proto",
  83. }
  84. // BingoServiceClient is the client API for BingoService service.
  85. //
  86. // 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.
  87. type BingoServiceClient interface {
  88. CreateBingo(ctx context.Context, in *Bingo, opts ...grpc.CallOption) (*Bingo, error)
  89. DeleteBingo(ctx context.Context, in *Bingo, opts ...grpc.CallOption) (*Bingo, error)
  90. GetBingo(ctx context.Context, in *Bingo, opts ...grpc.CallOption) (*Bingo, error)
  91. ListBingo(ctx context.Context, in *Bingo, opts ...grpc.CallOption) (BingoService_ListBingoClient, error)
  92. ModifyBingo(ctx context.Context, in *Bingo, opts ...grpc.CallOption) (*Bingo, error)
  93. }
  94. type bingoServiceClient struct {
  95. cc grpc.ClientConnInterface
  96. }
  97. func NewBingoServiceClient(cc grpc.ClientConnInterface) BingoServiceClient {
  98. return &bingoServiceClient{cc}
  99. }
  100. func (c *bingoServiceClient) CreateBingo(ctx context.Context, in *Bingo, opts ...grpc.CallOption) (*Bingo, error) {
  101. out := new(Bingo)
  102. err := c.cc.Invoke(ctx, "/gamelang.BingoService/CreateBingo", in, out, opts...)
  103. if err != nil {
  104. return nil, err
  105. }
  106. return out, nil
  107. }
  108. func (c *bingoServiceClient) DeleteBingo(ctx context.Context, in *Bingo, opts ...grpc.CallOption) (*Bingo, error) {
  109. out := new(Bingo)
  110. err := c.cc.Invoke(ctx, "/gamelang.BingoService/DeleteBingo", in, out, opts...)
  111. if err != nil {
  112. return nil, err
  113. }
  114. return out, nil
  115. }
  116. func (c *bingoServiceClient) GetBingo(ctx context.Context, in *Bingo, opts ...grpc.CallOption) (*Bingo, error) {
  117. out := new(Bingo)
  118. err := c.cc.Invoke(ctx, "/gamelang.BingoService/GetBingo", in, out, opts...)
  119. if err != nil {
  120. return nil, err
  121. }
  122. return out, nil
  123. }
  124. func (c *bingoServiceClient) ListBingo(ctx context.Context, in *Bingo, opts ...grpc.CallOption) (BingoService_ListBingoClient, error) {
  125. stream, err := c.cc.NewStream(ctx, &_BingoService_serviceDesc.Streams[0], "/gamelang.BingoService/ListBingo", opts...)
  126. if err != nil {
  127. return nil, err
  128. }
  129. x := &bingoServiceListBingoClient{stream}
  130. if err := x.ClientStream.SendMsg(in); err != nil {
  131. return nil, err
  132. }
  133. if err := x.ClientStream.CloseSend(); err != nil {
  134. return nil, err
  135. }
  136. return x, nil
  137. }
  138. type BingoService_ListBingoClient interface {
  139. Recv() (*Bingo, error)
  140. grpc.ClientStream
  141. }
  142. type bingoServiceListBingoClient struct {
  143. grpc.ClientStream
  144. }
  145. func (x *bingoServiceListBingoClient) Recv() (*Bingo, error) {
  146. m := new(Bingo)
  147. if err := x.ClientStream.RecvMsg(m); err != nil {
  148. return nil, err
  149. }
  150. return m, nil
  151. }
  152. func (c *bingoServiceClient) ModifyBingo(ctx context.Context, in *Bingo, opts ...grpc.CallOption) (*Bingo, error) {
  153. out := new(Bingo)
  154. err := c.cc.Invoke(ctx, "/gamelang.BingoService/ModifyBingo", in, out, opts...)
  155. if err != nil {
  156. return nil, err
  157. }
  158. return out, nil
  159. }
  160. // BingoServiceServer is the server API for BingoService service.
  161. // All implementations must embed UnimplementedBingoServiceServer
  162. // for forward compatibility
  163. type BingoServiceServer interface {
  164. CreateBingo(context.Context, *Bingo) (*Bingo, error)
  165. DeleteBingo(context.Context, *Bingo) (*Bingo, error)
  166. GetBingo(context.Context, *Bingo) (*Bingo, error)
  167. ListBingo(*Bingo, BingoService_ListBingoServer) error
  168. ModifyBingo(context.Context, *Bingo) (*Bingo, error)
  169. mustEmbedUnimplementedBingoServiceServer()
  170. }
  171. // UnimplementedBingoServiceServer must be embedded to have forward compatible implementations.
  172. type UnimplementedBingoServiceServer struct {
  173. }
  174. func (UnimplementedBingoServiceServer) CreateBingo(context.Context, *Bingo) (*Bingo, error) {
  175. return nil, status.Errorf(codes.Unimplemented, "method CreateBingo not implemented")
  176. }
  177. func (UnimplementedBingoServiceServer) DeleteBingo(context.Context, *Bingo) (*Bingo, error) {
  178. return nil, status.Errorf(codes.Unimplemented, "method DeleteBingo not implemented")
  179. }
  180. func (UnimplementedBingoServiceServer) GetBingo(context.Context, *Bingo) (*Bingo, error) {
  181. return nil, status.Errorf(codes.Unimplemented, "method GetBingo not implemented")
  182. }
  183. func (UnimplementedBingoServiceServer) ListBingo(*Bingo, BingoService_ListBingoServer) error {
  184. return status.Errorf(codes.Unimplemented, "method ListBingo not implemented")
  185. }
  186. func (UnimplementedBingoServiceServer) ModifyBingo(context.Context, *Bingo) (*Bingo, error) {
  187. return nil, status.Errorf(codes.Unimplemented, "method ModifyBingo not implemented")
  188. }
  189. func (UnimplementedBingoServiceServer) mustEmbedUnimplementedBingoServiceServer() {}
  190. // UnsafeBingoServiceServer may be embedded to opt out of forward compatibility for this service.
  191. // Use of this interface is not recommended, as added methods to BingoServiceServer will
  192. // result in compilation errors.
  193. type UnsafeBingoServiceServer interface {
  194. mustEmbedUnimplementedBingoServiceServer()
  195. }
  196. func RegisterBingoServiceServer(s grpc.ServiceRegistrar, srv BingoServiceServer) {
  197. s.RegisterService(&_BingoService_serviceDesc, srv)
  198. }
  199. func _BingoService_CreateBingo_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
  200. in := new(Bingo)
  201. if err := dec(in); err != nil {
  202. return nil, err
  203. }
  204. if interceptor == nil {
  205. return srv.(BingoServiceServer).CreateBingo(ctx, in)
  206. }
  207. info := &grpc.UnaryServerInfo{
  208. Server: srv,
  209. FullMethod: "/gamelang.BingoService/CreateBingo",
  210. }
  211. handler := func(ctx context.Context, req interface{}) (interface{}, error) {
  212. return srv.(BingoServiceServer).CreateBingo(ctx, req.(*Bingo))
  213. }
  214. return interceptor(ctx, in, info, handler)
  215. }
  216. func _BingoService_DeleteBingo_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
  217. in := new(Bingo)
  218. if err := dec(in); err != nil {
  219. return nil, err
  220. }
  221. if interceptor == nil {
  222. return srv.(BingoServiceServer).DeleteBingo(ctx, in)
  223. }
  224. info := &grpc.UnaryServerInfo{
  225. Server: srv,
  226. FullMethod: "/gamelang.BingoService/DeleteBingo",
  227. }
  228. handler := func(ctx context.Context, req interface{}) (interface{}, error) {
  229. return srv.(BingoServiceServer).DeleteBingo(ctx, req.(*Bingo))
  230. }
  231. return interceptor(ctx, in, info, handler)
  232. }
  233. func _BingoService_GetBingo_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
  234. in := new(Bingo)
  235. if err := dec(in); err != nil {
  236. return nil, err
  237. }
  238. if interceptor == nil {
  239. return srv.(BingoServiceServer).GetBingo(ctx, in)
  240. }
  241. info := &grpc.UnaryServerInfo{
  242. Server: srv,
  243. FullMethod: "/gamelang.BingoService/GetBingo",
  244. }
  245. handler := func(ctx context.Context, req interface{}) (interface{}, error) {
  246. return srv.(BingoServiceServer).GetBingo(ctx, req.(*Bingo))
  247. }
  248. return interceptor(ctx, in, info, handler)
  249. }
  250. func _BingoService_ListBingo_Handler(srv interface{}, stream grpc.ServerStream) error {
  251. m := new(Bingo)
  252. if err := stream.RecvMsg(m); err != nil {
  253. return err
  254. }
  255. return srv.(BingoServiceServer).ListBingo(m, &bingoServiceListBingoServer{stream})
  256. }
  257. type BingoService_ListBingoServer interface {
  258. Send(*Bingo) error
  259. grpc.ServerStream
  260. }
  261. type bingoServiceListBingoServer struct {
  262. grpc.ServerStream
  263. }
  264. func (x *bingoServiceListBingoServer) Send(m *Bingo) error {
  265. return x.ServerStream.SendMsg(m)
  266. }
  267. func _BingoService_ModifyBingo_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
  268. in := new(Bingo)
  269. if err := dec(in); err != nil {
  270. return nil, err
  271. }
  272. if interceptor == nil {
  273. return srv.(BingoServiceServer).ModifyBingo(ctx, in)
  274. }
  275. info := &grpc.UnaryServerInfo{
  276. Server: srv,
  277. FullMethod: "/gamelang.BingoService/ModifyBingo",
  278. }
  279. handler := func(ctx context.Context, req interface{}) (interface{}, error) {
  280. return srv.(BingoServiceServer).ModifyBingo(ctx, req.(*Bingo))
  281. }
  282. return interceptor(ctx, in, info, handler)
  283. }
  284. var _BingoService_serviceDesc = grpc.ServiceDesc{
  285. ServiceName: "gamelang.BingoService",
  286. HandlerType: (*BingoServiceServer)(nil),
  287. Methods: []grpc.MethodDesc{
  288. {
  289. MethodName: "CreateBingo",
  290. Handler: _BingoService_CreateBingo_Handler,
  291. },
  292. {
  293. MethodName: "DeleteBingo",
  294. Handler: _BingoService_DeleteBingo_Handler,
  295. },
  296. {
  297. MethodName: "GetBingo",
  298. Handler: _BingoService_GetBingo_Handler,
  299. },
  300. {
  301. MethodName: "ModifyBingo",
  302. Handler: _BingoService_ModifyBingo_Handler,
  303. },
  304. },
  305. Streams: []grpc.StreamDesc{
  306. {
  307. StreamName: "ListBingo",
  308. Handler: _BingoService_ListBingo_Handler,
  309. ServerStreams: true,
  310. },
  311. },
  312. Metadata: "gamelang-bingo.proto",
  313. }