Documentation ¶
Index ¶
- Constants
- Variables
- func RegisterFileServiceServer(s grpc.ServiceRegistrar, srv FileServiceServer)
- type DownloadFileRequest
- func (*DownloadFileRequest) Descriptor() ([]byte, []int)deprecated
- func (x *DownloadFileRequest) GetFilePath() string
- func (x *DownloadFileRequest) GetUserID() string
- func (*DownloadFileRequest) ProtoMessage()
- func (x *DownloadFileRequest) ProtoReflect() protoreflect.Message
- func (x *DownloadFileRequest) Reset()
- func (x *DownloadFileRequest) String() string
- type DownloadFileResponse
- func (*DownloadFileResponse) Descriptor() ([]byte, []int)deprecated
- func (x *DownloadFileResponse) GetContent() []byte
- func (x *DownloadFileResponse) GetSuccess() bool
- func (*DownloadFileResponse) ProtoMessage()
- func (x *DownloadFileResponse) ProtoReflect() protoreflect.Message
- func (x *DownloadFileResponse) Reset()
- func (x *DownloadFileResponse) String() string
- type FileInfo
- func (*FileInfo) Descriptor() ([]byte, []int)deprecated
- func (x *FileInfo) GetLastModified() *timestamppb.Timestamp
- func (x *FileInfo) GetName() string
- func (x *FileInfo) GetSize() int64
- func (*FileInfo) ProtoMessage()
- func (x *FileInfo) ProtoReflect() protoreflect.Message
- func (x *FileInfo) Reset()
- func (x *FileInfo) String() string
- type FileServiceClient
- type FileServiceServer
- type FileService_DownloadFileClient
- type FileService_DownloadFileServer
- type FileService_UploadFileClient
- type FileService_UploadFileServer
- type ListFilesRequest
- func (*ListFilesRequest) Descriptor() ([]byte, []int)deprecated
- func (x *ListFilesRequest) GetFilePath() string
- func (x *ListFilesRequest) GetUserID() string
- func (*ListFilesRequest) ProtoMessage()
- func (x *ListFilesRequest) ProtoReflect() protoreflect.Message
- func (x *ListFilesRequest) Reset()
- func (x *ListFilesRequest) String() string
- type ListFilesResponse
- func (*ListFilesResponse) Descriptor() ([]byte, []int)deprecated
- func (x *ListFilesResponse) GetFiles() []*FileInfo
- func (*ListFilesResponse) ProtoMessage()
- func (x *ListFilesResponse) ProtoReflect() protoreflect.Message
- func (x *ListFilesResponse) Reset()
- func (x *ListFilesResponse) String() string
- type RegisterUserRequest
- func (*RegisterUserRequest) Descriptor() ([]byte, []int)deprecated
- func (x *RegisterUserRequest) GetUserID() string
- func (*RegisterUserRequest) ProtoMessage()
- func (x *RegisterUserRequest) ProtoReflect() protoreflect.Message
- func (x *RegisterUserRequest) Reset()
- func (x *RegisterUserRequest) String() string
- type RegisterUserResponse
- func (*RegisterUserResponse) Descriptor() ([]byte, []int)deprecated
- func (x *RegisterUserResponse) GetSuccess() bool
- func (*RegisterUserResponse) ProtoMessage()
- func (x *RegisterUserResponse) ProtoReflect() protoreflect.Message
- func (x *RegisterUserResponse) Reset()
- func (x *RegisterUserResponse) String() string
- type RemoveFileRequest
- func (*RemoveFileRequest) Descriptor() ([]byte, []int)deprecated
- func (x *RemoveFileRequest) GetFilePath() string
- func (x *RemoveFileRequest) GetUserID() string
- func (*RemoveFileRequest) ProtoMessage()
- func (x *RemoveFileRequest) ProtoReflect() protoreflect.Message
- func (x *RemoveFileRequest) Reset()
- func (x *RemoveFileRequest) String() string
- type RemoveFileResponse
- func (*RemoveFileResponse) Descriptor() ([]byte, []int)deprecated
- func (x *RemoveFileResponse) GetSuccess() bool
- func (*RemoveFileResponse) ProtoMessage()
- func (x *RemoveFileResponse) ProtoReflect() protoreflect.Message
- func (x *RemoveFileResponse) Reset()
- func (x *RemoveFileResponse) String() string
- type UnimplementedFileServiceServer
- func (UnimplementedFileServiceServer) DownloadFile(*DownloadFileRequest, FileService_DownloadFileServer) error
- func (UnimplementedFileServiceServer) ListFiles(context.Context, *ListFilesRequest) (*ListFilesResponse, error)
- func (UnimplementedFileServiceServer) RegisterUser(context.Context, *RegisterUserRequest) (*RegisterUserResponse, error)
- func (UnimplementedFileServiceServer) RemoveFile(context.Context, *RemoveFileRequest) (*RemoveFileResponse, error)
- func (UnimplementedFileServiceServer) UploadFile(FileService_UploadFileServer) error
- type UnsafeFileServiceServer
- type UploadFileRequest
- func (*UploadFileRequest) Descriptor() ([]byte, []int)deprecated
- func (x *UploadFileRequest) GetContent() []byte
- func (x *UploadFileRequest) GetFilePath() string
- func (x *UploadFileRequest) GetUserID() string
- func (*UploadFileRequest) ProtoMessage()
- func (x *UploadFileRequest) ProtoReflect() protoreflect.Message
- func (x *UploadFileRequest) Reset()
- func (x *UploadFileRequest) String() string
- type UploadFileResponse
- func (*UploadFileResponse) Descriptor() ([]byte, []int)deprecated
- func (x *UploadFileResponse) GetSuccess() bool
- func (*UploadFileResponse) ProtoMessage()
- func (x *UploadFileResponse) ProtoReflect() protoreflect.Message
- func (x *UploadFileResponse) Reset()
- func (x *UploadFileResponse) String() string
Constants ¶
const ( FileService_ListFiles_FullMethodName = "/service.FileService/ListFiles" FileService_RegisterUser_FullMethodName = "/service.FileService/RegisterUser" FileService_RemoveFile_FullMethodName = "/service.FileService/RemoveFile" FileService_DownloadFile_FullMethodName = "/service.FileService/DownloadFile" FileService_UploadFile_FullMethodName = "/service.FileService/UploadFile" )
Variables ¶
var FileService_ServiceDesc = grpc.ServiceDesc{ ServiceName: "service.FileService", HandlerType: (*FileServiceServer)(nil), Methods: []grpc.MethodDesc{ { MethodName: "ListFiles", Handler: _FileService_ListFiles_Handler, }, { MethodName: "RegisterUser", Handler: _FileService_RegisterUser_Handler, }, { MethodName: "RemoveFile", Handler: _FileService_RemoveFile_Handler, }, }, Streams: []grpc.StreamDesc{ { StreamName: "DownloadFile", Handler: _FileService_DownloadFile_Handler, ServerStreams: true, }, { StreamName: "UploadFile", Handler: _FileService_UploadFile_Handler, ClientStreams: true, }, }, Metadata: "files.proto", }
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 File_files_proto protoreflect.FileDescriptor
Functions ¶
func RegisterFileServiceServer ¶
func RegisterFileServiceServer(s grpc.ServiceRegistrar, srv FileServiceServer)
Types ¶
type DownloadFileRequest ¶
type DownloadFileRequest struct { UserID string `protobuf:"bytes,1,opt,name=userID,proto3" json:"userID,omitempty"` FilePath string `protobuf:"bytes,2,opt,name=filePath,proto3" json:"filePath,omitempty"` // contains filtered or unexported fields }
func (*DownloadFileRequest) Descriptor
deprecated
func (*DownloadFileRequest) Descriptor() ([]byte, []int)
Deprecated: Use DownloadFileRequest.ProtoReflect.Descriptor instead.
func (*DownloadFileRequest) GetFilePath ¶
func (x *DownloadFileRequest) GetFilePath() string
func (*DownloadFileRequest) GetUserID ¶
func (x *DownloadFileRequest) GetUserID() string
func (*DownloadFileRequest) ProtoMessage ¶
func (*DownloadFileRequest) ProtoMessage()
func (*DownloadFileRequest) ProtoReflect ¶
func (x *DownloadFileRequest) ProtoReflect() protoreflect.Message
func (*DownloadFileRequest) Reset ¶
func (x *DownloadFileRequest) Reset()
func (*DownloadFileRequest) String ¶
func (x *DownloadFileRequest) String() string
type DownloadFileResponse ¶
type DownloadFileResponse struct { Success bool `protobuf:"varint,1,opt,name=success,proto3" json:"success,omitempty"` Content []byte `protobuf:"bytes,2,opt,name=content,proto3" json:"content,omitempty"` // contains filtered or unexported fields }
func (*DownloadFileResponse) Descriptor
deprecated
func (*DownloadFileResponse) Descriptor() ([]byte, []int)
Deprecated: Use DownloadFileResponse.ProtoReflect.Descriptor instead.
func (*DownloadFileResponse) GetContent ¶
func (x *DownloadFileResponse) GetContent() []byte
func (*DownloadFileResponse) GetSuccess ¶
func (x *DownloadFileResponse) GetSuccess() bool
func (*DownloadFileResponse) ProtoMessage ¶
func (*DownloadFileResponse) ProtoMessage()
func (*DownloadFileResponse) ProtoReflect ¶
func (x *DownloadFileResponse) ProtoReflect() protoreflect.Message
func (*DownloadFileResponse) Reset ¶
func (x *DownloadFileResponse) Reset()
func (*DownloadFileResponse) String ¶
func (x *DownloadFileResponse) String() string
type FileInfo ¶
type FileInfo struct { Name string `protobuf:"bytes,1,opt,name=name,proto3" json:"name,omitempty"` Size int64 `protobuf:"varint,2,opt,name=size,proto3" json:"size,omitempty"` LastModified *timestamppb.Timestamp `protobuf:"bytes,3,opt,name=lastModified,proto3" json:"lastModified,omitempty"` // contains filtered or unexported fields }
func (*FileInfo) Descriptor
deprecated
func (*FileInfo) GetLastModified ¶
func (x *FileInfo) GetLastModified() *timestamppb.Timestamp
func (*FileInfo) ProtoMessage ¶
func (*FileInfo) ProtoMessage()
func (*FileInfo) ProtoReflect ¶
func (x *FileInfo) ProtoReflect() protoreflect.Message
type FileServiceClient ¶
type FileServiceClient interface { ListFiles(ctx context.Context, in *ListFilesRequest, opts ...grpc.CallOption) (*ListFilesResponse, error) RegisterUser(ctx context.Context, in *RegisterUserRequest, opts ...grpc.CallOption) (*RegisterUserResponse, error) RemoveFile(ctx context.Context, in *RemoveFileRequest, opts ...grpc.CallOption) (*RemoveFileResponse, error) DownloadFile(ctx context.Context, in *DownloadFileRequest, opts ...grpc.CallOption) (FileService_DownloadFileClient, error) UploadFile(ctx context.Context, opts ...grpc.CallOption) (FileService_UploadFileClient, error) }
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.
func NewFileServiceClient ¶
func NewFileServiceClient(cc grpc.ClientConnInterface) FileServiceClient
type FileServiceServer ¶
type FileServiceServer interface { ListFiles(context.Context, *ListFilesRequest) (*ListFilesResponse, error) RegisterUser(context.Context, *RegisterUserRequest) (*RegisterUserResponse, error) RemoveFile(context.Context, *RemoveFileRequest) (*RemoveFileResponse, error) DownloadFile(*DownloadFileRequest, FileService_DownloadFileServer) error UploadFile(FileService_UploadFileServer) error // contains filtered or unexported methods }
FileServiceServer is the server API for FileService service. All implementations must embed UnimplementedFileServiceServer for forward compatibility
type FileService_DownloadFileClient ¶
type FileService_DownloadFileClient interface { Recv() (*DownloadFileResponse, error) grpc.ClientStream }
type FileService_DownloadFileServer ¶
type FileService_DownloadFileServer interface { Send(*DownloadFileResponse) error grpc.ServerStream }
type FileService_UploadFileClient ¶
type FileService_UploadFileClient interface { Send(*UploadFileRequest) error CloseAndRecv() (*UploadFileResponse, error) grpc.ClientStream }
type FileService_UploadFileServer ¶
type FileService_UploadFileServer interface { SendAndClose(*UploadFileResponse) error Recv() (*UploadFileRequest, error) grpc.ServerStream }
type ListFilesRequest ¶
type ListFilesRequest struct { UserID string `protobuf:"bytes,1,opt,name=userID,proto3" json:"userID,omitempty"` FilePath string `protobuf:"bytes,2,opt,name=filePath,proto3" json:"filePath,omitempty"` // contains filtered or unexported fields }
func (*ListFilesRequest) Descriptor
deprecated
func (*ListFilesRequest) Descriptor() ([]byte, []int)
Deprecated: Use ListFilesRequest.ProtoReflect.Descriptor instead.
func (*ListFilesRequest) GetFilePath ¶
func (x *ListFilesRequest) GetFilePath() string
func (*ListFilesRequest) GetUserID ¶
func (x *ListFilesRequest) GetUserID() string
func (*ListFilesRequest) ProtoMessage ¶
func (*ListFilesRequest) ProtoMessage()
func (*ListFilesRequest) ProtoReflect ¶
func (x *ListFilesRequest) ProtoReflect() protoreflect.Message
func (*ListFilesRequest) Reset ¶
func (x *ListFilesRequest) Reset()
func (*ListFilesRequest) String ¶
func (x *ListFilesRequest) String() string
type ListFilesResponse ¶
type ListFilesResponse struct { Files []*FileInfo `protobuf:"bytes,1,rep,name=files,proto3" json:"files,omitempty"` // contains filtered or unexported fields }
func (*ListFilesResponse) Descriptor
deprecated
func (*ListFilesResponse) Descriptor() ([]byte, []int)
Deprecated: Use ListFilesResponse.ProtoReflect.Descriptor instead.
func (*ListFilesResponse) GetFiles ¶
func (x *ListFilesResponse) GetFiles() []*FileInfo
func (*ListFilesResponse) ProtoMessage ¶
func (*ListFilesResponse) ProtoMessage()
func (*ListFilesResponse) ProtoReflect ¶
func (x *ListFilesResponse) ProtoReflect() protoreflect.Message
func (*ListFilesResponse) Reset ¶
func (x *ListFilesResponse) Reset()
func (*ListFilesResponse) String ¶
func (x *ListFilesResponse) String() string
type RegisterUserRequest ¶
type RegisterUserRequest struct { UserID string `protobuf:"bytes,1,opt,name=userID,proto3" json:"userID,omitempty"` // contains filtered or unexported fields }
func (*RegisterUserRequest) Descriptor
deprecated
func (*RegisterUserRequest) Descriptor() ([]byte, []int)
Deprecated: Use RegisterUserRequest.ProtoReflect.Descriptor instead.
func (*RegisterUserRequest) GetUserID ¶
func (x *RegisterUserRequest) GetUserID() string
func (*RegisterUserRequest) ProtoMessage ¶
func (*RegisterUserRequest) ProtoMessage()
func (*RegisterUserRequest) ProtoReflect ¶
func (x *RegisterUserRequest) ProtoReflect() protoreflect.Message
func (*RegisterUserRequest) Reset ¶
func (x *RegisterUserRequest) Reset()
func (*RegisterUserRequest) String ¶
func (x *RegisterUserRequest) String() string
type RegisterUserResponse ¶
type RegisterUserResponse struct { Success bool `protobuf:"varint,1,opt,name=success,proto3" json:"success,omitempty"` // contains filtered or unexported fields }
func (*RegisterUserResponse) Descriptor
deprecated
func (*RegisterUserResponse) Descriptor() ([]byte, []int)
Deprecated: Use RegisterUserResponse.ProtoReflect.Descriptor instead.
func (*RegisterUserResponse) GetSuccess ¶
func (x *RegisterUserResponse) GetSuccess() bool
func (*RegisterUserResponse) ProtoMessage ¶
func (*RegisterUserResponse) ProtoMessage()
func (*RegisterUserResponse) ProtoReflect ¶
func (x *RegisterUserResponse) ProtoReflect() protoreflect.Message
func (*RegisterUserResponse) Reset ¶
func (x *RegisterUserResponse) Reset()
func (*RegisterUserResponse) String ¶
func (x *RegisterUserResponse) String() string
type RemoveFileRequest ¶
type RemoveFileRequest struct { UserID string `protobuf:"bytes,1,opt,name=userID,proto3" json:"userID,omitempty"` FilePath string `protobuf:"bytes,2,opt,name=filePath,proto3" json:"filePath,omitempty"` // contains filtered or unexported fields }
func (*RemoveFileRequest) Descriptor
deprecated
func (*RemoveFileRequest) Descriptor() ([]byte, []int)
Deprecated: Use RemoveFileRequest.ProtoReflect.Descriptor instead.
func (*RemoveFileRequest) GetFilePath ¶
func (x *RemoveFileRequest) GetFilePath() string
func (*RemoveFileRequest) GetUserID ¶
func (x *RemoveFileRequest) GetUserID() string
func (*RemoveFileRequest) ProtoMessage ¶
func (*RemoveFileRequest) ProtoMessage()
func (*RemoveFileRequest) ProtoReflect ¶
func (x *RemoveFileRequest) ProtoReflect() protoreflect.Message
func (*RemoveFileRequest) Reset ¶
func (x *RemoveFileRequest) Reset()
func (*RemoveFileRequest) String ¶
func (x *RemoveFileRequest) String() string
type RemoveFileResponse ¶
type RemoveFileResponse struct { Success bool `protobuf:"varint,1,opt,name=success,proto3" json:"success,omitempty"` // contains filtered or unexported fields }
func (*RemoveFileResponse) Descriptor
deprecated
func (*RemoveFileResponse) Descriptor() ([]byte, []int)
Deprecated: Use RemoveFileResponse.ProtoReflect.Descriptor instead.
func (*RemoveFileResponse) GetSuccess ¶
func (x *RemoveFileResponse) GetSuccess() bool
func (*RemoveFileResponse) ProtoMessage ¶
func (*RemoveFileResponse) ProtoMessage()
func (*RemoveFileResponse) ProtoReflect ¶
func (x *RemoveFileResponse) ProtoReflect() protoreflect.Message
func (*RemoveFileResponse) Reset ¶
func (x *RemoveFileResponse) Reset()
func (*RemoveFileResponse) String ¶
func (x *RemoveFileResponse) String() string
type UnimplementedFileServiceServer ¶
type UnimplementedFileServiceServer struct { }
UnimplementedFileServiceServer must be embedded to have forward compatible implementations.
func (UnimplementedFileServiceServer) DownloadFile ¶
func (UnimplementedFileServiceServer) DownloadFile(*DownloadFileRequest, FileService_DownloadFileServer) error
func (UnimplementedFileServiceServer) ListFiles ¶
func (UnimplementedFileServiceServer) ListFiles(context.Context, *ListFilesRequest) (*ListFilesResponse, error)
func (UnimplementedFileServiceServer) RegisterUser ¶
func (UnimplementedFileServiceServer) RegisterUser(context.Context, *RegisterUserRequest) (*RegisterUserResponse, error)
func (UnimplementedFileServiceServer) RemoveFile ¶
func (UnimplementedFileServiceServer) RemoveFile(context.Context, *RemoveFileRequest) (*RemoveFileResponse, error)
func (UnimplementedFileServiceServer) UploadFile ¶
func (UnimplementedFileServiceServer) UploadFile(FileService_UploadFileServer) error
type UnsafeFileServiceServer ¶
type UnsafeFileServiceServer interface {
// contains filtered or unexported methods
}
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 UploadFileRequest ¶
type UploadFileRequest struct { UserID string `protobuf:"bytes,1,opt,name=userID,proto3" json:"userID,omitempty"` FilePath string `protobuf:"bytes,2,opt,name=filePath,proto3" json:"filePath,omitempty"` Content []byte `protobuf:"bytes,3,opt,name=content,proto3" json:"content,omitempty"` // contains filtered or unexported fields }
func (*UploadFileRequest) Descriptor
deprecated
func (*UploadFileRequest) Descriptor() ([]byte, []int)
Deprecated: Use UploadFileRequest.ProtoReflect.Descriptor instead.
func (*UploadFileRequest) GetContent ¶
func (x *UploadFileRequest) GetContent() []byte
func (*UploadFileRequest) GetFilePath ¶
func (x *UploadFileRequest) GetFilePath() string
func (*UploadFileRequest) GetUserID ¶
func (x *UploadFileRequest) GetUserID() string
func (*UploadFileRequest) ProtoMessage ¶
func (*UploadFileRequest) ProtoMessage()
func (*UploadFileRequest) ProtoReflect ¶
func (x *UploadFileRequest) ProtoReflect() protoreflect.Message
func (*UploadFileRequest) Reset ¶
func (x *UploadFileRequest) Reset()
func (*UploadFileRequest) String ¶
func (x *UploadFileRequest) String() string
type UploadFileResponse ¶
type UploadFileResponse struct { Success bool `protobuf:"varint,1,opt,name=success,proto3" json:"success,omitempty"` // contains filtered or unexported fields }
func (*UploadFileResponse) Descriptor
deprecated
func (*UploadFileResponse) Descriptor() ([]byte, []int)
Deprecated: Use UploadFileResponse.ProtoReflect.Descriptor instead.
func (*UploadFileResponse) GetSuccess ¶
func (x *UploadFileResponse) GetSuccess() bool
func (*UploadFileResponse) ProtoMessage ¶
func (*UploadFileResponse) ProtoMessage()
func (*UploadFileResponse) ProtoReflect ¶
func (x *UploadFileResponse) ProtoReflect() protoreflect.Message
func (*UploadFileResponse) Reset ¶
func (x *UploadFileResponse) Reset()
func (*UploadFileResponse) String ¶
func (x *UploadFileResponse) String() string