Sort paths alphabetically

This commit is contained in:
Joscha 2024-05-11 22:18:23 +02:00
parent cf590046e9
commit 99576a9209

View file

@ -10,12 +10,14 @@ use serde::Deserialize;
pub struct PathIndex {}
#[derive(Deserialize, TypedPath)]
#[typed_path("/graph/")]
pub struct PathGraph {}
#[typed_path("/commit/:hash")]
pub struct PathCommitByHash {
pub hash: String,
}
#[derive(Deserialize, TypedPath)]
#[typed_path("/graph/metrics")]
pub struct PathGraphMetrics {}
#[typed_path("/graph/")]
pub struct PathGraph {}
#[derive(Deserialize, TypedPath)]
#[typed_path("/graph/commits")]
@ -26,12 +28,12 @@ pub struct PathGraphCommits {}
pub struct PathGraphMeasurements {}
#[derive(Deserialize, TypedPath)]
#[typed_path("/queue/")]
pub struct PathQueue {}
#[typed_path("/graph/metrics")]
pub struct PathGraphMetrics {}
#[derive(Deserialize, TypedPath)]
#[typed_path("/queue/inner")]
pub struct PathQueueInner {}
#[typed_path("/queue/")]
pub struct PathQueue {}
#[derive(Deserialize, TypedPath)]
#[typed_path("/queue/delete/:hash")]
@ -40,10 +42,8 @@ pub struct PathQueueDelete {
}
#[derive(Deserialize, TypedPath)]
#[typed_path("/commit/:hash")]
pub struct PathCommitByHash {
pub hash: String,
}
#[typed_path("/queue/inner")]
pub struct PathQueueInner {}
#[derive(Deserialize, TypedPath)]
#[typed_path("/run/:id")]
@ -51,20 +51,40 @@ pub struct PathRunById {
pub id: String,
}
#[derive(Deserialize, TypedPath)]
#[typed_path("/test")]
pub struct PathTest {}
#[derive(Deserialize, TypedPath)]
#[typed_path("/worker/:name")]
pub struct PathWorkerByName {
pub name: String,
}
#[derive(Deserialize, TypedPath)]
#[typed_path("/test")]
pub struct PathTest {}
///////////////////
// Admin actions //
///////////////////
#[derive(Deserialize, TypedPath)]
#[typed_path("/admin/queue/add")]
pub struct PathAdminQueueAdd {}
#[derive(Deserialize, TypedPath)]
#[typed_path("/admin/queue/add_batch")]
pub struct PathAdminQueueAddBatch {}
#[derive(Deserialize, TypedPath)]
#[typed_path("/admin/queue/decrease")]
pub struct PathAdminQueueDecrease {}
#[derive(Deserialize, TypedPath)]
#[typed_path("/admin/queue/delete")]
pub struct PathAdminQueueDelete {}
#[derive(Deserialize, TypedPath)]
#[typed_path("/admin/queue/increase")]
pub struct PathAdminQueueIncrease {}
#[derive(Deserialize, TypedPath)]
#[typed_path("/admin/refs/track")]
pub struct PathAdminRefsTrack {}
@ -77,33 +97,15 @@ pub struct PathAdminRefsUntrack {}
#[typed_path("/admin/refs/update")]
pub struct PathAdminRefsUpdate {}
#[derive(Deserialize, TypedPath)]
#[typed_path("/admin/queue/add")]
pub struct PathAdminQueueAdd {}
#[derive(Deserialize, TypedPath)]
#[typed_path("/admin/queue/add_batch")]
pub struct PathAdminQueueAddBatch {}
#[derive(Deserialize, TypedPath)]
#[typed_path("/admin/queue/delete")]
pub struct PathAdminQueueDelete {}
#[derive(Deserialize, TypedPath)]
#[typed_path("/admin/queue/increase")]
pub struct PathAdminQueueIncrease {}
#[derive(Deserialize, TypedPath)]
#[typed_path("/admin/queue/decrease")]
pub struct PathAdminQueueDecrease {}
/////////
// Api //
/////////
#[derive(Deserialize, TypedPath)]
#[typed_path("/api/worker/status")]
pub struct PathApiWorkerStatus {}
#[typed_path("/api/worker/bench_repo/:hash/tree.tar.gz")]
pub struct PathApiWorkerBenchRepoByHashTreeTarGz {
pub hash: String,
}
#[derive(Deserialize, TypedPath)]
#[typed_path("/api/worker/repo/:hash/tree.tar.gz")]
@ -112,7 +114,5 @@ pub struct PathApiWorkerRepoByHashTreeTarGz {
}
#[derive(Deserialize, TypedPath)]
#[typed_path("/api/worker/bench_repo/:hash/tree.tar.gz")]
pub struct PathApiWorkerBenchRepoByHashTreeTarGz {
pub hash: String,
}
#[typed_path("/api/worker/status")]
pub struct PathApiWorkerStatus {}