64 lines
1.2 KiB
Protocol Buffer
64 lines
1.2 KiB
Protocol Buffer
syntax = "proto3";
|
|
|
|
package proto;
|
|
|
|
option go_package = "git.servflow.io/servflow/definitions/proto";
|
|
|
|
service WorkflowService {
|
|
rpc GetAllWorkflowConfigs(GetAllWorkflowConfigsRequest) returns (GetAllWorkflowConfigsResponse) {}
|
|
rpc GetAllDatabases(GetAllDatabasesRequest) returns (GetAllDatabasesResponse) {}
|
|
}
|
|
|
|
message GetAllDatabasesRequest{
|
|
string identifier = 1;
|
|
}
|
|
|
|
message GetAllDatabasesResponse{
|
|
repeated DatabaseConfig databases = 1;
|
|
}
|
|
message GetAllWorkflowConfigsRequest {
|
|
string identifier = 1;
|
|
}
|
|
|
|
message GetAllWorkflowConfigsResponse {
|
|
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;
|
|
bytes config = 2;
|
|
string next = 3;
|
|
}
|
|
|
|
message Conditional {
|
|
string expression = 1;
|
|
string valid_path = 2;
|
|
string invalid_path = 3;
|
|
}
|
|
|
|
message Response {
|
|
bytes template = 1;
|
|
string type = 2;
|
|
int32 code = 3;
|
|
}
|
|
|
|
message DatabaseConfig {
|
|
string id = 1;
|
|
bytes config = 2;
|
|
string type = 3;
|
|
}
|