2021-12-03 22:04:09 +00:00
// Code generated by protoc-gen-go-grpc. DO NOT EDIT.
package pb
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
// FileServiceClient is the client API for FileService 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 FileServiceClient interface {
UploadFile ( ctx context . Context , in * UploadFileRequest , opts ... grpc . CallOption ) ( * UploadFileResponse , error )
GetFile ( ctx context . Context , in * GetFileRequest , opts ... grpc . CallOption ) ( * GetFileResponse , error )
2021-12-04 10:30:42 +00:00
DeleteFile ( ctx context . Context , in * DeleteFileRequest , opts ... grpc . CallOption ) ( * DeleteFileResponse , error )
ListFiles ( ctx context . Context , in * ListFilesRequest , opts ... grpc . CallOption ) ( * ListFilesResponse , error )
2021-12-03 22:04:09 +00:00
}
type fileServiceClient struct {
cc grpc . ClientConnInterface
}
func NewFileServiceClient ( cc grpc . ClientConnInterface ) FileServiceClient {
return & fileServiceClient { cc }
}
func ( c * fileServiceClient ) UploadFile ( ctx context . Context , in * UploadFileRequest , opts ... grpc . CallOption ) ( * UploadFileResponse , error ) {
out := new ( UploadFileResponse )
err := c . cc . Invoke ( ctx , "/ezshare.FileService/UploadFile" , in , out , opts ... )
if err != nil {
return nil , err
}
return out , nil
}
func ( c * fileServiceClient ) GetFile ( ctx context . Context , in * GetFileRequest , opts ... grpc . CallOption ) ( * GetFileResponse , error ) {
out := new ( GetFileResponse )
err := c . cc . Invoke ( ctx , "/ezshare.FileService/GetFile" , in , out , opts ... )
if err != nil {
return nil , err
}
return out , nil
}
2021-12-04 10:30:42 +00:00
func ( c * fileServiceClient ) DeleteFile ( ctx context . Context , in * DeleteFileRequest , opts ... grpc . CallOption ) ( * DeleteFileResponse , error ) {
out := new ( DeleteFileResponse )
err := c . cc . Invoke ( ctx , "/ezshare.FileService/DeleteFile" , in , out , opts ... )
if err != nil {
return nil , err
}
return out , nil
}
func ( c * fileServiceClient ) ListFiles ( ctx context . Context , in * ListFilesRequest , opts ... grpc . CallOption ) ( * ListFilesResponse , error ) {
out := new ( ListFilesResponse )
err := c . cc . Invoke ( ctx , "/ezshare.FileService/ListFiles" , in , out , opts ... )
if err != nil {
return nil , err
}
return out , nil
}
2021-12-03 22:04:09 +00:00
// FileServiceServer is the server API for FileService service.
// All implementations must embed UnimplementedFileServiceServer
// for forward compatibility
type FileServiceServer interface {
UploadFile ( context . Context , * UploadFileRequest ) ( * UploadFileResponse , error )
GetFile ( context . Context , * GetFileRequest ) ( * GetFileResponse , error )
2021-12-04 10:30:42 +00:00
DeleteFile ( context . Context , * DeleteFileRequest ) ( * DeleteFileResponse , error )
ListFiles ( context . Context , * ListFilesRequest ) ( * ListFilesResponse , error )
2021-12-03 22:04:09 +00:00
mustEmbedUnimplementedFileServiceServer ( )
}
// UnimplementedFileServiceServer must be embedded to have forward compatible implementations.
type UnimplementedFileServiceServer struct {
}
func ( UnimplementedFileServiceServer ) UploadFile ( context . Context , * UploadFileRequest ) ( * UploadFileResponse , error ) {
return nil , status . Errorf ( codes . Unimplemented , "method UploadFile not implemented" )
}
func ( UnimplementedFileServiceServer ) GetFile ( context . Context , * GetFileRequest ) ( * GetFileResponse , error ) {
return nil , status . Errorf ( codes . Unimplemented , "method GetFile not implemented" )
}
2021-12-04 10:30:42 +00:00
func ( UnimplementedFileServiceServer ) DeleteFile ( context . Context , * DeleteFileRequest ) ( * DeleteFileResponse , error ) {
return nil , status . Errorf ( codes . Unimplemented , "method DeleteFile not implemented" )
}
func ( UnimplementedFileServiceServer ) ListFiles ( context . Context , * ListFilesRequest ) ( * ListFilesResponse , error ) {
return nil , status . Errorf ( codes . Unimplemented , "method ListFiles not implemented" )
}
2021-12-03 22:04:09 +00:00
func ( UnimplementedFileServiceServer ) mustEmbedUnimplementedFileServiceServer ( ) { }
// UnsafeFileServiceServer may be embedded to opt out of forward compatibility for this service.
// Use of this interface is not recommended, as added methods to FileServiceServer will
// result in compilation errors.
type UnsafeFileServiceServer interface {
mustEmbedUnimplementedFileServiceServer ( )
}
func RegisterFileServiceServer ( s grpc . ServiceRegistrar , srv FileServiceServer ) {
s . RegisterService ( & FileService_ServiceDesc , srv )
}
func _FileService_UploadFile_Handler ( srv interface { } , ctx context . Context , dec func ( interface { } ) error , interceptor grpc . UnaryServerInterceptor ) ( interface { } , error ) {
in := new ( UploadFileRequest )
if err := dec ( in ) ; err != nil {
return nil , err
}
if interceptor == nil {
return srv . ( FileServiceServer ) . UploadFile ( ctx , in )
}
info := & grpc . UnaryServerInfo {
Server : srv ,
FullMethod : "/ezshare.FileService/UploadFile" ,
}
handler := func ( ctx context . Context , req interface { } ) ( interface { } , error ) {
return srv . ( FileServiceServer ) . UploadFile ( ctx , req . ( * UploadFileRequest ) )
}
return interceptor ( ctx , in , info , handler )
}
func _FileService_GetFile_Handler ( srv interface { } , ctx context . Context , dec func ( interface { } ) error , interceptor grpc . UnaryServerInterceptor ) ( interface { } , error ) {
in := new ( GetFileRequest )
if err := dec ( in ) ; err != nil {
return nil , err
}
if interceptor == nil {
return srv . ( FileServiceServer ) . GetFile ( ctx , in )
}
info := & grpc . UnaryServerInfo {
Server : srv ,
FullMethod : "/ezshare.FileService/GetFile" ,
}
handler := func ( ctx context . Context , req interface { } ) ( interface { } , error ) {
return srv . ( FileServiceServer ) . GetFile ( ctx , req . ( * GetFileRequest ) )
}
return interceptor ( ctx , in , info , handler )
}
2021-12-04 10:30:42 +00:00
func _FileService_DeleteFile_Handler ( srv interface { } , ctx context . Context , dec func ( interface { } ) error , interceptor grpc . UnaryServerInterceptor ) ( interface { } , error ) {
in := new ( DeleteFileRequest )
if err := dec ( in ) ; err != nil {
return nil , err
}
if interceptor == nil {
return srv . ( FileServiceServer ) . DeleteFile ( ctx , in )
}
info := & grpc . UnaryServerInfo {
Server : srv ,
FullMethod : "/ezshare.FileService/DeleteFile" ,
}
handler := func ( ctx context . Context , req interface { } ) ( interface { } , error ) {
return srv . ( FileServiceServer ) . DeleteFile ( ctx , req . ( * DeleteFileRequest ) )
}
return interceptor ( ctx , in , info , handler )
}
func _FileService_ListFiles_Handler ( srv interface { } , ctx context . Context , dec func ( interface { } ) error , interceptor grpc . UnaryServerInterceptor ) ( interface { } , error ) {
in := new ( ListFilesRequest )
if err := dec ( in ) ; err != nil {
return nil , err
}
if interceptor == nil {
return srv . ( FileServiceServer ) . ListFiles ( ctx , in )
}
info := & grpc . UnaryServerInfo {
Server : srv ,
FullMethod : "/ezshare.FileService/ListFiles" ,
}
handler := func ( ctx context . Context , req interface { } ) ( interface { } , error ) {
return srv . ( FileServiceServer ) . ListFiles ( ctx , req . ( * ListFilesRequest ) )
}
return interceptor ( ctx , in , info , handler )
}
2021-12-03 22:04:09 +00:00
// FileService_ServiceDesc is the grpc.ServiceDesc for FileService service.
// It's only intended for direct use with grpc.RegisterService,
// and not to be introspected or modified (even as a copy)
var FileService_ServiceDesc = grpc . ServiceDesc {
ServiceName : "ezshare.FileService" ,
HandlerType : ( * FileServiceServer ) ( nil ) ,
Methods : [ ] grpc . MethodDesc {
{
MethodName : "UploadFile" ,
Handler : _FileService_UploadFile_Handler ,
} ,
{
MethodName : "GetFile" ,
Handler : _FileService_GetFile_Handler ,
} ,
2021-12-04 10:30:42 +00:00
{
MethodName : "DeleteFile" ,
Handler : _FileService_DeleteFile_Handler ,
} ,
{
MethodName : "ListFiles" ,
Handler : _FileService_ListFiles_Handler ,
} ,
2021-12-03 22:04:09 +00:00
} ,
Streams : [ ] grpc . StreamDesc { } ,
Metadata : "protos/ezshare.proto" ,
}