|
@@ -43,6 +43,7 @@ const (
|
|
|
SlowWildServer_GetReplyList_FullMethodName = "/slowwildserver.SlowWildServer/GetReplyList"
|
|
SlowWildServer_GetReplyList_FullMethodName = "/slowwildserver.SlowWildServer/GetReplyList"
|
|
|
SlowWildServer_PostCommentUpvote_FullMethodName = "/slowwildserver.SlowWildServer/PostCommentUpvote"
|
|
SlowWildServer_PostCommentUpvote_FullMethodName = "/slowwildserver.SlowWildServer/PostCommentUpvote"
|
|
|
SlowWildServer_PostCommentThumbsDown_FullMethodName = "/slowwildserver.SlowWildServer/PostCommentThumbsDown"
|
|
SlowWildServer_PostCommentThumbsDown_FullMethodName = "/slowwildserver.SlowWildServer/PostCommentThumbsDown"
|
|
|
|
|
+ SlowWildServer_PostDelete_FullMethodName = "/slowwildserver.SlowWildServer/PostDelete"
|
|
|
)
|
|
)
|
|
|
|
|
|
|
|
// SlowWildServerClient is the client API for SlowWildServer service.
|
|
// SlowWildServerClient is the client API for SlowWildServer service.
|
|
@@ -97,6 +98,8 @@ type SlowWildServerClient interface {
|
|
|
PostCommentUpvote(ctx context.Context, in *PostCommentUpvoteReq, opts ...grpc.CallOption) (*PostCommentUpvoteRsp, error)
|
|
PostCommentUpvote(ctx context.Context, in *PostCommentUpvoteReq, opts ...grpc.CallOption) (*PostCommentUpvoteRsp, error)
|
|
|
// 评论点踩
|
|
// 评论点踩
|
|
|
PostCommentThumbsDown(ctx context.Context, in *PostCommentThumbsDownReq, opts ...grpc.CallOption) (*PostCommentThumbsDownRsp, error)
|
|
PostCommentThumbsDown(ctx context.Context, in *PostCommentThumbsDownReq, opts ...grpc.CallOption) (*PostCommentThumbsDownRsp, error)
|
|
|
|
|
+ // 删除帖子
|
|
|
|
|
+ PostDelete(ctx context.Context, in *PostDeleteReq, opts ...grpc.CallOption) (*PostDeleteRsp, error)
|
|
|
}
|
|
}
|
|
|
|
|
|
|
|
type slowWildServerClient struct {
|
|
type slowWildServerClient struct {
|
|
@@ -347,6 +350,16 @@ func (c *slowWildServerClient) PostCommentThumbsDown(ctx context.Context, in *Po
|
|
|
return out, nil
|
|
return out, nil
|
|
|
}
|
|
}
|
|
|
|
|
|
|
|
|
|
+func (c *slowWildServerClient) PostDelete(ctx context.Context, in *PostDeleteReq, opts ...grpc.CallOption) (*PostDeleteRsp, error) {
|
|
|
|
|
+ cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...)
|
|
|
|
|
+ out := new(PostDeleteRsp)
|
|
|
|
|
+ err := c.cc.Invoke(ctx, SlowWildServer_PostDelete_FullMethodName, in, out, cOpts...)
|
|
|
|
|
+ if err != nil {
|
|
|
|
|
+ return nil, err
|
|
|
|
|
+ }
|
|
|
|
|
+ return out, nil
|
|
|
|
|
+}
|
|
|
|
|
+
|
|
|
// SlowWildServerServer is the server API for SlowWildServer service.
|
|
// SlowWildServerServer is the server API for SlowWildServer service.
|
|
|
// All implementations must embed UnimplementedSlowWildServerServer
|
|
// All implementations must embed UnimplementedSlowWildServerServer
|
|
|
// for forward compatibility
|
|
// for forward compatibility
|
|
@@ -399,6 +412,8 @@ type SlowWildServerServer interface {
|
|
|
PostCommentUpvote(context.Context, *PostCommentUpvoteReq) (*PostCommentUpvoteRsp, error)
|
|
PostCommentUpvote(context.Context, *PostCommentUpvoteReq) (*PostCommentUpvoteRsp, error)
|
|
|
// 评论点踩
|
|
// 评论点踩
|
|
|
PostCommentThumbsDown(context.Context, *PostCommentThumbsDownReq) (*PostCommentThumbsDownRsp, error)
|
|
PostCommentThumbsDown(context.Context, *PostCommentThumbsDownReq) (*PostCommentThumbsDownRsp, error)
|
|
|
|
|
+ // 删除帖子
|
|
|
|
|
+ PostDelete(context.Context, *PostDeleteReq) (*PostDeleteRsp, error)
|
|
|
mustEmbedUnimplementedSlowWildServerServer()
|
|
mustEmbedUnimplementedSlowWildServerServer()
|
|
|
}
|
|
}
|
|
|
|
|
|
|
@@ -478,6 +493,9 @@ func (UnimplementedSlowWildServerServer) PostCommentUpvote(context.Context, *Pos
|
|
|
func (UnimplementedSlowWildServerServer) PostCommentThumbsDown(context.Context, *PostCommentThumbsDownReq) (*PostCommentThumbsDownRsp, error) {
|
|
func (UnimplementedSlowWildServerServer) PostCommentThumbsDown(context.Context, *PostCommentThumbsDownReq) (*PostCommentThumbsDownRsp, error) {
|
|
|
return nil, status.Errorf(codes.Unimplemented, "method PostCommentThumbsDown not implemented")
|
|
return nil, status.Errorf(codes.Unimplemented, "method PostCommentThumbsDown not implemented")
|
|
|
}
|
|
}
|
|
|
|
|
+func (UnimplementedSlowWildServerServer) PostDelete(context.Context, *PostDeleteReq) (*PostDeleteRsp, error) {
|
|
|
|
|
+ return nil, status.Errorf(codes.Unimplemented, "method PostDelete not implemented")
|
|
|
|
|
+}
|
|
|
func (UnimplementedSlowWildServerServer) mustEmbedUnimplementedSlowWildServerServer() {}
|
|
func (UnimplementedSlowWildServerServer) mustEmbedUnimplementedSlowWildServerServer() {}
|
|
|
|
|
|
|
|
// UnsafeSlowWildServerServer may be embedded to opt out of forward compatibility for this service.
|
|
// UnsafeSlowWildServerServer may be embedded to opt out of forward compatibility for this service.
|
|
@@ -923,6 +941,24 @@ func _SlowWildServer_PostCommentThumbsDown_Handler(srv interface{}, ctx context.
|
|
|
return interceptor(ctx, in, info, handler)
|
|
return interceptor(ctx, in, info, handler)
|
|
|
}
|
|
}
|
|
|
|
|
|
|
|
|
|
+func _SlowWildServer_PostDelete_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
|
|
|
|
|
+ in := new(PostDeleteReq)
|
|
|
|
|
+ if err := dec(in); err != nil {
|
|
|
|
|
+ return nil, err
|
|
|
|
|
+ }
|
|
|
|
|
+ if interceptor == nil {
|
|
|
|
|
+ return srv.(SlowWildServerServer).PostDelete(ctx, in)
|
|
|
|
|
+ }
|
|
|
|
|
+ info := &grpc.UnaryServerInfo{
|
|
|
|
|
+ Server: srv,
|
|
|
|
|
+ FullMethod: SlowWildServer_PostDelete_FullMethodName,
|
|
|
|
|
+ }
|
|
|
|
|
+ handler := func(ctx context.Context, req interface{}) (interface{}, error) {
|
|
|
|
|
+ return srv.(SlowWildServerServer).PostDelete(ctx, req.(*PostDeleteReq))
|
|
|
|
|
+ }
|
|
|
|
|
+ return interceptor(ctx, in, info, handler)
|
|
|
|
|
+}
|
|
|
|
|
+
|
|
|
// SlowWildServer_ServiceDesc is the grpc.ServiceDesc for SlowWildServer service.
|
|
// SlowWildServer_ServiceDesc is the grpc.ServiceDesc for SlowWildServer service.
|
|
|
// It's only intended for direct use with grpc.RegisterService,
|
|
// It's only intended for direct use with grpc.RegisterService,
|
|
|
// and not to be introspected or modified (even as a copy)
|
|
// and not to be introspected or modified (even as a copy)
|
|
@@ -1026,6 +1062,10 @@ var SlowWildServer_ServiceDesc = grpc.ServiceDesc{
|
|
|
MethodName: "PostCommentThumbsDown",
|
|
MethodName: "PostCommentThumbsDown",
|
|
|
Handler: _SlowWildServer_PostCommentThumbsDown_Handler,
|
|
Handler: _SlowWildServer_PostCommentThumbsDown_Handler,
|
|
|
},
|
|
},
|
|
|
|
|
+ {
|
|
|
|
|
+ MethodName: "PostDelete",
|
|
|
|
|
+ Handler: _SlowWildServer_PostDelete_Handler,
|
|
|
|
|
+ },
|
|
|
},
|
|
},
|
|
|
Streams: []grpc.StreamDesc{},
|
|
Streams: []grpc.StreamDesc{},
|
|
|
Metadata: "proto/slowwild.proto",
|
|
Metadata: "proto/slowwild.proto",
|