2019-05-09 05:44:09 +00:00
|
|
|
pub mod types;
|
2019-01-22 12:56:27 +00:00
|
|
|
pub mod config;
|
|
|
|
pub mod admin;
|
2019-06-05 05:23:21 +00:00
|
|
|
pub mod backup;
|
2019-06-27 07:01:41 +00:00
|
|
|
pub mod reader;
|
2019-01-23 12:05:32 +00:00
|
|
|
pub mod node;
|
2019-09-09 08:51:08 +00:00
|
|
|
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
|
|
|
|
2019-05-09 05:44:09 +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
|
|
|
|
2019-10-26 09:36:01 +00:00
|
|
|
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())
|
2019-06-05 05:23:21 +00:00
|
|
|
.subdir("backup", backup::router())
|
2019-06-27 07:01:41 +00:00
|
|
|
.subdir("reader", reader::router())
|
2019-01-22 12:56:27 +00:00
|
|
|
.subdir("config", config::router())
|
|
|
|
.subdir("nodes", nodes)
|
|
|
|
.subdir("subscription", subscription::router())
|
2019-04-16 10:07:02 +00:00
|
|
|
.subdir("version", version::router())
|
2019-10-26 09:36:01 +00:00
|
|
|
.list_subdirs()
|
2019-01-22 12:56:27 +00:00
|
|
|
}
|