Add 'latest' hidden option to restore

This commit is contained in:
Your Name
2025-05-05 21:48:36 +12:00
parent 1776a7e45f
commit 9d01554b13
3 changed files with 62 additions and 17 deletions

View File

@ -56,10 +56,6 @@ class service_runner {
std::string healthtick();
std::string healthmark();
// get the status of all services on the server
static std::map<std::string, ServiceStatus> get_all_services_status(std::string server_name);
static std::string HealthStatus2String(HealthStatus status);
private:
// install the service over ssh, using the credentials from server.env (via server_env.hpp), by:
// 1. check if the server_name exists, and the service_name refers to a valid template
@ -91,6 +87,16 @@ class service_runner {
// edit the service configuration file
void edit_service_config();
public:
// utility functions
static std::string get_latest_backup_file(const std::string& server, const std::string& service);
static void interactive_ssh(const std::string & server_name, const std::string & command);
static void edit_server(const std::string & server_name);
static bool edit_file(const std::string & file_path);
static std::map<std::string, ServiceStatus> get_all_services_status(std::string server_name);
static std::string HealthStatus2String(HealthStatus status);
private:
std::string mServer;
server_env_manager mServerEnv;
@ -112,13 +118,6 @@ class service_runner {
const server_env_manager & mServerEnv;
};
// other utility routines (not specific to service_runner)
void interactive_ssh(const std::string & server_name, const std::string & command);
void edit_server(const std::string & server_name);
bool edit_file(const std::string & file_path);
} // namespace dropshell
#endif // SERVICE_RUNNER_HPP