proxmox-backup/src/api2.rs

35 lines
836 B
Rust
Raw Normal View History

pub mod access;
2019-01-22 12:56:27 +00:00
pub mod admin;
pub mod backup;
pub mod config;
pub mod node;
pub mod reader;
2019-01-22 12:56:27 +00:00
mod subscription;
pub mod status;
pub mod types;
pub mod version;
pub mod pull;
2019-01-22 12:56:27 +00:00
use proxmox::api::router::SubdirMap;
use proxmox::api::Router;
use proxmox::list_subdirs_api_method;
2019-01-25 09:15:32 +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),
("pull", &pull::ROUTER),
2019-11-21 08:36:41 +00:00
("reader", &reader::ROUTER),
("status", &status::ROUTER),
2019-11-21 08:36:41 +00:00
("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);