linode_api_proxy/http_handlers/v4/
mod.rs

1use std::sync::Arc;
2
3use axum::{routing::get, Router};
4use linode_api::types::Version;
5
6use crate::{http_handlers::fallback_handler::FallbackHandler, Context};
7
8//
9pub mod error;
10pub use error::HandleError;
11
12pub mod linode_instances;
13
14//
15pub fn router(ctx: Arc<Context>) -> Router {
16    Router::new()
17        .route(
18            "/linode/instances/view_by_label",
19            get(linode_instances::linode_view_by_label_handler::handle),
20        )
21        .fallback::<_, ()>(FallbackHandler::new(
22            ctx.linode_api_http_client.clone(),
23            Version::V4,
24        ))
25        .with_state(ctx)
26}