proxmox-backup/src/api2.rs

31 lines
699 B
Rust
Raw Normal View History

pub mod types;
2019-01-22 12:56:27 +00:00
pub mod config;
pub mod admin;
pub mod backup;
pub mod reader;
pub mod node;
pub mod version;
2019-01-22 12:56:27 +00:00
mod subscription;
2019-01-30 14:14:20 +00:00
mod access;
2019-01-22 12:56:27 +00:00
use crate::api_schema::router::*;
2019-01-25 09:15:32 +00:00
2019-01-22 12:56:27 +00:00
pub fn router() -> Router {
let nodes = Router::new()
2019-04-09 12:43:30 +00:00
.match_all("node", node::router());
2019-01-22 12:56:27 +00:00
let route = Router::new()
2019-01-30 14:14:20 +00:00
.subdir("access", access::router())
2019-01-22 12:56:27 +00:00
.subdir("admin", admin::router())
.subdir("backup", backup::router())
.subdir("reader", reader::router())
2019-01-22 12:56:27 +00:00
.subdir("config", config::router())
.subdir("nodes", nodes)
.subdir("subscription", subscription::router())
.subdir("version", version::router())
.list_subdirs();
2019-01-22 12:56:27 +00:00
route
}