use axum_extra::routing::TypedPath; use serde::{Deserialize, Serialize}; use ssh_key::Fingerprint; #[derive(TypedPath, Deserialize)] #[typed_path("/certs")] pub struct CertList; #[derive(TypedPath, Deserialize)] #[typed_path("/cert/:identifier")] pub struct GetCert { pub identifier: String, } #[derive(TypedPath, Deserialize)] #[typed_path("/certs/:pubkey_hash")] pub struct GetCertsPubkey { pub pubkey_hash: Fingerprint, } #[derive(Debug, Serialize, Deserialize, Default)] pub struct CertIds { pub ids: Vec, } #[derive(TypedPath, Deserialize)] #[typed_path("/cert/:identifier/info")] pub struct GetCertInfo { pub identifier: String, } #[derive(TypedPath, Deserialize)] #[typed_path("/cert/:identifier")] pub struct PostCertInfo { pub identifier: String, } #[derive(TypedPath)] #[typed_path("/cert")] pub struct PutCert;