1pub mod cli;
8pub mod commands;
9pub mod config;
10
11pub mod downloader;
12pub mod error;
13pub mod go;
14pub mod platform;
15pub mod symlink;
16
17pub mod progress_flat;
19pub mod ui_flat;
20
21pub use cli::Cli;
26pub use config::Config;
27pub use downloader::Downloader;
28pub use error::{ErrorUtils, Result};
29pub use go::{GoManager, GoVersionInfo};
30
31pub use progress_flat::{BasicProgress, InstallSteps};
33pub use ui_flat::{format_duration, format_size, SimpleProgressBar, SimpleUI};
34
35#[derive(Debug, Clone)]
44pub struct InstallRequest {
45 pub version: String,
46 pub install_dir: std::path::PathBuf,
47 pub download_dir: std::path::PathBuf,
48 pub force: bool,
49}
50
51#[derive(Debug, Clone)]
53pub struct SwitchRequest {
54 pub version: String,
55 pub base_dir: std::path::PathBuf,
56 pub global: bool,
57 pub force: bool,
58}
59
60#[derive(Debug, Clone)]
62pub struct UninstallRequest {
63 pub version: String,
64 pub base_dir: std::path::PathBuf,
65}
66
67#[derive(Debug, Clone)]
69pub struct ListInstalledRequest {
70 pub base_dir: std::path::PathBuf,
71}
72
73#[derive(Debug, Clone)]
75pub struct StatusRequest {
76 pub base_dir: Option<std::path::PathBuf>,
77}
78
79#[derive(Debug, Clone, Default)]
81pub struct RuntimeStatus {
82 pub current_version: Option<String>,
83 pub current_path: Option<String>,
84 pub environment_vars: std::collections::HashMap<String, String>,
85}
86
87#[derive(Debug, Clone, serde::Serialize, serde::Deserialize)]
89pub struct VersionList {
90 pub versions: Vec<GoVersionInfo>,
91 pub total_count: usize,
92}