-
Notifications
You must be signed in to change notification settings - Fork 0
Action Simplification #31
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Merged
Merged
Changes from all commits
Commits
Show all changes
9 commits
Select commit
Hold shift + click to select a range
564ca3c
feat: adjusted build configuration
raphael-goetz f80c1e1
fix: removed unused/unwanted proto files
raphael-goetz 156647d
feat: added action proto for aquila
raphael-goetz 2a23d74
feat: small changes
raphael-goetz 4dae205
docs: added setup & project structure
raphael-goetz 4271620
feat: added runtime token
raphael-goetz 1a4dc42
drop: removed runtime token
raphael-goetz aff7355
fix: renamed duplicate action file to fix duplicate file name error
raphael-goetz 27671f7
feat: requested changes
raphael-goetz File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,63 @@ | ||
| # Tucana | ||
|
|
||
| This repository is responsible for all gRPC definitions that we use. | ||
|
|
||
| ## Setup | ||
|
|
||
| See the setup guide for the following languages. Support for other languages is not planed! | ||
|
|
||
| ### Rust | ||
|
|
||
| See: [Crate](https://crates.io/crates/tucana) | ||
|
|
||
| ```toml | ||
| [dependencies] | ||
| tucana = { version = "<version>" } | ||
| ``` | ||
|
|
||
| To enable additional features:: | ||
|
|
||
| ```toml | ||
| [dependencies] | ||
| tucana = { version = "<version>", features = ["sagittarius", "aquila"] } | ||
| ``` | ||
|
|
||
| ### Ruby | ||
|
|
||
| See: [Gem](https://rubygems.org/gems/tucana) | ||
|
|
||
| ```ruby | ||
| gem 'tucana', '<version>' | ||
| ``` | ||
|
|
||
| Don't forget to initialize the required feature: | ||
| ```ruby | ||
| # For Sagittarius | ||
| Tucana.load_protocol(:sagittarius) | ||
|
|
||
| # For Aquila | ||
| Tucana.load_protocol(:aquila) | ||
| ``` | ||
|
|
||
| ## Project Structure | ||
|
|
||
| The project is organized with services functioning as servers. Each protocol in the Sagittarius folder corresponds to | ||
| services that Sagittarius must implement as a server. | ||
|
|
||
| ```ascii-tree | ||
| . | ||
| ├── aquila | ||
| │ ├── action - Action service (emits events, manages configs, and handles executions) | ||
| │ └── execution - Execution service (handles internal execution calls) | ||
| ├── sagittarius | ||
| │ ├── action - Action service (manages logon/logoff requests for action configurations) | ||
| │ ├── datatype - DataType service | ||
| │ ├── flow - Flow service (handles flow updates) | ||
| │ ├── flow_definition - Defines types for flows | ||
| │ ├── node - Defines types for nodes | ||
| │ └── ping - Ping service (performs life checks) | ||
| └── shared | ||
| ├── datatype_definition - Defines types for data types | ||
| ├── runtime_function_definition - Defines types for runtime functions | ||
| └── translations - Contains translations with country codes and translated messages | ||
| ``` |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,80 @@ | ||
| syntax = "proto3"; | ||
|
|
||
| import "google/protobuf/struct.proto"; | ||
| import "runtime_function_definition.proto"; | ||
| import "datatype_definition.proto"; | ||
| import "translations.proto"; | ||
| import "event.proto"; | ||
|
|
||
| option ruby_package = "Tucana::Aquila"; | ||
|
|
||
| package aquila; | ||
|
|
||
| // Event that gets admitted by an action | ||
| message Event { | ||
| // Id of Event type | ||
| string event_type = 1; | ||
| // Payload (JSON) of event params | ||
| google.protobuf.Value payload = 2; | ||
| } | ||
|
|
||
| // Action flow/event configuration | ||
| message Configuration { | ||
| // Action identifier | ||
| string identifier = 1; | ||
| // Flow Configuration | ||
| repeated shared.RuntimeFunctionDefinition function_definitions = 2; | ||
| // Event Configuration | ||
| repeated shared.EventType event_types = 3; | ||
| // Application Configuration | ||
| repeated ActionConfiguration action_configurations = 4; | ||
| } | ||
|
|
||
| message ActionConfiguration { | ||
| repeated shared.Translation name = 1; | ||
| repeated shared.Translation description = 2; | ||
| shared.DataType type = 3; | ||
| optional google.protobuf.Value default_value = 4; | ||
| } | ||
|
|
||
| // Request to execute a request a flow | ||
| message ExecutionRequest { | ||
| // Execution identifier of execution | ||
| string execution_identifier = 1; | ||
| // Function identifier of flow to execute | ||
| string function_identifier = 2; | ||
| // Parameters (JSON) of flow required to execute | ||
| google.protobuf.Struct parameters = 3; | ||
| } | ||
|
|
||
| // Result from executed flows by an action | ||
| message ExecutionResult { | ||
| // Identifier of flow to execute | ||
| string execution_identifier = 1; | ||
| // Result of executed flow | ||
| google.protobuf.Value result = 2; | ||
| } | ||
|
|
||
| message TransferRequest { | ||
| oneof data { | ||
| // Configuration of action that will be send to sagittarius | ||
| // | ||
| // Expected behavior: | ||
| // Aquila will abort if the first request is not a configuration | ||
| Configuration configuration = 1; | ||
| // Event that got admitted | ||
| Event event = 2; | ||
| // Result of execution that was triggered by a execution request | ||
| ExecutionResult result = 3; | ||
| } | ||
| } | ||
|
|
||
| message TransferResponse { | ||
| // Execution request | ||
| ExecutionRequest execution = 1; | ||
| } | ||
|
|
||
| service ActionTransferService { | ||
| // This behavior achieves a bi-directional stream so that both services aren't required to be a server & client on their own | ||
| rpc Transfer (stream TransferRequest) returns (stream TransferResponse); | ||
| } | ||
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file was deleted.
Oops, something went wrong.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,28 @@ | ||
| syntax = "proto3"; | ||
|
|
||
| import "google/protobuf/struct.proto"; | ||
| import "translations.proto"; | ||
| import "datatype_definition.proto"; | ||
|
|
||
| option ruby_package = "Tucana::Shared"; | ||
|
|
||
| package shared; | ||
|
|
||
| message EventDefinitionSettings { | ||
| repeated Translation name = 1; | ||
| bool unique = 2; | ||
| repeated Translation description = 3; | ||
| DataType type = 4; | ||
| optional google.protobuf.Value default_value = 5; | ||
| } | ||
|
|
||
| message EventDefinition { | ||
| repeated EventDefinitionSettings settings = 1; | ||
| DataType input_type = 2; | ||
| bool editable = 3; | ||
| } | ||
|
|
||
| message EventType { | ||
| repeated Translation name = 1; | ||
| EventDefinition definition = 2; | ||
| } |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,22 @@ | ||
| syntax = "proto3"; | ||
|
|
||
| import "datatype_definition.proto"; | ||
|
|
||
| option ruby_package = "Tucana::Shared"; | ||
|
|
||
| package shared; | ||
|
|
||
| message RuntimeFunctionDefinition { | ||
| string runtime_id = 1; | ||
| optional RuntimeParameterDefinitions runtime_parameter_definitions = 2; | ||
| optional DataType return_type = 3; | ||
| } | ||
|
|
||
| message RuntimeParameterDefinitions { | ||
| repeated RuntimeFunctionDefinition parameters = 1; | ||
| } | ||
|
|
||
| message RuntimeParameterDefinition { | ||
| DataType type = 1; | ||
| string name = 2; | ||
| } |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Uh oh!
There was an error while loading. Please reload this page.