// Code generated by protoc-gen-go-grpc. DO NOT EDIT. package bingopb import ( context "context" grpc "google.golang.org/grpc" codes "google.golang.org/grpc/codes" status "google.golang.org/grpc/status" ) // This is a compile-time assertion to ensure that this generated file // is compatible with the grpc package it is being compiled against. const _ = grpc.SupportPackageIsVersion7 // EventServiceClient is the client API for EventService service. // // 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. type EventServiceClient interface { Inform(ctx context.Context, in *Event, opts ...grpc.CallOption) (*Event, error) } type eventServiceClient struct { cc grpc.ClientConnInterface } func NewEventServiceClient(cc grpc.ClientConnInterface) EventServiceClient { return &eventServiceClient{cc} } func (c *eventServiceClient) Inform(ctx context.Context, in *Event, opts ...grpc.CallOption) (*Event, error) { out := new(Event) err := c.cc.Invoke(ctx, "/gamelang.EventService/Inform", in, out, opts...) if err != nil { return nil, err } return out, nil } // EventServiceServer is the server API for EventService service. // All implementations must embed UnimplementedEventServiceServer // for forward compatibility type EventServiceServer interface { Inform(context.Context, *Event) (*Event, error) mustEmbedUnimplementedEventServiceServer() } // UnimplementedEventServiceServer must be embedded to have forward compatible implementations. type UnimplementedEventServiceServer struct { } func (UnimplementedEventServiceServer) Inform(context.Context, *Event) (*Event, error) { return nil, status.Errorf(codes.Unimplemented, "method Inform not implemented") } func (UnimplementedEventServiceServer) mustEmbedUnimplementedEventServiceServer() {} // UnsafeEventServiceServer may be embedded to opt out of forward compatibility for this service. // Use of this interface is not recommended, as added methods to EventServiceServer will // result in compilation errors. type UnsafeEventServiceServer interface { mustEmbedUnimplementedEventServiceServer() } func RegisterEventServiceServer(s grpc.ServiceRegistrar, srv EventServiceServer) { s.RegisterService(&_EventService_serviceDesc, srv) } func _EventService_Inform_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { in := new(Event) if err := dec(in); err != nil { return nil, err } if interceptor == nil { return srv.(EventServiceServer).Inform(ctx, in) } info := &grpc.UnaryServerInfo{ Server: srv, FullMethod: "/gamelang.EventService/Inform", } handler := func(ctx context.Context, req interface{}) (interface{}, error) { return srv.(EventServiceServer).Inform(ctx, req.(*Event)) } return interceptor(ctx, in, info, handler) } var _EventService_serviceDesc = grpc.ServiceDesc{ ServiceName: "gamelang.EventService", HandlerType: (*EventServiceServer)(nil), Methods: []grpc.MethodDesc{ { MethodName: "Inform", Handler: _EventService_Inform_Handler, }, }, Streams: []grpc.StreamDesc{}, Metadata: "gamelang-bingo.proto", } // BingoServiceClient is the client API for BingoService service. // // 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. type BingoServiceClient interface { CreateBingo(ctx context.Context, in *Bingo, opts ...grpc.CallOption) (*Bingo, error) DeleteBingo(ctx context.Context, in *Bingo, opts ...grpc.CallOption) (*Bingo, error) GetBingo(ctx context.Context, in *Bingo, opts ...grpc.CallOption) (*Bingo, error) ListBingo(ctx context.Context, in *Bingo, opts ...grpc.CallOption) (BingoService_ListBingoClient, error) ModifyBingo(ctx context.Context, in *Bingo, opts ...grpc.CallOption) (*Bingo, error) } type bingoServiceClient struct { cc grpc.ClientConnInterface } func NewBingoServiceClient(cc grpc.ClientConnInterface) BingoServiceClient { return &bingoServiceClient{cc} } func (c *bingoServiceClient) CreateBingo(ctx context.Context, in *Bingo, opts ...grpc.CallOption) (*Bingo, error) { out := new(Bingo) err := c.cc.Invoke(ctx, "/gamelang.BingoService/CreateBingo", in, out, opts...) if err != nil { return nil, err } return out, nil } func (c *bingoServiceClient) DeleteBingo(ctx context.Context, in *Bingo, opts ...grpc.CallOption) (*Bingo, error) { out := new(Bingo) err := c.cc.Invoke(ctx, "/gamelang.BingoService/DeleteBingo", in, out, opts...) if err != nil { return nil, err } return out, nil } func (c *bingoServiceClient) GetBingo(ctx context.Context, in *Bingo, opts ...grpc.CallOption) (*Bingo, error) { out := new(Bingo) err := c.cc.Invoke(ctx, "/gamelang.BingoService/GetBingo", in, out, opts...) if err != nil { return nil, err } return out, nil } func (c *bingoServiceClient) ListBingo(ctx context.Context, in *Bingo, opts ...grpc.CallOption) (BingoService_ListBingoClient, error) { stream, err := c.cc.NewStream(ctx, &_BingoService_serviceDesc.Streams[0], "/gamelang.BingoService/ListBingo", opts...) if err != nil { return nil, err } x := &bingoServiceListBingoClient{stream} if err := x.ClientStream.SendMsg(in); err != nil { return nil, err } if err := x.ClientStream.CloseSend(); err != nil { return nil, err } return x, nil } type BingoService_ListBingoClient interface { Recv() (*Bingo, error) grpc.ClientStream } type bingoServiceListBingoClient struct { grpc.ClientStream } func (x *bingoServiceListBingoClient) Recv() (*Bingo, error) { m := new(Bingo) if err := x.ClientStream.RecvMsg(m); err != nil { return nil, err } return m, nil } func (c *bingoServiceClient) ModifyBingo(ctx context.Context, in *Bingo, opts ...grpc.CallOption) (*Bingo, error) { out := new(Bingo) err := c.cc.Invoke(ctx, "/gamelang.BingoService/ModifyBingo", in, out, opts...) if err != nil { return nil, err } return out, nil } // BingoServiceServer is the server API for BingoService service. // All implementations must embed UnimplementedBingoServiceServer // for forward compatibility type BingoServiceServer interface { CreateBingo(context.Context, *Bingo) (*Bingo, error) DeleteBingo(context.Context, *Bingo) (*Bingo, error) GetBingo(context.Context, *Bingo) (*Bingo, error) ListBingo(*Bingo, BingoService_ListBingoServer) error ModifyBingo(context.Context, *Bingo) (*Bingo, error) mustEmbedUnimplementedBingoServiceServer() } // UnimplementedBingoServiceServer must be embedded to have forward compatible implementations. type UnimplementedBingoServiceServer struct { } func (UnimplementedBingoServiceServer) CreateBingo(context.Context, *Bingo) (*Bingo, error) { return nil, status.Errorf(codes.Unimplemented, "method CreateBingo not implemented") } func (UnimplementedBingoServiceServer) DeleteBingo(context.Context, *Bingo) (*Bingo, error) { return nil, status.Errorf(codes.Unimplemented, "method DeleteBingo not implemented") } func (UnimplementedBingoServiceServer) GetBingo(context.Context, *Bingo) (*Bingo, error) { return nil, status.Errorf(codes.Unimplemented, "method GetBingo not implemented") } func (UnimplementedBingoServiceServer) ListBingo(*Bingo, BingoService_ListBingoServer) error { return status.Errorf(codes.Unimplemented, "method ListBingo not implemented") } func (UnimplementedBingoServiceServer) ModifyBingo(context.Context, *Bingo) (*Bingo, error) { return nil, status.Errorf(codes.Unimplemented, "method ModifyBingo not implemented") } func (UnimplementedBingoServiceServer) mustEmbedUnimplementedBingoServiceServer() {} // UnsafeBingoServiceServer may be embedded to opt out of forward compatibility for this service. // Use of this interface is not recommended, as added methods to BingoServiceServer will // result in compilation errors. type UnsafeBingoServiceServer interface { mustEmbedUnimplementedBingoServiceServer() } func RegisterBingoServiceServer(s grpc.ServiceRegistrar, srv BingoServiceServer) { s.RegisterService(&_BingoService_serviceDesc, srv) } func _BingoService_CreateBingo_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { in := new(Bingo) if err := dec(in); err != nil { return nil, err } if interceptor == nil { return srv.(BingoServiceServer).CreateBingo(ctx, in) } info := &grpc.UnaryServerInfo{ Server: srv, FullMethod: "/gamelang.BingoService/CreateBingo", } handler := func(ctx context.Context, req interface{}) (interface{}, error) { return srv.(BingoServiceServer).CreateBingo(ctx, req.(*Bingo)) } return interceptor(ctx, in, info, handler) } func _BingoService_DeleteBingo_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { in := new(Bingo) if err := dec(in); err != nil { return nil, err } if interceptor == nil { return srv.(BingoServiceServer).DeleteBingo(ctx, in) } info := &grpc.UnaryServerInfo{ Server: srv, FullMethod: "/gamelang.BingoService/DeleteBingo", } handler := func(ctx context.Context, req interface{}) (interface{}, error) { return srv.(BingoServiceServer).DeleteBingo(ctx, req.(*Bingo)) } return interceptor(ctx, in, info, handler) } func _BingoService_GetBingo_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { in := new(Bingo) if err := dec(in); err != nil { return nil, err } if interceptor == nil { return srv.(BingoServiceServer).GetBingo(ctx, in) } info := &grpc.UnaryServerInfo{ Server: srv, FullMethod: "/gamelang.BingoService/GetBingo", } handler := func(ctx context.Context, req interface{}) (interface{}, error) { return srv.(BingoServiceServer).GetBingo(ctx, req.(*Bingo)) } return interceptor(ctx, in, info, handler) } func _BingoService_ListBingo_Handler(srv interface{}, stream grpc.ServerStream) error { m := new(Bingo) if err := stream.RecvMsg(m); err != nil { return err } return srv.(BingoServiceServer).ListBingo(m, &bingoServiceListBingoServer{stream}) } type BingoService_ListBingoServer interface { Send(*Bingo) error grpc.ServerStream } type bingoServiceListBingoServer struct { grpc.ServerStream } func (x *bingoServiceListBingoServer) Send(m *Bingo) error { return x.ServerStream.SendMsg(m) } func _BingoService_ModifyBingo_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { in := new(Bingo) if err := dec(in); err != nil { return nil, err } if interceptor == nil { return srv.(BingoServiceServer).ModifyBingo(ctx, in) } info := &grpc.UnaryServerInfo{ Server: srv, FullMethod: "/gamelang.BingoService/ModifyBingo", } handler := func(ctx context.Context, req interface{}) (interface{}, error) { return srv.(BingoServiceServer).ModifyBingo(ctx, req.(*Bingo)) } return interceptor(ctx, in, info, handler) } var _BingoService_serviceDesc = grpc.ServiceDesc{ ServiceName: "gamelang.BingoService", HandlerType: (*BingoServiceServer)(nil), Methods: []grpc.MethodDesc{ { MethodName: "CreateBingo", Handler: _BingoService_CreateBingo_Handler, }, { MethodName: "DeleteBingo", Handler: _BingoService_DeleteBingo_Handler, }, { MethodName: "GetBingo", Handler: _BingoService_GetBingo_Handler, }, { MethodName: "ModifyBingo", Handler: _BingoService_ModifyBingo_Handler, }, }, Streams: []grpc.StreamDesc{ { StreamName: "ListBingo", Handler: _BingoService_ListBingo_Handler, ServerStreams: true, }, }, Metadata: "gamelang-bingo.proto", }