Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 6 additions & 0 deletions proto/aquila/aquila.action.proto
Original file line number Diff line number Diff line change
Expand Up @@ -54,6 +54,10 @@ message ActionTransferRequest {
ActionEvent event = 2;
// Result of execution that was triggered by a execution request
ActionExecutionResponse result = 3;
// Updated Module Definitions at runtime
shared.ModuleDefinitions module_definitions = 4;
// Response to a Module Data Query
shared.ModuleDataConnection module_data = 5;
}
}

Expand All @@ -63,6 +67,8 @@ message ActionTransferResponse {
ActionExecutionRequest execution = 1;
// ModuleConfigurations that have been configured by the user
shared.ModuleConfigurations module_configurations = 2;
// Request to query a specific module data
shared.ModuleDataQuery module_data_query = 3;
}
}

Expand Down
23 changes: 22 additions & 1 deletion proto/aquila/aquila.module.proto
Original file line number Diff line number Diff line change
Expand Up @@ -5,20 +5,41 @@ option ruby_package = "Tucana::Aquila";
package aquila;

import "shared.module.proto";
import "shared.errors.proto";

message ModuleDataLogon {}

message ModuleDataRequest {
oneof data {
ModuleDataLogon logon = 1;
shared.ModuleDataConnection connection = 2;
}
}


// Request for updating a list of modules including data types, flow types and runtime function definitions
message ModuleUpdateRequest {
// List of modules
repeated shared.Module modules = 1;
}

// Request for updating a list of module definitions
message ModuleDefinitionUpdateRequest {
// List of modules
repeated shared.ModuleDefinition module_definition = 1;
}


// Response of updating modules including data types, flow types and runtime function definitions
message ModuleUpdateResponse {
// True if was successful, false if not
bool success = 1;
optional shared.ServiceError error = 2;
}

//This service will be implemented as a server by Aquila and as a client by Taurus.
//This service will be implemented as a server by Sagittarius and as a client by Aquila.
service ModuleService {
rpc Update(ModuleUpdateRequest) returns (ModuleUpdateResponse) {}
rpc UpdateModuleDefinition(ModuleUpdateRequest) returns (ModuleUpdateResponse) {}
rpc Query(stream ModuleDataRequest) returns (stream shared.ModuleDataQuery) {}
}
18 changes: 18 additions & 0 deletions proto/sagittarius/sagittarius.module.proto
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,15 @@ package sagittarius;
import "shared.errors.proto";
import "shared.module.proto";

message ModuleDataLogon {}

message ModuleDataRequest {
oneof data {
ModuleDataLogon logon = 1;
shared.ModuleDataConnection connection = 2;
}
}

// Request for updating a list of modules including data types, flow types and runtime function definitions
message ModuleUpdateRequest {
// List of modules
Expand All @@ -16,6 +25,13 @@ message ModuleUpdateRequest {
repeated string available_defintition_soruces = 2;
}

// Request for updating a list of module definitions
message ModuleDefinitionUpdateRequest {
// List of modules
repeated shared.ModuleDefinition module_definition = 1;
}


// Response of updating modules including data types, flow types and runtime function definitions
message ModuleUpdateResponse {
// True if was successful, false if not
Expand All @@ -26,4 +42,6 @@ message ModuleUpdateResponse {
//This service will be implemented as a server by Sagittarius and as a client by Aquila.
service ModuleService {
rpc Update(ModuleUpdateRequest) returns (ModuleUpdateResponse) {}
rpc UpdateModuleDefinition(ModuleUpdateRequest) returns (ModuleUpdateResponse) {}
rpc Query(stream ModuleDataRequest) returns (stream shared.ModuleDataQuery) {}
}
75 changes: 70 additions & 5 deletions proto/shared/shared.module.proto
Original file line number Diff line number Diff line change
Expand Up @@ -34,19 +34,84 @@ message Module {
}

message ModuleDefinition {
// A list of flow type identifier to which the value appies
repeated string flow_type_identifier = 1;
oneof value {
// Endpoint URL
Endpoint endpoint = 2;
// List of identifier of module data for this module
repeated string module_data_identifier = 1;
// List of endpoints for this module
repeated Endpoint endpoint = 2;
}

message ModuleDefinitions {
repeated ModuleDefinition module_definitions = 1;
}

message ModuleDataConnection {
int64 count = 1;
repeated ModuleData nodes = 2;
PageInfo pageInfo = 3;
}

message ModuleData {
string identifier = 1;
repeated shared.Value data = 2;
}

message PageInfo {
string end_cursor = 1;
bool has_next_page = 2;
bool has_prev_page = 3;
string start_cursor = 4;
}

message ModuleDataQuery {
string identifier = 1;
repeated ModuleDataFilter filter = 2;
repeated ModuleDataSort sort = 3;
optional string cursor = 4;
}

message ModuleDataSort {
enum ModuleDataSortDirection {
UNKNOWN = 0;
ASC = 1;
DESC = 2;
}

repeated string path = 1;
ModuleDataSortDirection direction = 2;
}

message ModuleDataFilter {
message Operation {
oneof operation {
bool exists = 1;

NumberValue gt = 2;
NumberValue gte = 3;
NumberValue lt = 4;
NumberValue lte = 5;

string eq = 6;
string neq = 7;
string contains = 8;
string starts_with = 9;
string ends_with = 10;

ListValue in = 11;
ListValue not_in = 12;
}
}

repeated string path = 1;
Operation operation = 2;
}

message Endpoint {
string host = 1;
int64 port = 2;
string endpoint = 3;
string protocol = 4;
// A list of flow type identifier to which the endpoint applies
repeated string flow_type_identifier = 5;
}

//send by sagittarius to inform a module of the real config set by the user
Expand Down