760 lines
28 KiB
Go
760 lines
28 KiB
Go
// Code generated by protoc-gen-go-grpc. DO NOT EDIT.
|
|
// versions:
|
|
// - protoc-gen-go-grpc v1.5.1
|
|
// - protoc v6.30.1
|
|
// source: post.proto
|
|
|
|
package content
|
|
|
|
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.
|
|
// Requires gRPC-Go v1.64.0 or later.
|
|
const _ = grpc.SupportPackageIsVersion9
|
|
|
|
const (
|
|
Post_PostList_FullMethodName = "/content.Post/PostList"
|
|
Post_GetPost_FullMethodName = "/content.Post/GetPost"
|
|
Post_AddPost_FullMethodName = "/content.Post/AddPost"
|
|
Post_ModifyPost_FullMethodName = "/content.Post/ModifyPost"
|
|
Post_DeletePost_FullMethodName = "/content.Post/DeletePost"
|
|
Post_IncrPostLike_FullMethodName = "/content.Post/IncrPostLike"
|
|
Post_DescPostLike_FullMethodName = "/content.Post/DescPostLike"
|
|
Post_IncrPostUnlike_FullMethodName = "/content.Post/IncrPostUnlike"
|
|
Post_DescPostUnlike_FullMethodName = "/content.Post/DescPostUnlike"
|
|
Post_CommentList_FullMethodName = "/content.Post/CommentList"
|
|
Post_AddComment_FullMethodName = "/content.Post/AddComment"
|
|
Post_ModifyComment_FullMethodName = "/content.Post/ModifyComment"
|
|
Post_DeleteComment_FullMethodName = "/content.Post/DeleteComment"
|
|
Post_IncrCommentLike_FullMethodName = "/content.Post/IncrCommentLike"
|
|
Post_DescCommentLike_FullMethodName = "/content.Post/DescCommentLike"
|
|
Post_IncrCommentUnlike_FullMethodName = "/content.Post/IncrCommentUnlike"
|
|
Post_DescCommentUnlike_FullMethodName = "/content.Post/DescCommentUnlike"
|
|
)
|
|
|
|
// PostClient is the client API for Post 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 PostClient interface {
|
|
// 文章列表
|
|
PostList(ctx context.Context, in *PostListRequest, opts ...grpc.CallOption) (*PostListReply, error)
|
|
// 获取文章详情
|
|
GetPost(ctx context.Context, in *GetPostRequest, opts ...grpc.CallOption) (*PostItem, error)
|
|
// 发布文章
|
|
AddPost(ctx context.Context, in *PostItem, opts ...grpc.CallOption) (*StatusReply, error)
|
|
// 修改文章
|
|
ModifyPost(ctx context.Context, in *PostItem, opts ...grpc.CallOption) (*StatusReply, error)
|
|
// 删除文章
|
|
DeletePost(ctx context.Context, in *IdentRequest, opts ...grpc.CallOption) (*StatusReply, error)
|
|
// 文章点赞处理
|
|
IncrPostLike(ctx context.Context, in *PostOpIdentityRequest, opts ...grpc.CallOption) (*StatusReply, error)
|
|
DescPostLike(ctx context.Context, in *PostOpIdentityRequest, opts ...grpc.CallOption) (*StatusReply, error)
|
|
// 文章点踩处理
|
|
IncrPostUnlike(ctx context.Context, in *PostOpIdentityRequest, opts ...grpc.CallOption) (*StatusReply, error)
|
|
DescPostUnlike(ctx context.Context, in *PostOpIdentityRequest, opts ...grpc.CallOption) (*StatusReply, error)
|
|
// 评论列表
|
|
CommentList(ctx context.Context, in *CommentListRequest, opts ...grpc.CallOption) (*CommentListResponse, error)
|
|
// 发布评论
|
|
AddComment(ctx context.Context, in *CommentItem, opts ...grpc.CallOption) (*StatusReply, error)
|
|
// 修改评论
|
|
ModifyComment(ctx context.Context, in *CommentItem, opts ...grpc.CallOption) (*StatusReply, error)
|
|
// 删除评论
|
|
DeleteComment(ctx context.Context, in *DeleteCommentRequest, opts ...grpc.CallOption) (*StatusReply, error)
|
|
// 评论点赞处理
|
|
IncrCommentLike(ctx context.Context, in *CommentOpIdentityRequest, opts ...grpc.CallOption) (*StatusReply, error)
|
|
DescCommentLike(ctx context.Context, in *CommentOpIdentityRequest, opts ...grpc.CallOption) (*StatusReply, error)
|
|
// 评论点踩处理
|
|
IncrCommentUnlike(ctx context.Context, in *CommentOpIdentityRequest, opts ...grpc.CallOption) (*StatusReply, error)
|
|
DescCommentUnlike(ctx context.Context, in *CommentOpIdentityRequest, opts ...grpc.CallOption) (*StatusReply, error)
|
|
}
|
|
|
|
type postClient struct {
|
|
cc grpc.ClientConnInterface
|
|
}
|
|
|
|
func NewPostClient(cc grpc.ClientConnInterface) PostClient {
|
|
return &postClient{cc}
|
|
}
|
|
|
|
func (c *postClient) PostList(ctx context.Context, in *PostListRequest, opts ...grpc.CallOption) (*PostListReply, error) {
|
|
cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...)
|
|
out := new(PostListReply)
|
|
err := c.cc.Invoke(ctx, Post_PostList_FullMethodName, in, out, cOpts...)
|
|
if err != nil {
|
|
return nil, err
|
|
}
|
|
return out, nil
|
|
}
|
|
|
|
func (c *postClient) GetPost(ctx context.Context, in *GetPostRequest, opts ...grpc.CallOption) (*PostItem, error) {
|
|
cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...)
|
|
out := new(PostItem)
|
|
err := c.cc.Invoke(ctx, Post_GetPost_FullMethodName, in, out, cOpts...)
|
|
if err != nil {
|
|
return nil, err
|
|
}
|
|
return out, nil
|
|
}
|
|
|
|
func (c *postClient) AddPost(ctx context.Context, in *PostItem, opts ...grpc.CallOption) (*StatusReply, error) {
|
|
cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...)
|
|
out := new(StatusReply)
|
|
err := c.cc.Invoke(ctx, Post_AddPost_FullMethodName, in, out, cOpts...)
|
|
if err != nil {
|
|
return nil, err
|
|
}
|
|
return out, nil
|
|
}
|
|
|
|
func (c *postClient) ModifyPost(ctx context.Context, in *PostItem, opts ...grpc.CallOption) (*StatusReply, error) {
|
|
cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...)
|
|
out := new(StatusReply)
|
|
err := c.cc.Invoke(ctx, Post_ModifyPost_FullMethodName, in, out, cOpts...)
|
|
if err != nil {
|
|
return nil, err
|
|
}
|
|
return out, nil
|
|
}
|
|
|
|
func (c *postClient) DeletePost(ctx context.Context, in *IdentRequest, opts ...grpc.CallOption) (*StatusReply, error) {
|
|
cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...)
|
|
out := new(StatusReply)
|
|
err := c.cc.Invoke(ctx, Post_DeletePost_FullMethodName, in, out, cOpts...)
|
|
if err != nil {
|
|
return nil, err
|
|
}
|
|
return out, nil
|
|
}
|
|
|
|
func (c *postClient) IncrPostLike(ctx context.Context, in *PostOpIdentityRequest, opts ...grpc.CallOption) (*StatusReply, error) {
|
|
cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...)
|
|
out := new(StatusReply)
|
|
err := c.cc.Invoke(ctx, Post_IncrPostLike_FullMethodName, in, out, cOpts...)
|
|
if err != nil {
|
|
return nil, err
|
|
}
|
|
return out, nil
|
|
}
|
|
|
|
func (c *postClient) DescPostLike(ctx context.Context, in *PostOpIdentityRequest, opts ...grpc.CallOption) (*StatusReply, error) {
|
|
cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...)
|
|
out := new(StatusReply)
|
|
err := c.cc.Invoke(ctx, Post_DescPostLike_FullMethodName, in, out, cOpts...)
|
|
if err != nil {
|
|
return nil, err
|
|
}
|
|
return out, nil
|
|
}
|
|
|
|
func (c *postClient) IncrPostUnlike(ctx context.Context, in *PostOpIdentityRequest, opts ...grpc.CallOption) (*StatusReply, error) {
|
|
cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...)
|
|
out := new(StatusReply)
|
|
err := c.cc.Invoke(ctx, Post_IncrPostUnlike_FullMethodName, in, out, cOpts...)
|
|
if err != nil {
|
|
return nil, err
|
|
}
|
|
return out, nil
|
|
}
|
|
|
|
func (c *postClient) DescPostUnlike(ctx context.Context, in *PostOpIdentityRequest, opts ...grpc.CallOption) (*StatusReply, error) {
|
|
cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...)
|
|
out := new(StatusReply)
|
|
err := c.cc.Invoke(ctx, Post_DescPostUnlike_FullMethodName, in, out, cOpts...)
|
|
if err != nil {
|
|
return nil, err
|
|
}
|
|
return out, nil
|
|
}
|
|
|
|
func (c *postClient) CommentList(ctx context.Context, in *CommentListRequest, opts ...grpc.CallOption) (*CommentListResponse, error) {
|
|
cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...)
|
|
out := new(CommentListResponse)
|
|
err := c.cc.Invoke(ctx, Post_CommentList_FullMethodName, in, out, cOpts...)
|
|
if err != nil {
|
|
return nil, err
|
|
}
|
|
return out, nil
|
|
}
|
|
|
|
func (c *postClient) AddComment(ctx context.Context, in *CommentItem, opts ...grpc.CallOption) (*StatusReply, error) {
|
|
cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...)
|
|
out := new(StatusReply)
|
|
err := c.cc.Invoke(ctx, Post_AddComment_FullMethodName, in, out, cOpts...)
|
|
if err != nil {
|
|
return nil, err
|
|
}
|
|
return out, nil
|
|
}
|
|
|
|
func (c *postClient) ModifyComment(ctx context.Context, in *CommentItem, opts ...grpc.CallOption) (*StatusReply, error) {
|
|
cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...)
|
|
out := new(StatusReply)
|
|
err := c.cc.Invoke(ctx, Post_ModifyComment_FullMethodName, in, out, cOpts...)
|
|
if err != nil {
|
|
return nil, err
|
|
}
|
|
return out, nil
|
|
}
|
|
|
|
func (c *postClient) DeleteComment(ctx context.Context, in *DeleteCommentRequest, opts ...grpc.CallOption) (*StatusReply, error) {
|
|
cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...)
|
|
out := new(StatusReply)
|
|
err := c.cc.Invoke(ctx, Post_DeleteComment_FullMethodName, in, out, cOpts...)
|
|
if err != nil {
|
|
return nil, err
|
|
}
|
|
return out, nil
|
|
}
|
|
|
|
func (c *postClient) IncrCommentLike(ctx context.Context, in *CommentOpIdentityRequest, opts ...grpc.CallOption) (*StatusReply, error) {
|
|
cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...)
|
|
out := new(StatusReply)
|
|
err := c.cc.Invoke(ctx, Post_IncrCommentLike_FullMethodName, in, out, cOpts...)
|
|
if err != nil {
|
|
return nil, err
|
|
}
|
|
return out, nil
|
|
}
|
|
|
|
func (c *postClient) DescCommentLike(ctx context.Context, in *CommentOpIdentityRequest, opts ...grpc.CallOption) (*StatusReply, error) {
|
|
cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...)
|
|
out := new(StatusReply)
|
|
err := c.cc.Invoke(ctx, Post_DescCommentLike_FullMethodName, in, out, cOpts...)
|
|
if err != nil {
|
|
return nil, err
|
|
}
|
|
return out, nil
|
|
}
|
|
|
|
func (c *postClient) IncrCommentUnlike(ctx context.Context, in *CommentOpIdentityRequest, opts ...grpc.CallOption) (*StatusReply, error) {
|
|
cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...)
|
|
out := new(StatusReply)
|
|
err := c.cc.Invoke(ctx, Post_IncrCommentUnlike_FullMethodName, in, out, cOpts...)
|
|
if err != nil {
|
|
return nil, err
|
|
}
|
|
return out, nil
|
|
}
|
|
|
|
func (c *postClient) DescCommentUnlike(ctx context.Context, in *CommentOpIdentityRequest, opts ...grpc.CallOption) (*StatusReply, error) {
|
|
cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...)
|
|
out := new(StatusReply)
|
|
err := c.cc.Invoke(ctx, Post_DescCommentUnlike_FullMethodName, in, out, cOpts...)
|
|
if err != nil {
|
|
return nil, err
|
|
}
|
|
return out, nil
|
|
}
|
|
|
|
// PostServer is the server API for Post service.
|
|
// All implementations must embed UnimplementedPostServer
|
|
// for forward compatibility.
|
|
//
|
|
// 正文
|
|
type PostServer interface {
|
|
// 文章列表
|
|
PostList(context.Context, *PostListRequest) (*PostListReply, error)
|
|
// 获取文章详情
|
|
GetPost(context.Context, *GetPostRequest) (*PostItem, error)
|
|
// 发布文章
|
|
AddPost(context.Context, *PostItem) (*StatusReply, error)
|
|
// 修改文章
|
|
ModifyPost(context.Context, *PostItem) (*StatusReply, error)
|
|
// 删除文章
|
|
DeletePost(context.Context, *IdentRequest) (*StatusReply, error)
|
|
// 文章点赞处理
|
|
IncrPostLike(context.Context, *PostOpIdentityRequest) (*StatusReply, error)
|
|
DescPostLike(context.Context, *PostOpIdentityRequest) (*StatusReply, error)
|
|
// 文章点踩处理
|
|
IncrPostUnlike(context.Context, *PostOpIdentityRequest) (*StatusReply, error)
|
|
DescPostUnlike(context.Context, *PostOpIdentityRequest) (*StatusReply, error)
|
|
// 评论列表
|
|
CommentList(context.Context, *CommentListRequest) (*CommentListResponse, error)
|
|
// 发布评论
|
|
AddComment(context.Context, *CommentItem) (*StatusReply, error)
|
|
// 修改评论
|
|
ModifyComment(context.Context, *CommentItem) (*StatusReply, error)
|
|
// 删除评论
|
|
DeleteComment(context.Context, *DeleteCommentRequest) (*StatusReply, error)
|
|
// 评论点赞处理
|
|
IncrCommentLike(context.Context, *CommentOpIdentityRequest) (*StatusReply, error)
|
|
DescCommentLike(context.Context, *CommentOpIdentityRequest) (*StatusReply, error)
|
|
// 评论点踩处理
|
|
IncrCommentUnlike(context.Context, *CommentOpIdentityRequest) (*StatusReply, error)
|
|
DescCommentUnlike(context.Context, *CommentOpIdentityRequest) (*StatusReply, error)
|
|
mustEmbedUnimplementedPostServer()
|
|
}
|
|
|
|
// UnimplementedPostServer must be embedded to have
|
|
// forward compatible implementations.
|
|
//
|
|
// NOTE: this should be embedded by value instead of pointer to avoid a nil
|
|
// pointer dereference when methods are called.
|
|
type UnimplementedPostServer struct{}
|
|
|
|
func (UnimplementedPostServer) PostList(context.Context, *PostListRequest) (*PostListReply, error) {
|
|
return nil, status.Errorf(codes.Unimplemented, "method PostList not implemented")
|
|
}
|
|
func (UnimplementedPostServer) GetPost(context.Context, *GetPostRequest) (*PostItem, error) {
|
|
return nil, status.Errorf(codes.Unimplemented, "method GetPost not implemented")
|
|
}
|
|
func (UnimplementedPostServer) AddPost(context.Context, *PostItem) (*StatusReply, error) {
|
|
return nil, status.Errorf(codes.Unimplemented, "method AddPost not implemented")
|
|
}
|
|
func (UnimplementedPostServer) ModifyPost(context.Context, *PostItem) (*StatusReply, error) {
|
|
return nil, status.Errorf(codes.Unimplemented, "method ModifyPost not implemented")
|
|
}
|
|
func (UnimplementedPostServer) DeletePost(context.Context, *IdentRequest) (*StatusReply, error) {
|
|
return nil, status.Errorf(codes.Unimplemented, "method DeletePost not implemented")
|
|
}
|
|
func (UnimplementedPostServer) IncrPostLike(context.Context, *PostOpIdentityRequest) (*StatusReply, error) {
|
|
return nil, status.Errorf(codes.Unimplemented, "method IncrPostLike not implemented")
|
|
}
|
|
func (UnimplementedPostServer) DescPostLike(context.Context, *PostOpIdentityRequest) (*StatusReply, error) {
|
|
return nil, status.Errorf(codes.Unimplemented, "method DescPostLike not implemented")
|
|
}
|
|
func (UnimplementedPostServer) IncrPostUnlike(context.Context, *PostOpIdentityRequest) (*StatusReply, error) {
|
|
return nil, status.Errorf(codes.Unimplemented, "method IncrPostUnlike not implemented")
|
|
}
|
|
func (UnimplementedPostServer) DescPostUnlike(context.Context, *PostOpIdentityRequest) (*StatusReply, error) {
|
|
return nil, status.Errorf(codes.Unimplemented, "method DescPostUnlike not implemented")
|
|
}
|
|
func (UnimplementedPostServer) CommentList(context.Context, *CommentListRequest) (*CommentListResponse, error) {
|
|
return nil, status.Errorf(codes.Unimplemented, "method CommentList not implemented")
|
|
}
|
|
func (UnimplementedPostServer) AddComment(context.Context, *CommentItem) (*StatusReply, error) {
|
|
return nil, status.Errorf(codes.Unimplemented, "method AddComment not implemented")
|
|
}
|
|
func (UnimplementedPostServer) ModifyComment(context.Context, *CommentItem) (*StatusReply, error) {
|
|
return nil, status.Errorf(codes.Unimplemented, "method ModifyComment not implemented")
|
|
}
|
|
func (UnimplementedPostServer) DeleteComment(context.Context, *DeleteCommentRequest) (*StatusReply, error) {
|
|
return nil, status.Errorf(codes.Unimplemented, "method DeleteComment not implemented")
|
|
}
|
|
func (UnimplementedPostServer) IncrCommentLike(context.Context, *CommentOpIdentityRequest) (*StatusReply, error) {
|
|
return nil, status.Errorf(codes.Unimplemented, "method IncrCommentLike not implemented")
|
|
}
|
|
func (UnimplementedPostServer) DescCommentLike(context.Context, *CommentOpIdentityRequest) (*StatusReply, error) {
|
|
return nil, status.Errorf(codes.Unimplemented, "method DescCommentLike not implemented")
|
|
}
|
|
func (UnimplementedPostServer) IncrCommentUnlike(context.Context, *CommentOpIdentityRequest) (*StatusReply, error) {
|
|
return nil, status.Errorf(codes.Unimplemented, "method IncrCommentUnlike not implemented")
|
|
}
|
|
func (UnimplementedPostServer) DescCommentUnlike(context.Context, *CommentOpIdentityRequest) (*StatusReply, error) {
|
|
return nil, status.Errorf(codes.Unimplemented, "method DescCommentUnlike not implemented")
|
|
}
|
|
func (UnimplementedPostServer) mustEmbedUnimplementedPostServer() {}
|
|
func (UnimplementedPostServer) testEmbeddedByValue() {}
|
|
|
|
// UnsafePostServer may be embedded to opt out of forward compatibility for this service.
|
|
// Use of this interface is not recommended, as added methods to PostServer will
|
|
// result in compilation errors.
|
|
type UnsafePostServer interface {
|
|
mustEmbedUnimplementedPostServer()
|
|
}
|
|
|
|
func RegisterPostServer(s grpc.ServiceRegistrar, srv PostServer) {
|
|
// If the following call pancis, it indicates UnimplementedPostServer was
|
|
// embedded by pointer and is nil. This will cause panics if an
|
|
// unimplemented method is ever invoked, so we test this at initialization
|
|
// time to prevent it from happening at runtime later due to I/O.
|
|
if t, ok := srv.(interface{ testEmbeddedByValue() }); ok {
|
|
t.testEmbeddedByValue()
|
|
}
|
|
s.RegisterService(&Post_ServiceDesc, srv)
|
|
}
|
|
|
|
func _Post_PostList_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
|
|
in := new(PostListRequest)
|
|
if err := dec(in); err != nil {
|
|
return nil, err
|
|
}
|
|
if interceptor == nil {
|
|
return srv.(PostServer).PostList(ctx, in)
|
|
}
|
|
info := &grpc.UnaryServerInfo{
|
|
Server: srv,
|
|
FullMethod: Post_PostList_FullMethodName,
|
|
}
|
|
handler := func(ctx context.Context, req interface{}) (interface{}, error) {
|
|
return srv.(PostServer).PostList(ctx, req.(*PostListRequest))
|
|
}
|
|
return interceptor(ctx, in, info, handler)
|
|
}
|
|
|
|
func _Post_GetPost_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
|
|
in := new(GetPostRequest)
|
|
if err := dec(in); err != nil {
|
|
return nil, err
|
|
}
|
|
if interceptor == nil {
|
|
return srv.(PostServer).GetPost(ctx, in)
|
|
}
|
|
info := &grpc.UnaryServerInfo{
|
|
Server: srv,
|
|
FullMethod: Post_GetPost_FullMethodName,
|
|
}
|
|
handler := func(ctx context.Context, req interface{}) (interface{}, error) {
|
|
return srv.(PostServer).GetPost(ctx, req.(*GetPostRequest))
|
|
}
|
|
return interceptor(ctx, in, info, handler)
|
|
}
|
|
|
|
func _Post_AddPost_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
|
|
in := new(PostItem)
|
|
if err := dec(in); err != nil {
|
|
return nil, err
|
|
}
|
|
if interceptor == nil {
|
|
return srv.(PostServer).AddPost(ctx, in)
|
|
}
|
|
info := &grpc.UnaryServerInfo{
|
|
Server: srv,
|
|
FullMethod: Post_AddPost_FullMethodName,
|
|
}
|
|
handler := func(ctx context.Context, req interface{}) (interface{}, error) {
|
|
return srv.(PostServer).AddPost(ctx, req.(*PostItem))
|
|
}
|
|
return interceptor(ctx, in, info, handler)
|
|
}
|
|
|
|
func _Post_ModifyPost_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
|
|
in := new(PostItem)
|
|
if err := dec(in); err != nil {
|
|
return nil, err
|
|
}
|
|
if interceptor == nil {
|
|
return srv.(PostServer).ModifyPost(ctx, in)
|
|
}
|
|
info := &grpc.UnaryServerInfo{
|
|
Server: srv,
|
|
FullMethod: Post_ModifyPost_FullMethodName,
|
|
}
|
|
handler := func(ctx context.Context, req interface{}) (interface{}, error) {
|
|
return srv.(PostServer).ModifyPost(ctx, req.(*PostItem))
|
|
}
|
|
return interceptor(ctx, in, info, handler)
|
|
}
|
|
|
|
func _Post_DeletePost_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
|
|
in := new(IdentRequest)
|
|
if err := dec(in); err != nil {
|
|
return nil, err
|
|
}
|
|
if interceptor == nil {
|
|
return srv.(PostServer).DeletePost(ctx, in)
|
|
}
|
|
info := &grpc.UnaryServerInfo{
|
|
Server: srv,
|
|
FullMethod: Post_DeletePost_FullMethodName,
|
|
}
|
|
handler := func(ctx context.Context, req interface{}) (interface{}, error) {
|
|
return srv.(PostServer).DeletePost(ctx, req.(*IdentRequest))
|
|
}
|
|
return interceptor(ctx, in, info, handler)
|
|
}
|
|
|
|
func _Post_IncrPostLike_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
|
|
in := new(PostOpIdentityRequest)
|
|
if err := dec(in); err != nil {
|
|
return nil, err
|
|
}
|
|
if interceptor == nil {
|
|
return srv.(PostServer).IncrPostLike(ctx, in)
|
|
}
|
|
info := &grpc.UnaryServerInfo{
|
|
Server: srv,
|
|
FullMethod: Post_IncrPostLike_FullMethodName,
|
|
}
|
|
handler := func(ctx context.Context, req interface{}) (interface{}, error) {
|
|
return srv.(PostServer).IncrPostLike(ctx, req.(*PostOpIdentityRequest))
|
|
}
|
|
return interceptor(ctx, in, info, handler)
|
|
}
|
|
|
|
func _Post_DescPostLike_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
|
|
in := new(PostOpIdentityRequest)
|
|
if err := dec(in); err != nil {
|
|
return nil, err
|
|
}
|
|
if interceptor == nil {
|
|
return srv.(PostServer).DescPostLike(ctx, in)
|
|
}
|
|
info := &grpc.UnaryServerInfo{
|
|
Server: srv,
|
|
FullMethod: Post_DescPostLike_FullMethodName,
|
|
}
|
|
handler := func(ctx context.Context, req interface{}) (interface{}, error) {
|
|
return srv.(PostServer).DescPostLike(ctx, req.(*PostOpIdentityRequest))
|
|
}
|
|
return interceptor(ctx, in, info, handler)
|
|
}
|
|
|
|
func _Post_IncrPostUnlike_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
|
|
in := new(PostOpIdentityRequest)
|
|
if err := dec(in); err != nil {
|
|
return nil, err
|
|
}
|
|
if interceptor == nil {
|
|
return srv.(PostServer).IncrPostUnlike(ctx, in)
|
|
}
|
|
info := &grpc.UnaryServerInfo{
|
|
Server: srv,
|
|
FullMethod: Post_IncrPostUnlike_FullMethodName,
|
|
}
|
|
handler := func(ctx context.Context, req interface{}) (interface{}, error) {
|
|
return srv.(PostServer).IncrPostUnlike(ctx, req.(*PostOpIdentityRequest))
|
|
}
|
|
return interceptor(ctx, in, info, handler)
|
|
}
|
|
|
|
func _Post_DescPostUnlike_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
|
|
in := new(PostOpIdentityRequest)
|
|
if err := dec(in); err != nil {
|
|
return nil, err
|
|
}
|
|
if interceptor == nil {
|
|
return srv.(PostServer).DescPostUnlike(ctx, in)
|
|
}
|
|
info := &grpc.UnaryServerInfo{
|
|
Server: srv,
|
|
FullMethod: Post_DescPostUnlike_FullMethodName,
|
|
}
|
|
handler := func(ctx context.Context, req interface{}) (interface{}, error) {
|
|
return srv.(PostServer).DescPostUnlike(ctx, req.(*PostOpIdentityRequest))
|
|
}
|
|
return interceptor(ctx, in, info, handler)
|
|
}
|
|
|
|
func _Post_CommentList_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
|
|
in := new(CommentListRequest)
|
|
if err := dec(in); err != nil {
|
|
return nil, err
|
|
}
|
|
if interceptor == nil {
|
|
return srv.(PostServer).CommentList(ctx, in)
|
|
}
|
|
info := &grpc.UnaryServerInfo{
|
|
Server: srv,
|
|
FullMethod: Post_CommentList_FullMethodName,
|
|
}
|
|
handler := func(ctx context.Context, req interface{}) (interface{}, error) {
|
|
return srv.(PostServer).CommentList(ctx, req.(*CommentListRequest))
|
|
}
|
|
return interceptor(ctx, in, info, handler)
|
|
}
|
|
|
|
func _Post_AddComment_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
|
|
in := new(CommentItem)
|
|
if err := dec(in); err != nil {
|
|
return nil, err
|
|
}
|
|
if interceptor == nil {
|
|
return srv.(PostServer).AddComment(ctx, in)
|
|
}
|
|
info := &grpc.UnaryServerInfo{
|
|
Server: srv,
|
|
FullMethod: Post_AddComment_FullMethodName,
|
|
}
|
|
handler := func(ctx context.Context, req interface{}) (interface{}, error) {
|
|
return srv.(PostServer).AddComment(ctx, req.(*CommentItem))
|
|
}
|
|
return interceptor(ctx, in, info, handler)
|
|
}
|
|
|
|
func _Post_ModifyComment_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
|
|
in := new(CommentItem)
|
|
if err := dec(in); err != nil {
|
|
return nil, err
|
|
}
|
|
if interceptor == nil {
|
|
return srv.(PostServer).ModifyComment(ctx, in)
|
|
}
|
|
info := &grpc.UnaryServerInfo{
|
|
Server: srv,
|
|
FullMethod: Post_ModifyComment_FullMethodName,
|
|
}
|
|
handler := func(ctx context.Context, req interface{}) (interface{}, error) {
|
|
return srv.(PostServer).ModifyComment(ctx, req.(*CommentItem))
|
|
}
|
|
return interceptor(ctx, in, info, handler)
|
|
}
|
|
|
|
func _Post_DeleteComment_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
|
|
in := new(DeleteCommentRequest)
|
|
if err := dec(in); err != nil {
|
|
return nil, err
|
|
}
|
|
if interceptor == nil {
|
|
return srv.(PostServer).DeleteComment(ctx, in)
|
|
}
|
|
info := &grpc.UnaryServerInfo{
|
|
Server: srv,
|
|
FullMethod: Post_DeleteComment_FullMethodName,
|
|
}
|
|
handler := func(ctx context.Context, req interface{}) (interface{}, error) {
|
|
return srv.(PostServer).DeleteComment(ctx, req.(*DeleteCommentRequest))
|
|
}
|
|
return interceptor(ctx, in, info, handler)
|
|
}
|
|
|
|
func _Post_IncrCommentLike_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
|
|
in := new(CommentOpIdentityRequest)
|
|
if err := dec(in); err != nil {
|
|
return nil, err
|
|
}
|
|
if interceptor == nil {
|
|
return srv.(PostServer).IncrCommentLike(ctx, in)
|
|
}
|
|
info := &grpc.UnaryServerInfo{
|
|
Server: srv,
|
|
FullMethod: Post_IncrCommentLike_FullMethodName,
|
|
}
|
|
handler := func(ctx context.Context, req interface{}) (interface{}, error) {
|
|
return srv.(PostServer).IncrCommentLike(ctx, req.(*CommentOpIdentityRequest))
|
|
}
|
|
return interceptor(ctx, in, info, handler)
|
|
}
|
|
|
|
func _Post_DescCommentLike_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
|
|
in := new(CommentOpIdentityRequest)
|
|
if err := dec(in); err != nil {
|
|
return nil, err
|
|
}
|
|
if interceptor == nil {
|
|
return srv.(PostServer).DescCommentLike(ctx, in)
|
|
}
|
|
info := &grpc.UnaryServerInfo{
|
|
Server: srv,
|
|
FullMethod: Post_DescCommentLike_FullMethodName,
|
|
}
|
|
handler := func(ctx context.Context, req interface{}) (interface{}, error) {
|
|
return srv.(PostServer).DescCommentLike(ctx, req.(*CommentOpIdentityRequest))
|
|
}
|
|
return interceptor(ctx, in, info, handler)
|
|
}
|
|
|
|
func _Post_IncrCommentUnlike_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
|
|
in := new(CommentOpIdentityRequest)
|
|
if err := dec(in); err != nil {
|
|
return nil, err
|
|
}
|
|
if interceptor == nil {
|
|
return srv.(PostServer).IncrCommentUnlike(ctx, in)
|
|
}
|
|
info := &grpc.UnaryServerInfo{
|
|
Server: srv,
|
|
FullMethod: Post_IncrCommentUnlike_FullMethodName,
|
|
}
|
|
handler := func(ctx context.Context, req interface{}) (interface{}, error) {
|
|
return srv.(PostServer).IncrCommentUnlike(ctx, req.(*CommentOpIdentityRequest))
|
|
}
|
|
return interceptor(ctx, in, info, handler)
|
|
}
|
|
|
|
func _Post_DescCommentUnlike_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
|
|
in := new(CommentOpIdentityRequest)
|
|
if err := dec(in); err != nil {
|
|
return nil, err
|
|
}
|
|
if interceptor == nil {
|
|
return srv.(PostServer).DescCommentUnlike(ctx, in)
|
|
}
|
|
info := &grpc.UnaryServerInfo{
|
|
Server: srv,
|
|
FullMethod: Post_DescCommentUnlike_FullMethodName,
|
|
}
|
|
handler := func(ctx context.Context, req interface{}) (interface{}, error) {
|
|
return srv.(PostServer).DescCommentUnlike(ctx, req.(*CommentOpIdentityRequest))
|
|
}
|
|
return interceptor(ctx, in, info, handler)
|
|
}
|
|
|
|
// Post_ServiceDesc is the grpc.ServiceDesc for Post service.
|
|
// It's only intended for direct use with grpc.RegisterService,
|
|
// and not to be introspected or modified (even as a copy)
|
|
var Post_ServiceDesc = grpc.ServiceDesc{
|
|
ServiceName: "content.Post",
|
|
HandlerType: (*PostServer)(nil),
|
|
Methods: []grpc.MethodDesc{
|
|
{
|
|
MethodName: "PostList",
|
|
Handler: _Post_PostList_Handler,
|
|
},
|
|
{
|
|
MethodName: "GetPost",
|
|
Handler: _Post_GetPost_Handler,
|
|
},
|
|
{
|
|
MethodName: "AddPost",
|
|
Handler: _Post_AddPost_Handler,
|
|
},
|
|
{
|
|
MethodName: "ModifyPost",
|
|
Handler: _Post_ModifyPost_Handler,
|
|
},
|
|
{
|
|
MethodName: "DeletePost",
|
|
Handler: _Post_DeletePost_Handler,
|
|
},
|
|
{
|
|
MethodName: "IncrPostLike",
|
|
Handler: _Post_IncrPostLike_Handler,
|
|
},
|
|
{
|
|
MethodName: "DescPostLike",
|
|
Handler: _Post_DescPostLike_Handler,
|
|
},
|
|
{
|
|
MethodName: "IncrPostUnlike",
|
|
Handler: _Post_IncrPostUnlike_Handler,
|
|
},
|
|
{
|
|
MethodName: "DescPostUnlike",
|
|
Handler: _Post_DescPostUnlike_Handler,
|
|
},
|
|
{
|
|
MethodName: "CommentList",
|
|
Handler: _Post_CommentList_Handler,
|
|
},
|
|
{
|
|
MethodName: "AddComment",
|
|
Handler: _Post_AddComment_Handler,
|
|
},
|
|
{
|
|
MethodName: "ModifyComment",
|
|
Handler: _Post_ModifyComment_Handler,
|
|
},
|
|
{
|
|
MethodName: "DeleteComment",
|
|
Handler: _Post_DeleteComment_Handler,
|
|
},
|
|
{
|
|
MethodName: "IncrCommentLike",
|
|
Handler: _Post_IncrCommentLike_Handler,
|
|
},
|
|
{
|
|
MethodName: "DescCommentLike",
|
|
Handler: _Post_DescCommentLike_Handler,
|
|
},
|
|
{
|
|
MethodName: "IncrCommentUnlike",
|
|
Handler: _Post_IncrCommentUnlike_Handler,
|
|
},
|
|
{
|
|
MethodName: "DescCommentUnlike",
|
|
Handler: _Post_DescCommentUnlike_Handler,
|
|
},
|
|
},
|
|
Streams: []grpc.StreamDesc{},
|
|
Metadata: "post.proto",
|
|
}
|