106 lines
3.8 KiB
Go
106 lines
3.8 KiB
Go
|
// Code generated by protoc-gen-go-grpc. DO NOT EDIT.
|
||
|
// versions:
|
||
|
// - protoc-gen-go-grpc v1.2.0
|
||
|
// - protoc (unknown)
|
||
|
// source: api/library/library.proto
|
||
|
|
||
|
package library
|
||
|
|
||
|
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
|
||
|
|
||
|
// LibraryServiceClient is the client API for LibraryService 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 LibraryServiceClient interface {
|
||
|
ListLibrary(ctx context.Context, in *ListLibraryRequest, opts ...grpc.CallOption) (*ListLibraryResponse, error)
|
||
|
}
|
||
|
|
||
|
type libraryServiceClient struct {
|
||
|
cc grpc.ClientConnInterface
|
||
|
}
|
||
|
|
||
|
func NewLibraryServiceClient(cc grpc.ClientConnInterface) LibraryServiceClient {
|
||
|
return &libraryServiceClient{cc}
|
||
|
}
|
||
|
|
||
|
func (c *libraryServiceClient) ListLibrary(ctx context.Context, in *ListLibraryRequest, opts ...grpc.CallOption) (*ListLibraryResponse, error) {
|
||
|
out := new(ListLibraryResponse)
|
||
|
err := c.cc.Invoke(ctx, "/LibraryService.LibraryService/ListLibrary", in, out, opts...)
|
||
|
if err != nil {
|
||
|
return nil, err
|
||
|
}
|
||
|
return out, nil
|
||
|
}
|
||
|
|
||
|
// LibraryServiceServer is the server API for LibraryService service.
|
||
|
// All implementations must embed UnimplementedLibraryServiceServer
|
||
|
// for forward compatibility
|
||
|
type LibraryServiceServer interface {
|
||
|
ListLibrary(context.Context, *ListLibraryRequest) (*ListLibraryResponse, error)
|
||
|
mustEmbedUnimplementedLibraryServiceServer()
|
||
|
}
|
||
|
|
||
|
// UnimplementedLibraryServiceServer must be embedded to have forward compatible implementations.
|
||
|
type UnimplementedLibraryServiceServer struct {
|
||
|
}
|
||
|
|
||
|
func (UnimplementedLibraryServiceServer) ListLibrary(context.Context, *ListLibraryRequest) (*ListLibraryResponse, error) {
|
||
|
return nil, status.Errorf(codes.Unimplemented, "method ListLibrary not implemented")
|
||
|
}
|
||
|
func (UnimplementedLibraryServiceServer) mustEmbedUnimplementedLibraryServiceServer() {}
|
||
|
|
||
|
// UnsafeLibraryServiceServer may be embedded to opt out of forward compatibility for this service.
|
||
|
// Use of this interface is not recommended, as added methods to LibraryServiceServer will
|
||
|
// result in compilation errors.
|
||
|
type UnsafeLibraryServiceServer interface {
|
||
|
mustEmbedUnimplementedLibraryServiceServer()
|
||
|
}
|
||
|
|
||
|
func RegisterLibraryServiceServer(s grpc.ServiceRegistrar, srv LibraryServiceServer) {
|
||
|
s.RegisterService(&LibraryService_ServiceDesc, srv)
|
||
|
}
|
||
|
|
||
|
func _LibraryService_ListLibrary_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
|
||
|
in := new(ListLibraryRequest)
|
||
|
if err := dec(in); err != nil {
|
||
|
return nil, err
|
||
|
}
|
||
|
if interceptor == nil {
|
||
|
return srv.(LibraryServiceServer).ListLibrary(ctx, in)
|
||
|
}
|
||
|
info := &grpc.UnaryServerInfo{
|
||
|
Server: srv,
|
||
|
FullMethod: "/LibraryService.LibraryService/ListLibrary",
|
||
|
}
|
||
|
handler := func(ctx context.Context, req interface{}) (interface{}, error) {
|
||
|
return srv.(LibraryServiceServer).ListLibrary(ctx, req.(*ListLibraryRequest))
|
||
|
}
|
||
|
return interceptor(ctx, in, info, handler)
|
||
|
}
|
||
|
|
||
|
// LibraryService_ServiceDesc is the grpc.ServiceDesc for LibraryService service.
|
||
|
// It's only intended for direct use with grpc.RegisterService,
|
||
|
// and not to be introspected or modified (even as a copy)
|
||
|
var LibraryService_ServiceDesc = grpc.ServiceDesc{
|
||
|
ServiceName: "LibraryService.LibraryService",
|
||
|
HandlerType: (*LibraryServiceServer)(nil),
|
||
|
Methods: []grpc.MethodDesc{
|
||
|
{
|
||
|
MethodName: "ListLibrary",
|
||
|
Handler: _LibraryService_ListLibrary_Handler,
|
||
|
},
|
||
|
},
|
||
|
Streams: []grpc.StreamDesc{},
|
||
|
Metadata: "api/library/library.proto",
|
||
|
}
|