pub mod api;
pub mod browser;
pub mod config;
pub mod deviceflow;
pub mod error;
pub mod github;
pub mod keyring;
pub mod log;
pub use api::{Client, InputGet, TokenSource};
pub use browser::{Browser, BrowserError, DefaultBrowser};
pub use config::{App, Config};
pub use deviceflow::{DeviceCodeResponse, DeviceCodeUI, SimpleDeviceCodeUI};
pub use error::{Error, Result};
pub use github::GitHubClient;
pub use keyring::{AccessToken, DEFAULT_SERVICE_KEY};
pub use log::Logger;
pub fn get_config_path() -> Result<String> {
let path = config::get_path(|k| std::env::var(k).ok(), std::env::consts::OS)?;
path.to_str()
.map(|s| s.to_string())
.ok_or_else(|| Error::Config("config path contains non-UTF-8 characters".into()))
}