proxmox-backup/src/api2.rs

30 lines
678 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-11-21 08:36:41 +00:00
const NODES_ROUTER: Router = Router::new()
.match_all("node", &node::ROUTER);
2019-01-22 12:56:27 +00:00
2019-11-21 08:36:41 +00:00
pub const SUBDIRS: SubdirMap = &[
("access", &access::ROUTER),
("admin", &admin::ROUTER),
("backup", &backup::ROUTER),
("config", &config::ROUTER),
("nodes", &NODES_ROUTER),
("reader", &reader::ROUTER),
("subscription", &subscription::ROUTER),
("version", &version::ROUTER),
];
2019-01-22 12:56:27 +00:00
2019-11-21 08:36:41 +00:00
pub const ROUTER: Router = Router::new()
.get(&list_subdirs_api_method!(SUBDIRS))
.subdirs(SUBDIRS);