| 123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174 |
- // Code generated by protoc-gen-go-grpc. DO NOT EDIT.
- package statistics
- import (
- context "context"
- grpc "google.golang.org/grpc"
- codes "google.golang.org/grpc/codes"
- status "google.golang.org/grpc/status"
- emptypb "google.golang.org/protobuf/types/known/emptypb"
- )
- // This is a compile-time assertion to ensure that this generated file
- // is compatible with the grpc package it is being compiled against.
- // Requires gRPC-Go v1.32.0 or later.
- const _ = grpc.SupportPackageIsVersion7
- // StatisticsClient is the client API for Statistics 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 StatisticsClient interface {
- LookPerson(ctx context.Context, in *PersonMessage, opts ...grpc.CallOption) (*emptypb.Empty, error)
- LikePerson(ctx context.Context, in *PersonMessage, opts ...grpc.CallOption) (*emptypb.Empty, error)
- UnLikePerson(ctx context.Context, in *PersonMessage, opts ...grpc.CallOption) (*emptypb.Empty, error)
- }
- type statisticsClient struct {
- cc grpc.ClientConnInterface
- }
- func NewStatisticsClient(cc grpc.ClientConnInterface) StatisticsClient {
- return &statisticsClient{cc}
- }
- func (c *statisticsClient) LookPerson(ctx context.Context, in *PersonMessage, opts ...grpc.CallOption) (*emptypb.Empty, error) {
- out := new(emptypb.Empty)
- err := c.cc.Invoke(ctx, "/api.statistics.Statistics/LookPerson", in, out, opts...)
- if err != nil {
- return nil, err
- }
- return out, nil
- }
- func (c *statisticsClient) LikePerson(ctx context.Context, in *PersonMessage, opts ...grpc.CallOption) (*emptypb.Empty, error) {
- out := new(emptypb.Empty)
- err := c.cc.Invoke(ctx, "/api.statistics.Statistics/LikePerson", in, out, opts...)
- if err != nil {
- return nil, err
- }
- return out, nil
- }
- func (c *statisticsClient) UnLikePerson(ctx context.Context, in *PersonMessage, opts ...grpc.CallOption) (*emptypb.Empty, error) {
- out := new(emptypb.Empty)
- err := c.cc.Invoke(ctx, "/api.statistics.Statistics/UnLikePerson", in, out, opts...)
- if err != nil {
- return nil, err
- }
- return out, nil
- }
- // StatisticsServer is the server API for Statistics service.
- // All implementations must embed UnimplementedStatisticsServer
- // for forward compatibility
- type StatisticsServer interface {
- LookPerson(context.Context, *PersonMessage) (*emptypb.Empty, error)
- LikePerson(context.Context, *PersonMessage) (*emptypb.Empty, error)
- UnLikePerson(context.Context, *PersonMessage) (*emptypb.Empty, error)
- mustEmbedUnimplementedStatisticsServer()
- }
- // UnimplementedStatisticsServer must be embedded to have forward compatible implementations.
- type UnimplementedStatisticsServer struct {
- }
- func (UnimplementedStatisticsServer) LookPerson(context.Context, *PersonMessage) (*emptypb.Empty, error) {
- return nil, status.Errorf(codes.Unimplemented, "method LookPerson not implemented")
- }
- func (UnimplementedStatisticsServer) LikePerson(context.Context, *PersonMessage) (*emptypb.Empty, error) {
- return nil, status.Errorf(codes.Unimplemented, "method LikePerson not implemented")
- }
- func (UnimplementedStatisticsServer) UnLikePerson(context.Context, *PersonMessage) (*emptypb.Empty, error) {
- return nil, status.Errorf(codes.Unimplemented, "method UnLikePerson not implemented")
- }
- func (UnimplementedStatisticsServer) mustEmbedUnimplementedStatisticsServer() {}
- // UnsafeStatisticsServer may be embedded to opt out of forward compatibility for this service.
- // Use of this interface is not recommended, as added methods to StatisticsServer will
- // result in compilation errors.
- type UnsafeStatisticsServer interface {
- mustEmbedUnimplementedStatisticsServer()
- }
- func RegisterStatisticsServer(s grpc.ServiceRegistrar, srv StatisticsServer) {
- s.RegisterService(&Statistics_ServiceDesc, srv)
- }
- func _Statistics_LookPerson_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
- in := new(PersonMessage)
- if err := dec(in); err != nil {
- return nil, err
- }
- if interceptor == nil {
- return srv.(StatisticsServer).LookPerson(ctx, in)
- }
- info := &grpc.UnaryServerInfo{
- Server: srv,
- FullMethod: "/api.statistics.Statistics/LookPerson",
- }
- handler := func(ctx context.Context, req interface{}) (interface{}, error) {
- return srv.(StatisticsServer).LookPerson(ctx, req.(*PersonMessage))
- }
- return interceptor(ctx, in, info, handler)
- }
- func _Statistics_LikePerson_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
- in := new(PersonMessage)
- if err := dec(in); err != nil {
- return nil, err
- }
- if interceptor == nil {
- return srv.(StatisticsServer).LikePerson(ctx, in)
- }
- info := &grpc.UnaryServerInfo{
- Server: srv,
- FullMethod: "/api.statistics.Statistics/LikePerson",
- }
- handler := func(ctx context.Context, req interface{}) (interface{}, error) {
- return srv.(StatisticsServer).LikePerson(ctx, req.(*PersonMessage))
- }
- return interceptor(ctx, in, info, handler)
- }
- func _Statistics_UnLikePerson_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
- in := new(PersonMessage)
- if err := dec(in); err != nil {
- return nil, err
- }
- if interceptor == nil {
- return srv.(StatisticsServer).UnLikePerson(ctx, in)
- }
- info := &grpc.UnaryServerInfo{
- Server: srv,
- FullMethod: "/api.statistics.Statistics/UnLikePerson",
- }
- handler := func(ctx context.Context, req interface{}) (interface{}, error) {
- return srv.(StatisticsServer).UnLikePerson(ctx, req.(*PersonMessage))
- }
- return interceptor(ctx, in, info, handler)
- }
- // Statistics_ServiceDesc is the grpc.ServiceDesc for Statistics service.
- // It's only intended for direct use with grpc.RegisterService,
- // and not to be introspected or modified (even as a copy)
- var Statistics_ServiceDesc = grpc.ServiceDesc{
- ServiceName: "api.statistics.Statistics",
- HandlerType: (*StatisticsServer)(nil),
- Methods: []grpc.MethodDesc{
- {
- MethodName: "LookPerson",
- Handler: _Statistics_LookPerson_Handler,
- },
- {
- MethodName: "LikePerson",
- Handler: _Statistics_LikePerson_Handler,
- },
- {
- MethodName: "UnLikePerson",
- Handler: _Statistics_UnLikePerson_Handler,
- },
- },
- Streams: []grpc.StreamDesc{},
- Metadata: "statistics.proto",
- }
|