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" ,
}
2021-12-05 10:08:09 +00:00
// UserServiceClient is the client API for UserService 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 UserServiceClient interface {
Register ( ctx context . Context , in * RegisterUserRequest , opts ... grpc . CallOption ) ( * RegisterUserResponse , error )
Login ( ctx context . Context , in * LoginUserRequest , opts ... grpc . CallOption ) ( * LoginUserResponse , error )
List ( ctx context . Context , in * ListUsersRequest , opts ... grpc . CallOption ) ( * ListUsersResponse , error )
Approve ( ctx context . Context , in * ApproveUserRequest , opts ... grpc . CallOption ) ( * Empty , error )
}
type userServiceClient struct {
cc grpc . ClientConnInterface
}
func NewUserServiceClient ( cc grpc . ClientConnInterface ) UserServiceClient {
return & userServiceClient { cc }
}
func ( c * userServiceClient ) Register ( ctx context . Context , in * RegisterUserRequest , opts ... grpc . CallOption ) ( * RegisterUserResponse , error ) {
out := new ( RegisterUserResponse )
err := c . cc . Invoke ( ctx , "/ezshare.UserService/Register" , in , out , opts ... )
if err != nil {
return nil , err
}
return out , nil
}
func ( c * userServiceClient ) Login ( ctx context . Context , in * LoginUserRequest , opts ... grpc . CallOption ) ( * LoginUserResponse , error ) {
out := new ( LoginUserResponse )
err := c . cc . Invoke ( ctx , "/ezshare.UserService/Login" , in , out , opts ... )
if err != nil {
return nil , err
}
return out , nil
}
func ( c * userServiceClient ) List ( ctx context . Context , in * ListUsersRequest , opts ... grpc . CallOption ) ( * ListUsersResponse , error ) {
out := new ( ListUsersResponse )
err := c . cc . Invoke ( ctx , "/ezshare.UserService/List" , in , out , opts ... )
if err != nil {
return nil , err
}
return out , nil
}
func ( c * userServiceClient ) Approve ( ctx context . Context , in * ApproveUserRequest , opts ... grpc . CallOption ) ( * Empty , error ) {
out := new ( Empty )
err := c . cc . Invoke ( ctx , "/ezshare.UserService/Approve" , in , out , opts ... )
if err != nil {
return nil , err
}
return out , nil
}
// UserServiceServer is the server API for UserService service.
// All implementations must embed UnimplementedUserServiceServer
// for forward compatibility
type UserServiceServer interface {
Register ( context . Context , * RegisterUserRequest ) ( * RegisterUserResponse , error )
Login ( context . Context , * LoginUserRequest ) ( * LoginUserResponse , error )
List ( context . Context , * ListUsersRequest ) ( * ListUsersResponse , error )
Approve ( context . Context , * ApproveUserRequest ) ( * Empty , error )
mustEmbedUnimplementedUserServiceServer ( )
}
// UnimplementedUserServiceServer must be embedded to have forward compatible implementations.
type UnimplementedUserServiceServer struct {
}
func ( UnimplementedUserServiceServer ) Register ( context . Context , * RegisterUserRequest ) ( * RegisterUserResponse , error ) {
return nil , status . Errorf ( codes . Unimplemented , "method Register not implemented" )
}
func ( UnimplementedUserServiceServer ) Login ( context . Context , * LoginUserRequest ) ( * LoginUserResponse , error ) {
return nil , status . Errorf ( codes . Unimplemented , "method Login not implemented" )
}
func ( UnimplementedUserServiceServer ) List ( context . Context , * ListUsersRequest ) ( * ListUsersResponse , error ) {
return nil , status . Errorf ( codes . Unimplemented , "method List not implemented" )
}
func ( UnimplementedUserServiceServer ) Approve ( context . Context , * ApproveUserRequest ) ( * Empty , error ) {
return nil , status . Errorf ( codes . Unimplemented , "method Approve not implemented" )
}
func ( UnimplementedUserServiceServer ) mustEmbedUnimplementedUserServiceServer ( ) { }
// UnsafeUserServiceServer may be embedded to opt out of forward compatibility for this service.
// Use of this interface is not recommended, as added methods to UserServiceServer will
// result in compilation errors.
type UnsafeUserServiceServer interface {
mustEmbedUnimplementedUserServiceServer ( )
}
func RegisterUserServiceServer ( s grpc . ServiceRegistrar , srv UserServiceServer ) {
s . RegisterService ( & UserService_ServiceDesc , srv )
}
func _UserService_Register_Handler ( srv interface { } , ctx context . Context , dec func ( interface { } ) error , interceptor grpc . UnaryServerInterceptor ) ( interface { } , error ) {
in := new ( RegisterUserRequest )
if err := dec ( in ) ; err != nil {
return nil , err
}
if interceptor == nil {
return srv . ( UserServiceServer ) . Register ( ctx , in )
}
info := & grpc . UnaryServerInfo {
Server : srv ,
FullMethod : "/ezshare.UserService/Register" ,
}
handler := func ( ctx context . Context , req interface { } ) ( interface { } , error ) {
return srv . ( UserServiceServer ) . Register ( ctx , req . ( * RegisterUserRequest ) )
}
return interceptor ( ctx , in , info , handler )
}
func _UserService_Login_Handler ( srv interface { } , ctx context . Context , dec func ( interface { } ) error , interceptor grpc . UnaryServerInterceptor ) ( interface { } , error ) {
in := new ( LoginUserRequest )
if err := dec ( in ) ; err != nil {
return nil , err
}
if interceptor == nil {
return srv . ( UserServiceServer ) . Login ( ctx , in )
}
info := & grpc . UnaryServerInfo {
Server : srv ,
FullMethod : "/ezshare.UserService/Login" ,
}
handler := func ( ctx context . Context , req interface { } ) ( interface { } , error ) {
return srv . ( UserServiceServer ) . Login ( ctx , req . ( * LoginUserRequest ) )
}
return interceptor ( ctx , in , info , handler )
}
func _UserService_List_Handler ( srv interface { } , ctx context . Context , dec func ( interface { } ) error , interceptor grpc . UnaryServerInterceptor ) ( interface { } , error ) {
in := new ( ListUsersRequest )
if err := dec ( in ) ; err != nil {
return nil , err
}
if interceptor == nil {
return srv . ( UserServiceServer ) . List ( ctx , in )
}
info := & grpc . UnaryServerInfo {
Server : srv ,
FullMethod : "/ezshare.UserService/List" ,
}
handler := func ( ctx context . Context , req interface { } ) ( interface { } , error ) {
return srv . ( UserServiceServer ) . List ( ctx , req . ( * ListUsersRequest ) )
}
return interceptor ( ctx , in , info , handler )
}
func _UserService_Approve_Handler ( srv interface { } , ctx context . Context , dec func ( interface { } ) error , interceptor grpc . UnaryServerInterceptor ) ( interface { } , error ) {
in := new ( ApproveUserRequest )
if err := dec ( in ) ; err != nil {
return nil , err
}
if interceptor == nil {
return srv . ( UserServiceServer ) . Approve ( ctx , in )
}
info := & grpc . UnaryServerInfo {
Server : srv ,
FullMethod : "/ezshare.UserService/Approve" ,
}
handler := func ( ctx context . Context , req interface { } ) ( interface { } , error ) {
return srv . ( UserServiceServer ) . Approve ( ctx , req . ( * ApproveUserRequest ) )
}
return interceptor ( ctx , in , info , handler )
}
// UserService_ServiceDesc is the grpc.ServiceDesc for UserService service.
// It's only intended for direct use with grpc.RegisterService,
// and not to be introspected or modified (even as a copy)
var UserService_ServiceDesc = grpc . ServiceDesc {
ServiceName : "ezshare.UserService" ,
HandlerType : ( * UserServiceServer ) ( nil ) ,
Methods : [ ] grpc . MethodDesc {
{
MethodName : "Register" ,
Handler : _UserService_Register_Handler ,
} ,
{
MethodName : "Login" ,
Handler : _UserService_Login_Handler ,
} ,
{
MethodName : "List" ,
Handler : _UserService_List_Handler ,
} ,
{
MethodName : "Approve" ,
Handler : _UserService_Approve_Handler ,
} ,
} ,
Streams : [ ] grpc . StreamDesc { } ,
Metadata : "protos/ezshare.proto" ,
}