2024-10-04 04:36:49 +00:00
|
|
|
syntax = "proto3";
|
|
|
|
|
|
|
|
package proto;
|
|
|
|
|
|
|
|
option go_package = "git.servflow.io/servflow/definitions/proto";
|
|
|
|
|
|
|
|
service WorkflowService {
|
2024-10-05 03:58:51 +00:00
|
|
|
rpc GetAllWorkflowConfigs(GetAllWorkflowConfigsRequest) returns (GetAllWorkflowConfigsResponse) {}
|
2024-10-04 11:25:01 +00:00
|
|
|
rpc GetAllDatabases(GetAllDatabasesRequest) returns (GetAllDatabasesResponse) {}
|
2024-10-04 04:36:49 +00:00
|
|
|
}
|
|
|
|
|
2024-10-04 11:25:01 +00:00
|
|
|
message GetAllDatabasesRequest{}
|
|
|
|
|
|
|
|
message GetAllDatabasesResponse{
|
|
|
|
repeated DatabaseConfig databases = 1;
|
|
|
|
}
|
2024-10-04 04:36:49 +00:00
|
|
|
message GetAllWorkflowConfigsRequest {}
|
|
|
|
|
2024-10-05 03:58:51 +00:00
|
|
|
message GetAllWorkflowConfigsResponse {
|
2024-10-04 04:36:49 +00:00
|
|
|
repeated WorkflowConfig configs = 1;
|
|
|
|
}
|
|
|
|
|
|
|
|
message WorkflowConfig {
|
|
|
|
string id = 1;
|
|
|
|
string listen_path = 2;
|
|
|
|
string method = 3;
|
|
|
|
Request request = 4;
|
|
|
|
map<string, Action> actions = 5;
|
|
|
|
map<string, Conditional> conditionals = 6;
|
|
|
|
map<string, Response> responses = 7;
|
|
|
|
}
|
|
|
|
|
|
|
|
message Request {
|
|
|
|
string next = 1;
|
|
|
|
}
|
|
|
|
|
|
|
|
message Action {
|
|
|
|
string type = 1;
|
2024-10-05 03:58:51 +00:00
|
|
|
string byte = 2;
|
2024-10-04 04:36:49 +00:00
|
|
|
string next = 3;
|
|
|
|
}
|
|
|
|
|
|
|
|
message Conditional {
|
|
|
|
string expression = 1;
|
|
|
|
string valid_path = 2;
|
|
|
|
string invalid_path = 3;
|
|
|
|
}
|
|
|
|
|
|
|
|
message Response {
|
|
|
|
string template = 1;
|
|
|
|
string type = 2;
|
|
|
|
int32 code = 3;
|
|
|
|
}
|
2024-10-04 11:25:01 +00:00
|
|
|
|
|
|
|
message DatabaseConfig {
|
|
|
|
string id = 1;
|
2024-10-05 03:58:51 +00:00
|
|
|
string byte = 2;
|
2024-10-04 11:25:01 +00:00
|
|
|
string type = 3;
|
|
|
|
}
|