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

STYLE(scripting): auto-format

parent 2b762a4a
Branches
Tags
1 merge request!13Add server-side scripting to gRPC API
Pipeline #62023 passed
...@@ -24,7 +24,7 @@ package caosdb.scripting.v1alpha1; ...@@ -24,7 +24,7 @@ package caosdb.scripting.v1alpha1;
import "google/protobuf/timestamp.proto"; 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 // A named argument for a script
message NamedArgument { message NamedArgument {
...@@ -44,9 +44,11 @@ message ExecuteServerSideScriptRequest { ...@@ -44,9 +44,11 @@ message ExecuteServerSideScriptRequest {
repeated string positional_arguments = 3; repeated string positional_arguments = 3;
// The named arguments for the script // The named arguments for the script
repeated NamedArgument named_arguments = 4; repeated NamedArgument named_arguments = 4;
// The files to be used by the script (will be uploaded to the server, not implemented yet) // The files to be used by the script (will be uploaded to the server, not
// implemented yet)
repeated string script_files = 5; repeated string script_files = 5;
// The authentication token for the script execution. Will be generated by server if empty. // The authentication token for the script execution. Will be generated by
// the server if empty.
string auth_token = 6; string auth_token = 6;
// Whether the script should be executed asynchronously (not implemented yet) // Whether the script should be executed asynchronously (not implemented yet)
bool run_async = 7; bool run_async = 7;
...@@ -74,11 +76,13 @@ enum ServerSideScriptExecutionResult { ...@@ -74,11 +76,13 @@ enum ServerSideScriptExecutionResult {
SERVER_SIDE_SCRIPT_EXECUTION_RESULT_CANCELLED = 8; SERVER_SIDE_SCRIPT_EXECUTION_RESULT_CANCELLED = 8;
// The script execution was denied due to insufficient permissions // The script execution was denied due to insufficient permissions
SERVER_SIDE_SCRIPT_EXECUTION_RESULT_PERMISSION_DENIED = 9; SERVER_SIDE_SCRIPT_EXECUTION_RESULT_PERMISSION_DENIED = 9;
// The script is running and the result is not yet available (only for async scripts) // The script is running and the result is not yet available (only for
// async scripts)
SERVER_SIDE_SCRIPT_EXECUTION_RESULT_RUNNING = 10; SERVER_SIDE_SCRIPT_EXECUTION_RESULT_RUNNING = 10;
} }
// Id of a script execution. This is reserved for later releases to track and manage script executions. // 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;
...@@ -102,12 +106,14 @@ message ExecuteServerSideScriptResponse { ...@@ -102,12 +106,14 @@ message ExecuteServerSideScriptResponse {
google.protobuf.Timestamp start_time = 7; google.protobuf.Timestamp start_time = 7;
// The end time of the script execution (empty if the script is still running) // The end time of the script execution (empty if the script is still running)
google.protobuf.Timestamp end_time = 8; google.protobuf.Timestamp end_time = 8;
// The duration of the script execution in milliseconds (zero if the script is still running) // The duration of the script execution in milliseconds (zero if the script
// is still running)
int64 duration_ms = 9; int64 duration_ms = 9;
} }
// Service for server-side scripting // 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.
Please register or to comment