build-trust / ockam

Orchestrate end-to-end encryption, cryptographic identities, mutual authentication, and authorization policies between distributed applications – at massive scale.
https://ockam.io
Apache License 2.0
4.43k stars 558 forks source link

Command - refactor to use typed interfaces to implement commands for `tcp connections` #6703

Open nazmulidris opened 10 months ago

nazmulidris commented 10 months ago

Following the refactoring of RPC calls, we can now implement all commands using typed interfaces and implemented with a specific RPC client.

For example the Spaces trait provides an access to spaces, to create/list/delete them. That trait is implemented by the InMemoryNode by making requests to the controller, which encapsulates the logic for making API calls to the Controller and access spaces

The use of the Spaces interface can be seen in the enroll command.

Desired behavior

Provide similar interfaces for all other commands and remove the explicit routes inside the ockam_command crate, like this one for the tcp connections:

All the interfaces and implementations must be part of the ockam_api crate so that the purpose of the ockam_command is only to:

This issue should be solved by:

[!NOTE] Related epic: https://github.com/build-trust/ockam/issues/6310


We love helping new contributors! ❤️ If you have questions or need help as you explore, please join us on Discord. If you're looking for other issues to contribute to, please checkout our good first issues.

0xkelvin commented 10 months ago

hello, let me on this one

nazmulidris commented 10 months ago

@0xkelvin That's awesome, this is all yours. Please let us know if you have any questions as you explore. You can also ask questions on the contributors discord https://discord.gg/RAbjRr3kds