Skip to content
Snippets Groups Projects
Commit 2b762a4a authored by Joscha Schmiedt's avatar Joscha Schmiedt
Browse files

Add comments to scripting.proto file

parent cb3eaa6b
No related branches found
No related tags found
1 merge request!13Add server-side scripting to gRPC API
Pipeline #62022 passed with warnings
This commit is part of merge request !13. Comments created here will be created in the context of that merge request.
...@@ -26,6 +26,7 @@ import "google/protobuf/timestamp.proto"; ...@@ -26,6 +26,7 @@ import "google/protobuf/timestamp.proto";
option java_multiple_files = true; option java_multiple_files = true;
option java_package = "org.caosdb.api.scripting.v1alpha1"; option java_package = "org.caosdb.api.scripting.v1alpha1";
// A named argument for a script
message NamedArgument { message NamedArgument {
// The name of the argument // The name of the argument
string name = 1; string name = 1;
...@@ -33,6 +34,7 @@ message NamedArgument { ...@@ -33,6 +34,7 @@ message NamedArgument {
string value = 2; string value = 2;
} }
// Request to execute a script on the server side
message ExecuteServerSideScriptRequest { message ExecuteServerSideScriptRequest {
// The script to execute // The script to execute
string script_filename = 1; string script_filename = 1;
...@@ -50,6 +52,7 @@ message ExecuteServerSideScriptRequest { ...@@ -50,6 +52,7 @@ message ExecuteServerSideScriptRequest {
bool run_async = 7; bool run_async = 7;
} }
// The result of a script execution
enum ServerSideScriptExecutionResult { enum ServerSideScriptExecutionResult {
// The result of the script execution is unspecified // The result of the script execution is unspecified
SERVER_SIDE_SCRIPT_EXECUTION_RESULT_UNSPECIFIED = 0; SERVER_SIDE_SCRIPT_EXECUTION_RESULT_UNSPECIFIED = 0;
...@@ -75,12 +78,13 @@ enum ServerSideScriptExecutionResult { ...@@ -75,12 +78,13 @@ enum ServerSideScriptExecutionResult {
SERVER_SIDE_SCRIPT_EXECUTION_RESULT_RUNNING = 10; SERVER_SIDE_SCRIPT_EXECUTION_RESULT_RUNNING = 10;
} }
// IDEA: Give the script execution an id to be able to track it // Id of a script execution. This is reserved for later releases to track and manage script executions.
message ServerSideScriptExecutionId { message ServerSideScriptExecutionId {
// Id of the script execution // Id of the script execution
string script_execution_id = 1; string script_execution_id = 1;
} }
// Response to a script execution request
message ExecuteServerSideScriptResponse { message ExecuteServerSideScriptResponse {
// Id of the script execution // Id of the script execution
ServerSideScriptExecutionId script_execution_id = 1; ServerSideScriptExecutionId script_execution_id = 1;
...@@ -102,6 +106,7 @@ message ExecuteServerSideScriptResponse { ...@@ -102,6 +106,7 @@ message ExecuteServerSideScriptResponse {
int64 duration_ms = 9; int64 duration_ms = 9;
} }
// Service for server-side scripting
service ServerSideScriptingService { service ServerSideScriptingService {
// Executes a script on the server side // Executes a script on the server side
rpc ExecuteServerSideScript(ExecuteServerSideScriptRequest) returns (ExecuteServerSideScriptResponse) {} rpc ExecuteServerSideScript(ExecuteServerSideScriptRequest) returns (ExecuteServerSideScriptResponse) {}
......
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