//! Example: inspect canonical gateway endpoints for a client.
use athena_rs::{
    AthenaClient, GATEWAY_DELETE_PATH, GATEWAY_FETCH_PATH, GATEWAY_INSERT_PATH, GATEWAY_QUERY_PATH,
    GATEWAY_SQL_PATH, GATEWAY_UPDATE_PATH, GatewayRoutes,
};
use std::error::Error;

#[tokio::main]
async fn main() -> Result<(), Box<dyn Error>> {
    let client: AthenaClient =
        AthenaClient::new("http://localhost:4052", "secret", "reporting").await?;
    let routes: GatewayRoutes = client.gateway_routes();

    println!("Canonical SDK paths:");
    println!("  fetch  -> {}", GATEWAY_FETCH_PATH);
    println!("  insert -> {}", GATEWAY_INSERT_PATH);
    println!("  update -> {}", GATEWAY_UPDATE_PATH);
    println!("  delete -> {}", GATEWAY_DELETE_PATH);
    println!("  query  -> {}", GATEWAY_QUERY_PATH);
    println!("  sql    -> {}", GATEWAY_SQL_PATH);
    println!();
    println!("Resolved endpoints:");
    println!("  fetch  -> {}", routes.fetch);
    println!("  insert -> {}", routes.insert);
    println!("  update -> {}", routes.update);
    println!("  delete -> {}", routes.delete);
    println!("  query  -> {}", routes.query);
    println!("  sql    -> {}", routes.sql);

    Ok(())
}
