2019-11-21 13:14:54 +00:00
|
|
|
mod access;
|
2019-01-22 12:56:27 +00:00
|
|
|
pub mod admin;
|
2019-06-05 05:23:21 +00:00
|
|
|
pub mod backup;
|
2019-11-21 13:14:54 +00:00
|
|
|
pub mod config;
|
2019-01-23 12:05:32 +00:00
|
|
|
pub mod node;
|
2019-11-21 13:14:54 +00:00
|
|
|
pub mod reader;
|
2019-01-22 12:56:27 +00:00
|
|
|
mod subscription;
|
2019-11-21 13:14:54 +00:00
|
|
|
pub mod types;
|
|
|
|
pub mod version;
|
2019-01-22 12:56:27 +00:00
|
|
|
|
2019-11-21 13:14:54 +00:00
|
|
|
use proxmox::api::list_subdirs_api_method;
|
|
|
|
use proxmox::api::router::SubdirMap;
|
|
|
|
use proxmox::api::Router;
|
2019-01-25 09:15:32 +00:00
|
|
|
|
2019-11-21 13:14:54 +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);
|