mod client;
mod docker;
mod error;
mod types;
pub use client::{Antibot, AntibotBuilder};
pub use error::AntibotError;
pub use types::*;
#[derive(Debug, Clone)]
pub enum Provider {
Byparr,
FlareSolverr,
Custom(String),
}
impl Provider {
pub fn image(&self) -> &str {
match self {
Provider::Byparr => "ghcr.io/thephaseless/byparr:latest",
Provider::FlareSolverr => "ghcr.io/flaresolverr/flaresolverr:latest",
Provider::Custom(image) => image,
}
}
pub fn label(&self) -> &str {
match self {
Provider::Byparr => "Byparr",
Provider::FlareSolverr => "FlareSolverr",
Provider::Custom(_) => "Custom",
}
}
}
impl Default for Provider {
fn default() -> Self {
Provider::Byparr
}
}
impl std::fmt::Display for Provider {
fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
write!(f, "{} ({})", self.label(), self.image())
}
}