Skip to content
Snippets Groups Projects

Add server-side scripting to gRPC API

Open Joscha Schmiedt requested to merge f-sss4grpc into dev
1 file
+ 13
7
Compare changes
  • Side-by-side
  • Inline
@@ -24,7 +24,7 @@ package caosdb.scripting.v1alpha1;
import "google/protobuf/timestamp.proto";
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 {
@@ -44,9 +44,11 @@ message ExecuteServerSideScriptRequest {
repeated string positional_arguments = 3;
// The named arguments for the script
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;
// 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;
// Whether the script should be executed asynchronously (not implemented yet)
bool run_async = 7;
@@ -74,11 +76,13 @@ enum ServerSideScriptExecutionResult {
SERVER_SIDE_SCRIPT_EXECUTION_RESULT_CANCELLED = 8;
// The script execution was denied due to insufficient permissions
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;
}
// 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 {
// Id of the script execution
string script_execution_id = 1;
@@ -102,12 +106,14 @@ message ExecuteServerSideScriptResponse {
google.protobuf.Timestamp start_time = 7;
// The end time of the script execution (empty if the script is still running)
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;
}
// Service for server-side scripting
service ServerSideScriptingService {
// Executes a script on the server side
rpc ExecuteServerSideScript(ExecuteServerSideScriptRequest) returns (ExecuteServerSideScriptResponse) {}
rpc ExecuteServerSideScript(ExecuteServerSideScriptRequest)
returns (ExecuteServerSideScriptResponse) {}
}
Loading