diff options
Diffstat (limited to 'server/src/api_model.rs')
| -rw-r--r-- | server/src/api_model.rs | 35 |
1 files changed, 35 insertions, 0 deletions
diff --git a/server/src/api_model.rs b/server/src/api_model.rs index 2dc20f1..f062935 100644 --- a/server/src/api_model.rs +++ b/server/src/api_model.rs @@ -201,3 +201,38 @@ pub struct StatusResponse { )] pub error: Option<&'static str>, } + +#[derive(Debug, Deserialize, PartialEq, Serialize, ToSchema)] +pub struct UserKey { + #[schema(example = 1u64)] + pub id: u64, + #[schema(example = "ssh-rsa")] + pub kind: String, + #[schema(example = "AAAAfoobar==")] + pub data: String, + #[schema(example = "user@host 1970-01-01")] + pub comment: String, +} + +#[derive(Deserialize, Serialize, ToSchema)] +pub struct UserKeyData<'r> { + #[schema(example = "ssh-rsa")] + pub kind: &'r str, + #[schema(example = "AAAAfoobar==")] + pub data: &'r str, + #[schema(example = "user@host 1970-01-01")] + pub comment: Option<&'r str>, +} + +#[derive(Deserialize, Serialize, ToSchema)] +pub struct UserKeys { + #[schema(example = 0u32)] + pub offset: u32, + #[schema(example = 10u32)] + pub limit: u32, + #[schema(example = 2u32)] + pub total_count: u32, + #[schema(example = false)] + pub more: bool, + pub keys: Vec<UserKey>, +} |
