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

Add ServerSide to names of scripting API

To clarify that the ServerSide API is only available on the server side, we should add "ServerSide" to the names of the scripting API. This will make it clear that the API is not available on the client side.
parent 7e9019f5
Branches
Tags
1 merge request!13Add server-side scripting to gRPC API
...@@ -33,7 +33,7 @@ message NamedArgument { ...@@ -33,7 +33,7 @@ message NamedArgument {
string value = 2; string value = 2;
} }
message ExecuteScriptRequest { message ExecuteServerSideScriptRequest {
// The script to execute // The script to execute
string script_filename = 1; string script_filename = 1;
// The timeout for the script execution in milliseconds // The timeout for the script execution in milliseconds
...@@ -50,44 +50,44 @@ message ExecuteScriptRequest { ...@@ -50,44 +50,44 @@ message ExecuteScriptRequest {
bool run_async = 7; bool run_async = 7;
} }
enum ScriptExecutionResult { enum ServerSideScriptExecutionResult {
// The result of the script execution is unspecified // The result of the script execution is unspecified
SCRIPT_EXECUTION_RESULT_UNSPECIFIED = 0; SERVER_SIDE_SCRIPT_EXECUTION_RESULT_UNSPECIFIED = 0;
// The script execution was successful // The script execution was successful
SCRIPT_EXECUTION_RESULT_SUCCESS = 1; SERVER_SIDE_SCRIPT_EXECUTION_RESULT_SUCCESS = 1;
// The script execution failed (general/unspecified failure) // The script execution failed (general/unspecified failure)
SCRIPT_EXECUTION_RESULT_GENERAL_FAILURE = 2; SERVER_SIDE_SCRIPT_EXECUTION_RESULT_GENERAL_FAILURE = 2;
// The script does not exist // The script does not exist
SCRIPT_EXECUTION_RESULT_SCRIPT_DOES_NOT_EXIST = 3; SERVER_SIDE_SCRIPT_EXECUTION_RESULT_SCRIPT_DOES_NOT_EXIST = 3;
// The script is not executable // The script is not executable
SCRIPT_EXECUTION_RESULT_SCRIPT_NOT_EXECUTABLE = 4; SERVER_SIDE_SCRIPT_EXECUTION_RESULT_SCRIPT_NOT_EXECUTABLE = 4;
// The script execution failed due to a script error // The script execution failed due to a script error
SCRIPT_EXECUTION_RESULT_SCRIPT_ERROR = 5; SERVER_SIDE_SCRIPT_EXECUTION_RESULT_SCRIPT_ERROR = 5;
// The script execution failed during setup, e.g. due to configuration errors // The script execution failed during setup, e.g. due to configuration errors
SCRIPT_EXECUTION_RESULT_SCRIPT_SETUP_ERROR = 6; SERVER_SIDE_SCRIPT_EXECUTION_RESULT_SCRIPT_SETUP_ERROR = 6;
// The script execution timed out // The script execution timed out
SCRIPT_EXECUTION_RESULT_SCRIPT_TIMEOUT = 7; SERVER_SIDE_SCRIPT_EXECUTION_RESULT_SCRIPT_TIMEOUT = 7;
// The script execution was cancelled for another reason // The script execution was cancelled for another reason
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
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)
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 // IDEA: Give the script execution an id to be able to track it
message ScriptExecutionId { message ServerSideScriptExecutionId {
// Id of the script execution // Id of the script execution
string script_execution_id = 1; string script_execution_id = 1;
} }
message ExecuteScriptResponse { message ExecuteServerSideScriptResponse {
// Id of the script execution // Id of the script execution
ScriptExecutionId script_execution_id = 1; ServerSideScriptExecutionId script_execution_id = 1;
// The script to execute // The script to execute
string script_filename = 2; string script_filename = 2;
// The result of the script execution // The result of the script execution
ScriptExecutionResult result = 3; ServerSideScriptExecutionResult result = 3;
// Script return code // Script return code
int32 return_code = 4; int32 return_code = 4;
// The standard output of the script // The standard output of the script
...@@ -104,5 +104,5 @@ message ExecuteScriptResponse { ...@@ -104,5 +104,5 @@ message ExecuteScriptResponse {
service ServerSideScriptingService { service ServerSideScriptingService {
// Executes a script on the server side // Executes a script on the server side
rpc ExecuteScript(ExecuteScriptRequest) returns (ExecuteScriptResponse) {} 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