Skip to content
Snippets Groups Projects
Commit c65d1777 authored by Timm Fitschen's avatar Timm Fitschen Committed by Henrik tom Wörden
Browse files

STY: formatting

parent 24d71fdd
No related branches found
No related tags found
No related merge requests found
...@@ -345,7 +345,8 @@ message Entity { ...@@ -345,7 +345,8 @@ message Entity {
// relation to other entities or the server's state or configuration. // relation to other entities or the server's state or configuration.
repeated Message infos = 13; repeated Message infos = 13;
// File meta data. The actual binary data has to uploaded or downloaded using the File message. // File meta data. The actual binary data has to uploaded or downloaded using
// the File message.
FileDescriptor file_descriptor = 14; FileDescriptor file_descriptor = 14;
} }
...@@ -561,23 +562,26 @@ enum TransmissionStatus { ...@@ -561,23 +562,26 @@ enum TransmissionStatus {
TRANSMISSION_STATUS_SUCCESS = 1; TRANSMISSION_STATUS_SUCCESS = 1;
// The transmission terminated with errors. // The transmission terminated with errors.
TRANSMISSION_STATUS_ERROR = 2; TRANSMISSION_STATUS_ERROR = 2;
// The transmission is incomplete and the client may send/request the next chunk. // The transmission is incomplete and the client may send/request the next
// chunk.
TRANSMISSION_STATUS_GO_ON = 3; TRANSMISSION_STATUS_GO_ON = 3;
} }
// Register a file upload. // Register a file upload.
message RegisterFileUploadRequest { message RegisterFileUploadRequest {}
}
// Response of the file server upon an upload registration request. // Response of the file server upon an upload registration request.
message RegisterFileUploadResponse { message RegisterFileUploadResponse {
// Whether the server accepted or rejected the registration. // Whether the server accepted or rejected the registration.
RegistrationStatus status = 1; RegistrationStatus status = 1;
// The registration id is used to identify chunks and files which belong to the same upload . // The registration id is used to identify chunks and files which belong to
// the same upload .
string registration_id = 2; string registration_id = 2;
// The server's maximum chunk size. Submitting bigger chunks has undefined behavior. // The server's maximum chunk size. Submitting bigger chunks has undefined
// behavior.
int64 max_chunk_size = 4; int64 max_chunk_size = 4;
// The server's maximum file size. Submitting bigger files has undefined behavior. // The server's maximum file size. Submitting bigger files has undefined
// behavior.
int64 max_file_size = 5; int64 max_file_size = 5;
} }
...@@ -595,7 +599,8 @@ message RegisterFileDownloadRequest { ...@@ -595,7 +599,8 @@ message RegisterFileDownloadRequest {
// Identifies a file which is to be downloaded. // Identifies a file which is to be downloaded.
message FileIdentifier { message FileIdentifier {
// Wraps several identifiers in order to have them as a repeatable field in other messages. // Wraps several identifiers in order to have them as a repeatable field in
// other messages.
oneof wrapped_identifier { oneof wrapped_identifier {
// An entity id. // An entity id.
string entity_id = 1; string entity_id = 1;
...@@ -623,7 +628,6 @@ message FileDownloadHeader { ...@@ -623,7 +628,6 @@ message FileDownloadHeader {
repeated Message infos = 6; repeated Message infos = 6;
} }
// Response to a download registration request. // Response to a download registration request.
message RegisterFileDownloadResponse { message RegisterFileDownloadResponse {
// Whether the server accepted or rejected the registration. // Whether the server accepted or rejected the registration.
...@@ -643,7 +647,6 @@ message FileChunk { ...@@ -643,7 +647,6 @@ message FileChunk {
bytes data = 5; bytes data = 5;
} }
// Temporary identifier of a single file during a transmission. // Temporary identifier of a single file during a transmission.
message FileTransmissionId { message FileTransmissionId {
// The registration id which has been issued by the target of the trans // The registration id which has been issued by the target of the trans
...@@ -654,8 +657,8 @@ message FileTransmissionId { ...@@ -654,8 +657,8 @@ message FileTransmissionId {
string file_id = 2; string file_id = 2;
} }
// Request for a file upload which has been registered previously. Chunks may be
// Request for a file upload which has been registered previously. Chunks may be send in any order. // send in any order.
message FileUploadRequest { message FileUploadRequest {
// A single file chunk // A single file chunk
FileChunk chunk = 1; FileChunk chunk = 1;
...@@ -685,12 +688,14 @@ message FileDownloadResponse { ...@@ -685,12 +688,14 @@ message FileDownloadResponse {
service FileTransmissionService { service FileTransmissionService {
// Register a file upload. This needs to be done prior to the actual upload // Register a file upload. This needs to be done prior to the actual upload
// and prior to the transaction request which uses the uploaded files. // and prior to the transaction request which uses the uploaded files.
rpc RegisterFileUpload(RegisterFileUploadRequest) returns (RegisterFileUploadResponse); rpc RegisterFileUpload(RegisterFileUploadRequest)
returns (RegisterFileUploadResponse);
// The actual file upload. The upload has to be registered prior to this rpc. // The actual file upload. The upload has to be registered prior to this rpc.
rpc FileUpload(FileUploadRequest) returns (FileUploadResponse); rpc FileUpload(FileUploadRequest) returns (FileUploadResponse);
// Register a file download. This needs to be done prior to the actual download. // Register a file download. This needs to be done prior to the actual
rpc RegisterFileDownload(RegisterFileDownloadRequest) returns (RegisterFileDownloadResponse); // download.
rpc RegisterFileDownload(RegisterFileDownloadRequest)
returns (RegisterFileDownloadResponse);
// The actual download. The download has to be registered prior this rpc. // The actual download. The download has to be registered prior this rpc.
rpc FileDownload(FileDownloadRequest) returns (FileDownloadResponse); rpc FileDownload(FileDownloadRequest) returns (FileDownloadResponse);
} }
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment