Skip to content

Commit e77a127

Browse files
authored
Merge pull request #255 from code0-tech/feat/#254
Add option to send over FunctionDefinitions to Sagittarius
2 parents daa867d + 492796e commit e77a127

3 files changed

Lines changed: 87 additions & 0 deletions

File tree

proto/aquila/aquila.function.proto

Lines changed: 24 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,24 @@
1+
syntax = "proto3";
2+
3+
option ruby_package = "Tucana::Aquila";
4+
5+
package aquila;
6+
7+
import "shared.function.proto";
8+
9+
// Request for updating a list of function definitions
10+
message FunctionDefinitionUpdateRequest {
11+
// List of function definitions
12+
repeated shared.FunctionDefinition functions = 1;
13+
}
14+
15+
// Response of updating function definitions
16+
message FunctionDefinitionUpdateResponse {
17+
// True if was successful, false if not
18+
bool success = 1;
19+
}
20+
21+
//This service will be implemented as a server by Aquila and as a client by Taurus.
22+
service FunctionDefinitionService {
23+
rpc Update(FunctionDefinitionUpdateRequest) returns (FunctionDefinitionUpdateResponse) {}
24+
}
Lines changed: 24 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,24 @@
1+
syntax = "proto3";
2+
3+
option ruby_package = "Tucana::Sagittarius";
4+
5+
package sagittarius;
6+
7+
import "shared.function.proto";
8+
9+
// Request for updating a list of function definitions
10+
message FunctionDefinitionUpdateRequest {
11+
// List of function definitions
12+
repeated shared.FunctionDefinition functions = 1;
13+
}
14+
15+
// Response of updating function definitions
16+
message FunctionDefinitionUpdateResponse {
17+
// True if was successful, false if not
18+
bool success = 1;
19+
}
20+
21+
//This service will be implemented as a server by Sagittarius and as a client by Aquila.
22+
service FunctionDefinitionService {
23+
rpc Update(FunctionDefinitionUpdateRequest) returns (FunctionDefinitionUpdateResponse) {}
24+
}

proto/shared/shared.function.proto

Lines changed: 39 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,39 @@
1+
syntax = "proto3";
2+
3+
option ruby_package = "Tucana::Shared";
4+
5+
package shared;
6+
7+
import "shared.translation.proto";
8+
import "shared.struct.proto";
9+
10+
// Definition of a function used for execution
11+
message FunctionDefinition {
12+
string runtime_name = 1;
13+
repeated ParameterDefinition parameter_definitions = 2;
14+
string signature = 3;
15+
bool throws_error = 4;
16+
repeated Translation name = 5;
17+
repeated Translation description = 6;
18+
repeated Translation documentation = 7;
19+
repeated Translation deprecation_message = 8;
20+
repeated Translation display_message = 9;
21+
repeated Translation alias = 10;
22+
//will link to all data types used in return_type or within the parameters type
23+
repeated string linked_data_type_identifiers = 11;
24+
// Version of the runtime function
25+
// Format: "major.minor.patch", e.g. "1.2.3"
26+
string version = 12;
27+
string display_icon = 13;
28+
// Identifier of the service that defines this definition
29+
string definition_source = 14;
30+
}
31+
32+
// Definition of a parameter used for execution
33+
message ParameterDefinition {
34+
string runtime_name = 1;
35+
optional shared.Value default_value = 2;
36+
repeated Translation name = 3;
37+
repeated Translation description = 4;
38+
repeated Translation documentation = 5;
39+
}

0 commit comments

Comments
 (0)