Skip to main content

git_sshripped_recipient_models/
lib.rs

1#![cfg_attr(feature = "fail-on-warnings", deny(warnings))]
2#![warn(clippy::all, clippy::pedantic, clippy::nursery, clippy::cargo)]
3#![allow(clippy::multiple_crate_versions)]
4
5#[derive(Debug, Clone, PartialEq, Eq, serde::Serialize, serde::Deserialize)]
6#[serde(rename_all = "SCREAMING_SNAKE_CASE")]
7pub enum RecipientSource {
8    LocalFile,
9    #[serde(alias = "GITHUB_KEYS_URL")]
10    LegacyGithubKeysUrl,
11    GithubKeys {
12        url: String,
13        username: Option<String>,
14    },
15}
16
17#[derive(Debug, Clone, PartialEq, Eq, serde::Serialize, serde::Deserialize)]
18pub struct RecipientKey {
19    pub fingerprint: String,
20    pub key_type: String,
21    pub public_key_line: String,
22    pub source: RecipientSource,
23}