This repository has been archived by the owner on Jun 6, 2024. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
10 changed files
with
88 additions
and
43 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1 +1 @@ | ||
pub mod parameters; | ||
pub mod parameters; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,2 +1,2 @@ | ||
pub mod namespace_handler; | ||
pub mod table_handler; | ||
pub mod table_handler; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,3 +1,3 @@ | ||
pub mod namespace; | ||
pub mod root; | ||
pub mod table; | ||
pub mod root; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,13 +1,28 @@ | ||
use axum::{ routing::{get, post, head, delete}, Router}; | ||
use crate::handlers::namespace_handler; | ||
use axum::{ | ||
routing::{delete, get, head, post}, | ||
Router, | ||
}; | ||
|
||
pub fn routes() -> Router<> { | ||
pub fn routes() -> Router { | ||
let router = Router::new() | ||
.route("/namespaces", get(namespace_handler::list_namespaces)) | ||
.route("/namespaces", post(namespace_handler::create_namespace)) | ||
.route("/namespace/:namespace", get(namespace_handler::load_namespace_metadata)) | ||
.route("/namespace/:namespace", head(namespace_handler::namespace_exists)) | ||
.route("/namespace/:namespace", delete(namespace_handler::drop_namespace)) | ||
.route("/namespace/:namespace/properties", post(namespace_handler::set_namespace_properties)); | ||
.route( | ||
"/namespace/:namespace", | ||
get(namespace_handler::load_namespace_metadata), | ||
) | ||
.route( | ||
"/namespace/:namespace", | ||
head(namespace_handler::namespace_exists), | ||
) | ||
.route( | ||
"/namespace/:namespace", | ||
delete(namespace_handler::drop_namespace), | ||
) | ||
.route( | ||
"/namespace/:namespace/properties", | ||
post(namespace_handler::set_namespace_properties), | ||
); | ||
return router; | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,18 +1,44 @@ | ||
use axum::{ routing::{get, post, head, delete}, Router}; | ||
use crate::handlers::table_handler; | ||
use axum::{ | ||
routing::{delete, get, head, post}, | ||
Router, | ||
}; | ||
|
||
|
||
pub fn routes() -> Router<> { | ||
pub fn routes() -> Router { | ||
let router = Router::new() | ||
.route("/namespaces/:namespace/tables", get(table_handler::list_tables)) | ||
.route("/namespaces/:namespace/tables", post(table_handler::create_table)) | ||
.route("/namespaces/:namespace/register", post(table_handler::register_table)) | ||
.route("/namespaces/:namespace/tables/:table", get(table_handler::load_table)) | ||
.route("/namespaces/:namespace/tables/:table", delete(table_handler::delete_table)) | ||
.route("/namespaces/:namespace/tables/:table", head(table_handler::table_exists)) | ||
.route( | ||
"/namespaces/:namespace/tables", | ||
get(table_handler::list_tables), | ||
) | ||
.route( | ||
"/namespaces/:namespace/tables", | ||
post(table_handler::create_table), | ||
) | ||
.route( | ||
"/namespaces/:namespace/register", | ||
post(table_handler::register_table), | ||
) | ||
.route( | ||
"/namespaces/:namespace/tables/:table", | ||
get(table_handler::load_table), | ||
) | ||
.route( | ||
"/namespaces/:namespace/tables/:table", | ||
delete(table_handler::delete_table), | ||
) | ||
.route( | ||
"/namespaces/:namespace/tables/:table", | ||
head(table_handler::table_exists), | ||
) | ||
.route("/tables/rename", post(table_handler::rename_table)) | ||
.route("/namespaces/:namespace/tables/:table/metrics", post(table_handler::report_metrics)) | ||
.route("/namespaces/:namespace/tables/:table/find/:tuple_id", get(table_handler::find_tuple_location)); | ||
|
||
.route( | ||
"/namespaces/:namespace/tables/:table/metrics", | ||
post(table_handler::report_metrics), | ||
) | ||
.route( | ||
"/namespaces/:namespace/tables/:table/find/:tuple_id", | ||
get(table_handler::find_tuple_location), | ||
); | ||
|
||
return router; | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
|