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-01-23 12:05:32 +00:00
|
|
|
pub mod node;
|
2019-01-22 12:56:27 +00:00
|
|
|
mod version;
|
|
|
|
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
|
|
|
|
|
|
|
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("config", config::router())
|
|
|
|
.subdir("nodes", nodes)
|
|
|
|
.subdir("subscription", subscription::router())
|
2019-04-16 10:07:02 +00:00
|
|
|
.subdir("version", version::router())
|
|
|
|
.list_subdirs();
|
2019-01-22 12:56:27 +00:00
|
|
|
|
|
|
|
route
|
|
|
|
}
|