Skip to content
GitLab
Explore
Sign in
Register
Primary navigation
Search or go to…
Project
C
caosdb-proto
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Iterations
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Locked files
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Package registry
Container registry
Model registry
Operate
Environments
Terraform modules
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Code review analytics
Issue analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
caosdb
Software
caosdb-proto
Commits
24d71fdd
Commit
24d71fdd
authored
3 years ago
by
Timm Fitschen
Committed by
Henrik tom Wörden
3 years ago
Browse files
Options
Downloads
Patches
Plain Diff
WIP: file upload/download
parent
9f91df07
No related branches found
No related tags found
No related merge requests found
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
proto/caosdb/entity/v1alpha1/main.proto
+13
-42
13 additions, 42 deletions
proto/caosdb/entity/v1alpha1/main.proto
with
13 additions
and
42 deletions
proto/caosdb/entity/v1alpha1/main.proto
+
13
−
42
View file @
24d71fdd
...
...
@@ -565,10 +565,8 @@ enum TransmissionStatus {
TRANSMISSION_STATUS_GO_ON
=
3
;
}
// Register a file upload
indicating the total size if possible
.
// Register a file upload.
message
RegisterFileUploadRequest
{
// Estimated total size of the upload.
int64
total_size
=
1
;
}
// Response of the file server upon an upload registration request.
...
...
@@ -577,8 +575,6 @@ message RegisterFileUploadResponse {
RegistrationStatus
status
=
1
;
// The registration id is used to identify chunks and files which belong to the same upload .
string
registration_id
=
2
;
// The server's maximum number of parallel uploads. Requesting more uploads has undefined behavior.
int32
max_parallel_transmissions
=
3
;
// The server's maximum chunk size. Submitting bigger chunks has undefined behavior.
int64
max_chunk_size
=
4
;
// The server's maximum file size. Submitting bigger files has undefined behavior.
...
...
@@ -615,13 +611,16 @@ message FileDownloadHeader {
FileIdentifier
id
=
1
;
// The file descriptor of the file.
FileDescriptor
file_descriptor
=
2
;
// This is the transmission id which can be used to download the actual blob
// in the FileDownloadRequest.
FileTransmissionId
file_transmission_id
=
3
;
// Errors for this file (e.g. MESSAGE_CODE_ENTITY_DOES_NOT_EXIST, or
// MESSAGE_CODE_FILE_NOT_FOUND).
repeated
Message
errors
=
3
;
repeated
Message
errors
=
4
;
// Warnings for this file.
repeated
Message
warnings
=
4
;
repeated
Message
warnings
=
5
;
// Info messages for this file.
repeated
Message
infos
=
5
;
repeated
Message
infos
=
6
;
}
...
...
@@ -632,31 +631,18 @@ message RegisterFileDownloadResponse {
// The registration id is used to identify chunks and files which belong to
// the same upload .
string
registration_id
=
2
;
// The server's maximum number of parallel downloads. Starting more parallel
// uploads has undefined behavior.
int32
max_parallel_transmissions
=
3
;
// The estimated total size of the downloaded files.
int64
total_size
=
4
;
// Metadata of the files which are to be downloaded.
repeated
FileDownloadHeader
files
=
4
;
}
// Stores a single chunk of a file
message
FileChunk
{
// Chunk metadata.
FileChunkMetadata
metadata
=
1
;
// Chunk id.
FileChunkId
id
=
2
;
// Temporary identifier containing the file and registration_id.
FileTransmissionId
file_transmission_id
=
1
;
// Binary data of a chunk.
bytes
data
=
5
;
}
// Identifies a chunk in a file transmission.
message
FileChunkId
{
// Temporary identifier containing the file and registration_id.
FileTransmissionId
file_transmission_id
=
1
;
// The number of this chunk. Chunks do not have to be uploaded in the correct
// sequence. This chunk number is used to define the order of the chunks.
int32
chunk_no
=
3
;
}
// Temporary identifier of a single file during a transmission.
message
FileTransmissionId
{
...
...
@@ -668,11 +654,6 @@ message FileTransmissionId {
string
file_id
=
2
;
}
// Chunk metadata.
message
FileChunkMetadata
{
// The size of this chunk
int64
chunk_size
=
4
;
}
// Request for a file upload which has been registered previously. Chunks may be send in any order.
message
FileUploadRequest
{
...
...
@@ -688,16 +669,8 @@ message FileUploadResponse {
// Request for a file download which has been registered previously.
message
FileDownloadRequest
{
// Download a chunk by identifying the chunk explicitely or by letting the
// server decide which chunk is to be send.
oneof
request
{
// The registration id which has previously been issued by the server. This
// request means: Send any chunk
string
registration_id
=
1
;
// An id of a chunk. The client can guess a chunk id or use one from a
// previous download request's next field.
FileChunkId
chunk_id
=
2
;
}
// Request the next chunk for this file.
FileTransmissionId
file_transmission_id
=
1
;
}
// Response containing a chunk of a file.
...
...
@@ -706,8 +679,6 @@ message FileDownloadResponse {
TransmissionStatus
status
=
1
;
// A single file chunk
FileChunk
chunk
=
2
;
// The next chunk (if any)
FileChunkId
next
=
3
;
}
// File Transaction Service
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment