memos/proto/gen/api/v2/markdown_service_grpc.pb.go

110 lines
4 KiB
Go
Raw Normal View History

2023-12-17 09:53:22 +08:00
// Code generated by protoc-gen-go-grpc. DO NOT EDIT.
// versions:
// - protoc-gen-go-grpc v1.3.0
// - protoc (unknown)
// source: api/v2/markdown_service.proto
package apiv2
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.32.0 or later.
const _ = grpc.SupportPackageIsVersion7
const (
MarkdownService_ParseMarkdown_FullMethodName = "/memos.api.v2.MarkdownService/ParseMarkdown"
)
// MarkdownServiceClient is the client API for MarkdownService 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 MarkdownServiceClient interface {
ParseMarkdown(ctx context.Context, in *ParseMarkdownRequest, opts ...grpc.CallOption) (*ParseMarkdownResponse, error)
}
type markdownServiceClient struct {
cc grpc.ClientConnInterface
}
func NewMarkdownServiceClient(cc grpc.ClientConnInterface) MarkdownServiceClient {
return &markdownServiceClient{cc}
}
func (c *markdownServiceClient) ParseMarkdown(ctx context.Context, in *ParseMarkdownRequest, opts ...grpc.CallOption) (*ParseMarkdownResponse, error) {
out := new(ParseMarkdownResponse)
err := c.cc.Invoke(ctx, MarkdownService_ParseMarkdown_FullMethodName, in, out, opts...)
if err != nil {
return nil, err
}
return out, nil
}
// MarkdownServiceServer is the server API for MarkdownService service.
// All implementations must embed UnimplementedMarkdownServiceServer
// for forward compatibility
type MarkdownServiceServer interface {
ParseMarkdown(context.Context, *ParseMarkdownRequest) (*ParseMarkdownResponse, error)
mustEmbedUnimplementedMarkdownServiceServer()
}
// UnimplementedMarkdownServiceServer must be embedded to have forward compatible implementations.
type UnimplementedMarkdownServiceServer struct {
}
func (UnimplementedMarkdownServiceServer) ParseMarkdown(context.Context, *ParseMarkdownRequest) (*ParseMarkdownResponse, error) {
return nil, status.Errorf(codes.Unimplemented, "method ParseMarkdown not implemented")
}
func (UnimplementedMarkdownServiceServer) mustEmbedUnimplementedMarkdownServiceServer() {}
// UnsafeMarkdownServiceServer may be embedded to opt out of forward compatibility for this service.
// Use of this interface is not recommended, as added methods to MarkdownServiceServer will
// result in compilation errors.
type UnsafeMarkdownServiceServer interface {
mustEmbedUnimplementedMarkdownServiceServer()
}
func RegisterMarkdownServiceServer(s grpc.ServiceRegistrar, srv MarkdownServiceServer) {
s.RegisterService(&MarkdownService_ServiceDesc, srv)
}
func _MarkdownService_ParseMarkdown_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
in := new(ParseMarkdownRequest)
if err := dec(in); err != nil {
return nil, err
}
if interceptor == nil {
return srv.(MarkdownServiceServer).ParseMarkdown(ctx, in)
}
info := &grpc.UnaryServerInfo{
Server: srv,
FullMethod: MarkdownService_ParseMarkdown_FullMethodName,
}
handler := func(ctx context.Context, req interface{}) (interface{}, error) {
return srv.(MarkdownServiceServer).ParseMarkdown(ctx, req.(*ParseMarkdownRequest))
}
return interceptor(ctx, in, info, handler)
}
// MarkdownService_ServiceDesc is the grpc.ServiceDesc for MarkdownService service.
// It's only intended for direct use with grpc.RegisterService,
// and not to be introspected or modified (even as a copy)
var MarkdownService_ServiceDesc = grpc.ServiceDesc{
ServiceName: "memos.api.v2.MarkdownService",
HandlerType: (*MarkdownServiceServer)(nil),
Methods: []grpc.MethodDesc{
{
MethodName: "ParseMarkdown",
Handler: _MarkdownService_ParseMarkdown_Handler,
},
},
Streams: []grpc.StreamDesc{},
Metadata: "api/v2/markdown_service.proto",
}