use anyhow::Result;
use async_trait::async_trait;
use std::net::IpAddr;
use crate::config::ServicePort;
use crate::ssh::SshKeypair;
use crate::wg::WireguardManager;
pub mod cloudinit;
pub mod digitalocean;
#[async_trait]
pub trait InnisfreeServer {
async fn new(
name: &str,
services: Vec<ServicePort>,
wg_mgr: WireguardManager,
ssh_client_keypair: &SshKeypair,
ssh_server_keypair: &SshKeypair,
) -> Result<Self>
where
Self: Sized;
fn ipv4_address(&self) -> Result<IpAddr>;
async fn assign_floating_ip(&self, floating_ip: IpAddr) -> Result<()>;
async fn destroy(&self) -> Result<()>;
}