// Code generated by protoc-gen-go-grpc. DO NOT EDIT. // versions: // - protoc-gen-go-grpc v1.2.0 // - protoc v4.23.4 // source: comment.proto package commentv1 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 // CommentServiceClient is the client API for CommentService 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 CommentServiceClient interface { CreateComment(ctx context.Context, in *CreateCommentRequest, opts ...grpc.CallOption) (*Comment, error) UpdateComment(ctx context.Context, in *UpdateCommentRequest, opts ...grpc.CallOption) (*Comment, error) DeleteComment(ctx context.Context, in *DeleteCommentRequest, opts ...grpc.CallOption) (*emptypb.Empty, error) GetComment(ctx context.Context, in *GetCommentRequest, opts ...grpc.CallOption) (*Comment, error) GetPostComments(ctx context.Context, in *GetPostCommentsRequest, opts ...grpc.CallOption) (*PostComments, error) } type commentServiceClient struct { cc grpc.ClientConnInterface } func NewCommentServiceClient(cc grpc.ClientConnInterface) CommentServiceClient { return &commentServiceClient{cc} } func (c *commentServiceClient) CreateComment(ctx context.Context, in *CreateCommentRequest, opts ...grpc.CallOption) (*Comment, error) { out := new(Comment) err := c.cc.Invoke(ctx, "/panels.comment.v1.CommentService/CreateComment", in, out, opts...) if err != nil { return nil, err } return out, nil } func (c *commentServiceClient) UpdateComment(ctx context.Context, in *UpdateCommentRequest, opts ...grpc.CallOption) (*Comment, error) { out := new(Comment) err := c.cc.Invoke(ctx, "/panels.comment.v1.CommentService/UpdateComment", in, out, opts...) if err != nil { return nil, err } return out, nil } func (c *commentServiceClient) DeleteComment(ctx context.Context, in *DeleteCommentRequest, opts ...grpc.CallOption) (*emptypb.Empty, error) { out := new(emptypb.Empty) err := c.cc.Invoke(ctx, "/panels.comment.v1.CommentService/DeleteComment", in, out, opts...) if err != nil { return nil, err } return out, nil } func (c *commentServiceClient) GetComment(ctx context.Context, in *GetCommentRequest, opts ...grpc.CallOption) (*Comment, error) { out := new(Comment) err := c.cc.Invoke(ctx, "/panels.comment.v1.CommentService/GetComment", in, out, opts...) if err != nil { return nil, err } return out, nil } func (c *commentServiceClient) GetPostComments(ctx context.Context, in *GetPostCommentsRequest, opts ...grpc.CallOption) (*PostComments, error) { out := new(PostComments) err := c.cc.Invoke(ctx, "/panels.comment.v1.CommentService/GetPostComments", in, out, opts...) if err != nil { return nil, err } return out, nil } // CommentServiceServer is the server API for CommentService service. // All implementations must embed UnimplementedCommentServiceServer // for forward compatibility type CommentServiceServer interface { CreateComment(context.Context, *CreateCommentRequest) (*Comment, error) UpdateComment(context.Context, *UpdateCommentRequest) (*Comment, error) DeleteComment(context.Context, *DeleteCommentRequest) (*emptypb.Empty, error) GetComment(context.Context, *GetCommentRequest) (*Comment, error) GetPostComments(context.Context, *GetPostCommentsRequest) (*PostComments, error) mustEmbedUnimplementedCommentServiceServer() } // UnimplementedCommentServiceServer must be embedded to have forward compatible implementations. type UnimplementedCommentServiceServer struct { } func (UnimplementedCommentServiceServer) CreateComment(context.Context, *CreateCommentRequest) (*Comment, error) { return nil, status.Errorf(codes.Unimplemented, "method CreateComment not implemented") } func (UnimplementedCommentServiceServer) UpdateComment(context.Context, *UpdateCommentRequest) (*Comment, error) { return nil, status.Errorf(codes.Unimplemented, "method UpdateComment not implemented") } func (UnimplementedCommentServiceServer) DeleteComment(context.Context, *DeleteCommentRequest) (*emptypb.Empty, error) { return nil, status.Errorf(codes.Unimplemented, "method DeleteComment not implemented") } func (UnimplementedCommentServiceServer) GetComment(context.Context, *GetCommentRequest) (*Comment, error) { return nil, status.Errorf(codes.Unimplemented, "method GetComment not implemented") } func (UnimplementedCommentServiceServer) GetPostComments(context.Context, *GetPostCommentsRequest) (*PostComments, error) { return nil, status.Errorf(codes.Unimplemented, "method GetPostComments not implemented") } func (UnimplementedCommentServiceServer) mustEmbedUnimplementedCommentServiceServer() {} // UnsafeCommentServiceServer may be embedded to opt out of forward compatibility for this service. // Use of this interface is not recommended, as added methods to CommentServiceServer will // result in compilation errors. type UnsafeCommentServiceServer interface { mustEmbedUnimplementedCommentServiceServer() } func RegisterCommentServiceServer(s grpc.ServiceRegistrar, srv CommentServiceServer) { s.RegisterService(&CommentService_ServiceDesc, srv) } func _CommentService_CreateComment_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { in := new(CreateCommentRequest) if err := dec(in); err != nil { return nil, err } if interceptor == nil { return srv.(CommentServiceServer).CreateComment(ctx, in) } info := &grpc.UnaryServerInfo{ Server: srv, FullMethod: "/panels.comment.v1.CommentService/CreateComment", } handler := func(ctx context.Context, req interface{}) (interface{}, error) { return srv.(CommentServiceServer).CreateComment(ctx, req.(*CreateCommentRequest)) } return interceptor(ctx, in, info, handler) } func _CommentService_UpdateComment_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { in := new(UpdateCommentRequest) if err := dec(in); err != nil { return nil, err } if interceptor == nil { return srv.(CommentServiceServer).UpdateComment(ctx, in) } info := &grpc.UnaryServerInfo{ Server: srv, FullMethod: "/panels.comment.v1.CommentService/UpdateComment", } handler := func(ctx context.Context, req interface{}) (interface{}, error) { return srv.(CommentServiceServer).UpdateComment(ctx, req.(*UpdateCommentRequest)) } return interceptor(ctx, in, info, handler) } func _CommentService_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.(CommentServiceServer).DeleteComment(ctx, in) } info := &grpc.UnaryServerInfo{ Server: srv, FullMethod: "/panels.comment.v1.CommentService/DeleteComment", } handler := func(ctx context.Context, req interface{}) (interface{}, error) { return srv.(CommentServiceServer).DeleteComment(ctx, req.(*DeleteCommentRequest)) } return interceptor(ctx, in, info, handler) } func _CommentService_GetComment_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { in := new(GetCommentRequest) if err := dec(in); err != nil { return nil, err } if interceptor == nil { return srv.(CommentServiceServer).GetComment(ctx, in) } info := &grpc.UnaryServerInfo{ Server: srv, FullMethod: "/panels.comment.v1.CommentService/GetComment", } handler := func(ctx context.Context, req interface{}) (interface{}, error) { return srv.(CommentServiceServer).GetComment(ctx, req.(*GetCommentRequest)) } return interceptor(ctx, in, info, handler) } func _CommentService_GetPostComments_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { in := new(GetPostCommentsRequest) if err := dec(in); err != nil { return nil, err } if interceptor == nil { return srv.(CommentServiceServer).GetPostComments(ctx, in) } info := &grpc.UnaryServerInfo{ Server: srv, FullMethod: "/panels.comment.v1.CommentService/GetPostComments", } handler := func(ctx context.Context, req interface{}) (interface{}, error) { return srv.(CommentServiceServer).GetPostComments(ctx, req.(*GetPostCommentsRequest)) } return interceptor(ctx, in, info, handler) } // CommentService_ServiceDesc is the grpc.ServiceDesc for CommentService service. // It's only intended for direct use with grpc.RegisterService, // and not to be introspected or modified (even as a copy) var CommentService_ServiceDesc = grpc.ServiceDesc{ ServiceName: "panels.comment.v1.CommentService", HandlerType: (*CommentServiceServer)(nil), Methods: []grpc.MethodDesc{ { MethodName: "CreateComment", Handler: _CommentService_CreateComment_Handler, }, { MethodName: "UpdateComment", Handler: _CommentService_UpdateComment_Handler, }, { MethodName: "DeleteComment", Handler: _CommentService_DeleteComment_Handler, }, { MethodName: "GetComment", Handler: _CommentService_GetComment_Handler, }, { MethodName: "GetPostComments", Handler: _CommentService_GetPostComments_Handler, }, }, Streams: []grpc.StreamDesc{}, Metadata: "comment.proto", }