|
ORE Studio 0.0.4
|
High-level service for managing server connections and environments. More...
#include <connection_manager.hpp>

Classes | |
| struct | resolved_connection |
| Resolved connection details for opening a login dialog. More... | |
Public Member Functions | |
| connection_manager (const std::filesystem::path &db_path, const std::string &master_password) | |
| Construct connection manager with database path and master password. | |
| void | create_folder (const domain::folder &folder) |
| void | update_folder (const domain::folder &folder) |
| void | delete_folder (const boost::uuids::uuid &id) |
| std::vector< domain::folder > | get_all_folders () |
| std::optional< domain::folder > | get_folder (const boost::uuids::uuid &id) |
| std::vector< domain::folder > | get_root_folders () |
| std::vector< domain::folder > | get_child_folders (const boost::uuids::uuid &parent_id) |
| void | create_tag (const domain::tag &tag) |
| void | update_tag (const domain::tag &tag) |
| void | delete_tag (const boost::uuids::uuid &id) |
| std::vector< domain::tag > | get_all_tags () |
| std::optional< domain::tag > | get_tag (const boost::uuids::uuid &id) |
| std::optional< domain::tag > | get_tag_by_name (const std::string &name) |
| void | create_environment (const domain::environment &env) |
| void | update_environment (const domain::environment &env) |
| void | delete_environment (const boost::uuids::uuid &id) |
| std::vector< domain::environment > | get_all_environments () |
| std::optional< domain::environment > | get_environment (const boost::uuids::uuid &id) |
| std::vector< domain::environment > | get_environments_in_folder (const std::optional< boost::uuids::uuid > &folder_id) |
| void | add_tag_to_environment (const boost::uuids::uuid &environment_id, const boost::uuids::uuid &tag_id) |
| void | remove_tag_from_environment (const boost::uuids::uuid &environment_id, const boost::uuids::uuid &tag_id) |
| std::vector< domain::tag > | get_tags_for_environment (const boost::uuids::uuid &environment_id) |
| std::vector< domain::environment > | get_environments_with_tag (const boost::uuids::uuid &tag_id) |
| void | create_connection (domain::connection conn, const std::string &password) |
| void | update_connection (domain::connection conn, const std::optional< std::string > &password) |
| void | delete_connection (const boost::uuids::uuid &id) |
| std::vector< domain::connection > | get_all_connections () |
| std::optional< domain::connection > | get_connection (const boost::uuids::uuid &id) |
| std::vector< domain::connection > | get_connections_in_folder (const std::optional< boost::uuids::uuid > &folder_id) |
| std::string | get_password (const boost::uuids::uuid &connection_id) |
| Get decrypted password for a connection. | |
| void | add_tag_to_connection (const boost::uuids::uuid &connection_id, const boost::uuids::uuid &tag_id) |
| void | remove_tag_from_connection (const boost::uuids::uuid &connection_id, const boost::uuids::uuid &tag_id) |
| std::vector< domain::tag > | get_tags_for_connection (const boost::uuids::uuid &connection_id) |
| std::vector< domain::connection > | get_connections_with_tag (const boost::uuids::uuid &tag_id) |
| resolved_connection | resolve_connection (const boost::uuids::uuid &connection_id) |
| Resolve a connection to its full details for opening a login dialog. | |
| bool | verify_master_password () |
| Verify if the master password is correct. | |
| void | change_master_password (const std::string &new_password) |
| Change the master password. | |
| void | purge () |
| Delete all data from the database. | |
High-level service for managing server connections and environments.
Provides a unified API for managing:
| connection_manager | ( | const std::filesystem::path & | db_path, |
| const std::string & | master_password | ||
| ) |
Construct connection manager with database path and master password.
| db_path | Path to the SQLite database file. |
| master_password | Master password for encryption/decryption. |
| connection_manager::resolved_connection resolve_connection | ( | const boost::uuids::uuid & | connection_id | ) |
Resolve a connection to its full details for opening a login dialog.
If the connection has an environment_id, fetches host/port from the environment. Decrypts the password. Throws if connection not found.
| bool verify_master_password | ( | ) |
Verify if the master password is correct.
Attempts to decrypt an existing password to verify the master password. Returns true if no passwords exist or if decryption succeeds.
| void change_master_password | ( | const std::string & | new_password | ) |
Change the master password.
Re-encrypts all stored connection passwords with the new master password.
| void purge | ( | ) |
Delete all data from the database.
Removes all connections, environments, folders, and tags. This operation cannot be undone.