Skip to main content

Module startup

Module startup 

Source
Expand description

Startup types and helpers for Tuitbot CLI commands.

Provides API tier detection types, OAuth token management, PKCE authentication helpers, startup banner formatting, and diagnostic check types used by the run, auth, and test CLI commands.

§Module layout

  • config — ApiTier, TierCapabilities, StoredTokens, StartupError
  • db — token file I/O, path helpers (data_dir, expand_tilde, validate_db_path)
  • services — PKCE, OAuth URL building, token exchange, credential verification, banner

Re-exports§

pub use config::ApiTier;
pub use config::StartupError;
pub use config::StoredTokens;
pub use config::TierCapabilities;
pub use db::data_dir;
pub use db::expand_tilde;
pub use db::load_tokens_from_file;
pub use db::resolve_db_path;
pub use db::save_tokens_to_file;
pub use db::token_file_path;
pub use db::validate_db_path;
pub use services::build_auth_url;
pub use services::build_redirect_uri;
pub use services::exchange_auth_code;
pub use services::extract_auth_code;
pub use services::extract_callback_state;
pub use services::format_startup_banner;
pub use services::generate_pkce;
pub use services::verify_credentials;
pub use services::PkceChallenge;
pub use services::X_AUTH_URL;
pub use services::X_TOKEN_URL;
pub use services::X_USERS_ME_URL;

Modules§

config
API tier types, token storage model, and startup error type.
db
Token file I/O and filesystem path helpers.
services
PKCE generation, OAuth URL building, token exchange, credential verification, and startup banner formatting.