pub mod cli;
pub mod commands;
pub mod config;
pub mod downloader;
pub mod error;
pub mod go;
pub mod platform;
pub mod symlink;
pub mod progress_flat;
pub mod ui_flat;
pub use cli::Cli;
pub use config::Config;
pub use downloader::Downloader;
pub use error::{ErrorUtils, Result};
pub use go::{GoManager, GoVersionInfo};
pub use progress_flat::{BasicProgress, InstallSteps};
pub use ui_flat::{format_duration, format_size, SimpleProgressBar, SimpleUI};
#[derive(Debug, Clone)]
pub struct InstallRequest {
pub version: String,
pub install_dir: std::path::PathBuf,
pub download_dir: std::path::PathBuf,
pub force: bool,
}
#[derive(Debug, Clone)]
pub struct SwitchRequest {
pub version: String,
pub base_dir: std::path::PathBuf,
pub global: bool,
pub force: bool,
}
#[derive(Debug, Clone)]
pub struct UninstallRequest {
pub version: String,
pub base_dir: std::path::PathBuf,
}
#[derive(Debug, Clone)]
pub struct ListInstalledRequest {
pub base_dir: std::path::PathBuf,
}
#[derive(Debug, Clone)]
pub struct StatusRequest {
pub base_dir: Option<std::path::PathBuf>,
}
#[derive(Debug, Clone, Default)]
pub struct RuntimeStatus {
pub current_version: Option<String>,
pub current_path: Option<String>,
pub environment_vars: std::collections::HashMap<String, String>,
}
#[derive(Debug, Clone, serde::Serialize, serde::Deserialize)]
pub struct VersionList {
pub versions: Vec<GoVersionInfo>,
pub total_count: usize,
}