48 lines
864 B
Protocol Buffer
48 lines
864 B
Protocol Buffer
|
syntax = "proto3";
|
||
|
|
||
|
package proto;
|
||
|
|
||
|
option go_package = "git.servflow.io/servflow/definitions/proto";
|
||
|
|
||
|
service WorkflowService {
|
||
|
rpc GetAllWorkflowConfigs(GetAllWorkflowConfigsRequest) returns (WorkflowConfigs) {}
|
||
|
}
|
||
|
|
||
|
message GetAllWorkflowConfigsRequest {}
|
||
|
|
||
|
message WorkflowConfigs {
|
||
|
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;
|
||
|
string config = 2;
|
||
|
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;
|
||
|
}
|