use lmrc_postgres::{PostgresConfig, PostgresManager};
#[tokio::main]
async fn main() -> Result<(), Box<dyn std::error::Error>> {
tracing_subscriber::fmt::init();
let config = PostgresConfig::builder()
.version("15")
.database_name("myapp")
.username("myuser")
.password("secure_password_123")
.build()?;
let manager = PostgresManager::builder()
.config(config)
.server_ip("192.168.1.100") .ssh_user("root") .ssh_password("your_ssh_password") .build()?;
println!("Starting PostgreSQL installation...");
manager.setup().await?;
println!("PostgreSQL installed and configured successfully!");
println!("Testing database connection...");
manager.test_connection().await?;
println!("✓ Connection test successful!");
println!("PostgreSQL is ready to use!");
Ok(())
}