2024-07-15 13:08:48 +00:00
// 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 )
2024-07-15 18:07:41 +00:00
CreateLibrary ( ctx context . Context , in * CreateLibraryRequest , opts ... grpc . CallOption ) ( * CreateLibraryResponse , error )
2024-07-15 13:08:48 +00:00
}
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
}
2024-07-15 18:07:41 +00:00
func ( c * libraryServiceClient ) CreateLibrary ( ctx context . Context , in * CreateLibraryRequest , opts ... grpc . CallOption ) ( * CreateLibraryResponse , error ) {
out := new ( CreateLibraryResponse )
err := c . cc . Invoke ( ctx , "/LibraryService.LibraryService/CreateLibrary" , in , out , opts ... )
if err != nil {
return nil , err
}
return out , nil
}
2024-07-15 13:08:48 +00:00
// 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 )
2024-07-15 18:07:41 +00:00
CreateLibrary ( context . Context , * CreateLibraryRequest ) ( * CreateLibraryResponse , error )
2024-07-15 13:08:48 +00:00
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" )
}
2024-07-15 18:07:41 +00:00
func ( UnimplementedLibraryServiceServer ) CreateLibrary ( context . Context , * CreateLibraryRequest ) ( * CreateLibraryResponse , error ) {
return nil , status . Errorf ( codes . Unimplemented , "method CreateLibrary not implemented" )
}
2024-07-15 13:08:48 +00:00
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 )
}
2024-07-15 18:07:41 +00:00
func _LibraryService_CreateLibrary_Handler ( srv interface { } , ctx context . Context , dec func ( interface { } ) error , interceptor grpc . UnaryServerInterceptor ) ( interface { } , error ) {
in := new ( CreateLibraryRequest )
if err := dec ( in ) ; err != nil {
return nil , err
}
if interceptor == nil {
return srv . ( LibraryServiceServer ) . CreateLibrary ( ctx , in )
}
info := & grpc . UnaryServerInfo {
Server : srv ,
FullMethod : "/LibraryService.LibraryService/CreateLibrary" ,
}
handler := func ( ctx context . Context , req interface { } ) ( interface { } , error ) {
return srv . ( LibraryServiceServer ) . CreateLibrary ( ctx , req . ( * CreateLibraryRequest ) )
}
return interceptor ( ctx , in , info , handler )
}
2024-07-15 13:08:48 +00:00
// 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 ,
} ,
2024-07-15 18:07:41 +00:00
{
MethodName : "CreateLibrary" ,
Handler : _LibraryService_CreateLibrary_Handler ,
} ,
2024-07-15 13:08:48 +00:00
} ,
Streams : [ ] grpc . StreamDesc { } ,
Metadata : "api/library/library.proto" ,
}