mirror of
https://github.com/usememos/memos.git
synced 2024-11-16 11:46:07 +08:00
4d41b68d4c
* feat: implmented link previews (proto files) * fix: passing proto linter errors * chore: renamed MetadataService service in proto file. * fix: removed unused files * chore: removed meaningless comments from proto file
109 lines
3.9 KiB
Go
109 lines
3.9 KiB
Go
// Code generated by protoc-gen-go-grpc. DO NOT EDIT.
|
|
// versions:
|
|
// - protoc-gen-go-grpc v1.3.0
|
|
// - protoc (unknown)
|
|
// source: api/v2/link_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 (
|
|
LinkService_GetLinkMetadata_FullMethodName = "/memos.api.v2.LinkService/GetLinkMetadata"
|
|
)
|
|
|
|
// LinkServiceClient is the client API for LinkService 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 LinkServiceClient interface {
|
|
GetLinkMetadata(ctx context.Context, in *GetLinkMetadataRequest, opts ...grpc.CallOption) (*GetLinkMetadataResponse, error)
|
|
}
|
|
|
|
type linkServiceClient struct {
|
|
cc grpc.ClientConnInterface
|
|
}
|
|
|
|
func NewLinkServiceClient(cc grpc.ClientConnInterface) LinkServiceClient {
|
|
return &linkServiceClient{cc}
|
|
}
|
|
|
|
func (c *linkServiceClient) GetLinkMetadata(ctx context.Context, in *GetLinkMetadataRequest, opts ...grpc.CallOption) (*GetLinkMetadataResponse, error) {
|
|
out := new(GetLinkMetadataResponse)
|
|
err := c.cc.Invoke(ctx, LinkService_GetLinkMetadata_FullMethodName, in, out, opts...)
|
|
if err != nil {
|
|
return nil, err
|
|
}
|
|
return out, nil
|
|
}
|
|
|
|
// LinkServiceServer is the server API for LinkService service.
|
|
// All implementations must embed UnimplementedLinkServiceServer
|
|
// for forward compatibility
|
|
type LinkServiceServer interface {
|
|
GetLinkMetadata(context.Context, *GetLinkMetadataRequest) (*GetLinkMetadataResponse, error)
|
|
mustEmbedUnimplementedLinkServiceServer()
|
|
}
|
|
|
|
// UnimplementedLinkServiceServer must be embedded to have forward compatible implementations.
|
|
type UnimplementedLinkServiceServer struct {
|
|
}
|
|
|
|
func (UnimplementedLinkServiceServer) GetLinkMetadata(context.Context, *GetLinkMetadataRequest) (*GetLinkMetadataResponse, error) {
|
|
return nil, status.Errorf(codes.Unimplemented, "method GetLinkMetadata not implemented")
|
|
}
|
|
func (UnimplementedLinkServiceServer) mustEmbedUnimplementedLinkServiceServer() {}
|
|
|
|
// UnsafeLinkServiceServer may be embedded to opt out of forward compatibility for this service.
|
|
// Use of this interface is not recommended, as added methods to LinkServiceServer will
|
|
// result in compilation errors.
|
|
type UnsafeLinkServiceServer interface {
|
|
mustEmbedUnimplementedLinkServiceServer()
|
|
}
|
|
|
|
func RegisterLinkServiceServer(s grpc.ServiceRegistrar, srv LinkServiceServer) {
|
|
s.RegisterService(&LinkService_ServiceDesc, srv)
|
|
}
|
|
|
|
func _LinkService_GetLinkMetadata_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
|
|
in := new(GetLinkMetadataRequest)
|
|
if err := dec(in); err != nil {
|
|
return nil, err
|
|
}
|
|
if interceptor == nil {
|
|
return srv.(LinkServiceServer).GetLinkMetadata(ctx, in)
|
|
}
|
|
info := &grpc.UnaryServerInfo{
|
|
Server: srv,
|
|
FullMethod: LinkService_GetLinkMetadata_FullMethodName,
|
|
}
|
|
handler := func(ctx context.Context, req interface{}) (interface{}, error) {
|
|
return srv.(LinkServiceServer).GetLinkMetadata(ctx, req.(*GetLinkMetadataRequest))
|
|
}
|
|
return interceptor(ctx, in, info, handler)
|
|
}
|
|
|
|
// LinkService_ServiceDesc is the grpc.ServiceDesc for LinkService service.
|
|
// It's only intended for direct use with grpc.RegisterService,
|
|
// and not to be introspected or modified (even as a copy)
|
|
var LinkService_ServiceDesc = grpc.ServiceDesc{
|
|
ServiceName: "memos.api.v2.LinkService",
|
|
HandlerType: (*LinkServiceServer)(nil),
|
|
Methods: []grpc.MethodDesc{
|
|
{
|
|
MethodName: "GetLinkMetadata",
|
|
Handler: _LinkService_GetLinkMetadata_Handler,
|
|
},
|
|
},
|
|
Streams: []grpc.StreamDesc{},
|
|
Metadata: "api/v2/link_service.proto",
|
|
}
|