|
|
@@ -42,6 +42,12 @@ type StatisticsClient interface {
|
|
|
FindLikedList(ctx context.Context, in *GetLookAndLikeListRequest, opts ...grpc.CallOption) (*LookAndLikeListReply, error)
|
|
|
// 获取我是否喜欢(关注)该用户
|
|
|
GetIsLike(ctx context.Context, in *PersonMessage, opts ...grpc.CallOption) (*common.IsLike, error)
|
|
|
+ // 统计订阅消息
|
|
|
+ StatisticsSubscribeMessage(ctx context.Context, in *StatisticsSubscribeMessageRequest, opts ...grpc.CallOption) (*emptypb.Empty, error)
|
|
|
+ // 减少订阅消息
|
|
|
+ ReduceSubscribeMessage(ctx context.Context, in *ReduceSubscribeMessageRequest, opts ...grpc.CallOption) (*emptypb.Empty, error)
|
|
|
+ // 获取订阅了签到的人
|
|
|
+ GetSignUser(ctx context.Context, in *emptypb.Empty, opts ...grpc.CallOption) (*common.PersonIDList, error)
|
|
|
}
|
|
|
|
|
|
type statisticsClient struct {
|
|
|
@@ -151,6 +157,33 @@ func (c *statisticsClient) GetIsLike(ctx context.Context, in *PersonMessage, opt
|
|
|
return out, nil
|
|
|
}
|
|
|
|
|
|
+func (c *statisticsClient) StatisticsSubscribeMessage(ctx context.Context, in *StatisticsSubscribeMessageRequest, opts ...grpc.CallOption) (*emptypb.Empty, error) {
|
|
|
+ out := new(emptypb.Empty)
|
|
|
+ err := c.cc.Invoke(ctx, "/api.statistics.Statistics/StatisticsSubscribeMessage", in, out, opts...)
|
|
|
+ if err != nil {
|
|
|
+ return nil, err
|
|
|
+ }
|
|
|
+ return out, nil
|
|
|
+}
|
|
|
+
|
|
|
+func (c *statisticsClient) ReduceSubscribeMessage(ctx context.Context, in *ReduceSubscribeMessageRequest, opts ...grpc.CallOption) (*emptypb.Empty, error) {
|
|
|
+ out := new(emptypb.Empty)
|
|
|
+ err := c.cc.Invoke(ctx, "/api.statistics.Statistics/ReduceSubscribeMessage", in, out, opts...)
|
|
|
+ if err != nil {
|
|
|
+ return nil, err
|
|
|
+ }
|
|
|
+ return out, nil
|
|
|
+}
|
|
|
+
|
|
|
+func (c *statisticsClient) GetSignUser(ctx context.Context, in *emptypb.Empty, opts ...grpc.CallOption) (*common.PersonIDList, error) {
|
|
|
+ out := new(common.PersonIDList)
|
|
|
+ err := c.cc.Invoke(ctx, "/api.statistics.Statistics/GetSignUser", 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
|
|
|
@@ -177,6 +210,12 @@ type StatisticsServer interface {
|
|
|
FindLikedList(context.Context, *GetLookAndLikeListRequest) (*LookAndLikeListReply, error)
|
|
|
// 获取我是否喜欢(关注)该用户
|
|
|
GetIsLike(context.Context, *PersonMessage) (*common.IsLike, error)
|
|
|
+ // 统计订阅消息
|
|
|
+ StatisticsSubscribeMessage(context.Context, *StatisticsSubscribeMessageRequest) (*emptypb.Empty, error)
|
|
|
+ // 减少订阅消息
|
|
|
+ ReduceSubscribeMessage(context.Context, *ReduceSubscribeMessageRequest) (*emptypb.Empty, error)
|
|
|
+ // 获取订阅了签到的人
|
|
|
+ GetSignUser(context.Context, *emptypb.Empty) (*common.PersonIDList, error)
|
|
|
mustEmbedUnimplementedStatisticsServer()
|
|
|
}
|
|
|
|
|
|
@@ -217,6 +256,15 @@ func (UnimplementedStatisticsServer) FindLikedList(context.Context, *GetLookAndL
|
|
|
func (UnimplementedStatisticsServer) GetIsLike(context.Context, *PersonMessage) (*common.IsLike, error) {
|
|
|
return nil, status.Errorf(codes.Unimplemented, "method GetIsLike not implemented")
|
|
|
}
|
|
|
+func (UnimplementedStatisticsServer) StatisticsSubscribeMessage(context.Context, *StatisticsSubscribeMessageRequest) (*emptypb.Empty, error) {
|
|
|
+ return nil, status.Errorf(codes.Unimplemented, "method StatisticsSubscribeMessage not implemented")
|
|
|
+}
|
|
|
+func (UnimplementedStatisticsServer) ReduceSubscribeMessage(context.Context, *ReduceSubscribeMessageRequest) (*emptypb.Empty, error) {
|
|
|
+ return nil, status.Errorf(codes.Unimplemented, "method ReduceSubscribeMessage not implemented")
|
|
|
+}
|
|
|
+func (UnimplementedStatisticsServer) GetSignUser(context.Context, *emptypb.Empty) (*common.PersonIDList, error) {
|
|
|
+ return nil, status.Errorf(codes.Unimplemented, "method GetSignUser not implemented")
|
|
|
+}
|
|
|
func (UnimplementedStatisticsServer) mustEmbedUnimplementedStatisticsServer() {}
|
|
|
|
|
|
// UnsafeStatisticsServer may be embedded to opt out of forward compatibility for this service.
|
|
|
@@ -428,6 +476,60 @@ func _Statistics_GetIsLike_Handler(srv interface{}, ctx context.Context, dec fun
|
|
|
return interceptor(ctx, in, info, handler)
|
|
|
}
|
|
|
|
|
|
+func _Statistics_StatisticsSubscribeMessage_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
|
|
|
+ in := new(StatisticsSubscribeMessageRequest)
|
|
|
+ if err := dec(in); err != nil {
|
|
|
+ return nil, err
|
|
|
+ }
|
|
|
+ if interceptor == nil {
|
|
|
+ return srv.(StatisticsServer).StatisticsSubscribeMessage(ctx, in)
|
|
|
+ }
|
|
|
+ info := &grpc.UnaryServerInfo{
|
|
|
+ Server: srv,
|
|
|
+ FullMethod: "/api.statistics.Statistics/StatisticsSubscribeMessage",
|
|
|
+ }
|
|
|
+ handler := func(ctx context.Context, req interface{}) (interface{}, error) {
|
|
|
+ return srv.(StatisticsServer).StatisticsSubscribeMessage(ctx, req.(*StatisticsSubscribeMessageRequest))
|
|
|
+ }
|
|
|
+ return interceptor(ctx, in, info, handler)
|
|
|
+}
|
|
|
+
|
|
|
+func _Statistics_ReduceSubscribeMessage_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
|
|
|
+ in := new(ReduceSubscribeMessageRequest)
|
|
|
+ if err := dec(in); err != nil {
|
|
|
+ return nil, err
|
|
|
+ }
|
|
|
+ if interceptor == nil {
|
|
|
+ return srv.(StatisticsServer).ReduceSubscribeMessage(ctx, in)
|
|
|
+ }
|
|
|
+ info := &grpc.UnaryServerInfo{
|
|
|
+ Server: srv,
|
|
|
+ FullMethod: "/api.statistics.Statistics/ReduceSubscribeMessage",
|
|
|
+ }
|
|
|
+ handler := func(ctx context.Context, req interface{}) (interface{}, error) {
|
|
|
+ return srv.(StatisticsServer).ReduceSubscribeMessage(ctx, req.(*ReduceSubscribeMessageRequest))
|
|
|
+ }
|
|
|
+ return interceptor(ctx, in, info, handler)
|
|
|
+}
|
|
|
+
|
|
|
+func _Statistics_GetSignUser_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
|
|
|
+ in := new(emptypb.Empty)
|
|
|
+ if err := dec(in); err != nil {
|
|
|
+ return nil, err
|
|
|
+ }
|
|
|
+ if interceptor == nil {
|
|
|
+ return srv.(StatisticsServer).GetSignUser(ctx, in)
|
|
|
+ }
|
|
|
+ info := &grpc.UnaryServerInfo{
|
|
|
+ Server: srv,
|
|
|
+ FullMethod: "/api.statistics.Statistics/GetSignUser",
|
|
|
+ }
|
|
|
+ handler := func(ctx context.Context, req interface{}) (interface{}, error) {
|
|
|
+ return srv.(StatisticsServer).GetSignUser(ctx, req.(*emptypb.Empty))
|
|
|
+ }
|
|
|
+ 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)
|
|
|
@@ -479,6 +581,18 @@ var Statistics_ServiceDesc = grpc.ServiceDesc{
|
|
|
MethodName: "GetIsLike",
|
|
|
Handler: _Statistics_GetIsLike_Handler,
|
|
|
},
|
|
|
+ {
|
|
|
+ MethodName: "StatisticsSubscribeMessage",
|
|
|
+ Handler: _Statistics_StatisticsSubscribeMessage_Handler,
|
|
|
+ },
|
|
|
+ {
|
|
|
+ MethodName: "ReduceSubscribeMessage",
|
|
|
+ Handler: _Statistics_ReduceSubscribeMessage_Handler,
|
|
|
+ },
|
|
|
+ {
|
|
|
+ MethodName: "GetSignUser",
|
|
|
+ Handler: _Statistics_GetSignUser_Handler,
|
|
|
+ },
|
|
|
},
|
|
|
Streams: []grpc.StreamDesc{},
|
|
|
Metadata: "statistics.proto",
|