This repository has been archived by the owner on Nov 14, 2022. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 8
/
service-corredor.proto
87 lines (62 loc) · 1.85 KB
/
service-corredor.proto
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
syntax = "proto3";
package corredor;
import "compose/namespace.proto";
import "compose/module.proto";
import "compose/record.proto";
import "system/mail_message.proto";
// Reasoning for having JWT in the *Request message (instead of meta-data):
// We're not using JWT as authentication token but as parameter that is passed
// to script runner and used there for setting up the API clients
//
// Script runner does not authenticate requests and blindly trusts all clients
service ScriptRunner {
rpc Test(RunTestRequest) returns (RunTestResponse);
rpc Namespace (RunNamespaceRequest) returns (RunNamespaceResponse);
rpc Module (RunModuleRequest) returns (RunModuleResponse);
rpc Record (RunRecordRequest) returns (RunRecordResponse);
rpc MailMessage (RunMailMessageRequest) returns (RunMailMessageResponse);
}
message RunTestRequest {
string source = 1;
string name = 2;
}
message RunNamespaceRequest {
map<string, string> config = 1;
Script script = 2;
compose.Namespace namespace = 3;
}
message RunModuleRequest {
map<string, string> config = 1;
Script script = 2;
compose.Namespace namespace = 3;
compose.Module module = 4;
}
message RunRecordRequest {
map<string, string> config = 1;
Script script = 2;
compose.Namespace namespace = 3;
compose.Module module = 4;
compose.Record record = 5;
}
message RunMailMessageRequest {
map<string, string> config = 1;
Script script = 2;
system.MailMessage mailMessage = 3;
}
message RunTestResponse {}
message RunNamespaceResponse {
compose.Namespace namespace = 1;
}
message RunModuleResponse {
compose.Module module = 1;
}
message RunRecordResponse {
compose.Record record = 1;
}
message RunMailMessageResponse {}
message Script {
string source = 1;
string name = 2;
uint32 timeout = 3; // milliseconds
bool async = 4;
}