feat(config): Add ApiToken newtype

This commit is contained in:
Paul Campbell 2024-04-08 11:48:35 +01:00
parent abbd2e66e6
commit 3c4a0d52b1

View file

@ -127,6 +127,13 @@ impl Display for User {
} }
} }
#[derive(Clone, Debug, PartialEq, Eq)] #[derive(Clone, Debug, PartialEq, Eq)]
pub struct ApiToken(pub String);
impl Display for ApiToken {
fn fmt(&self, f: &mut Formatter<'_>) -> std::fmt::Result {
write!(f, "{}", self.0)
}
}
#[derive(Clone, Debug, PartialEq, Eq)]
pub struct ForgeDetails { pub struct ForgeDetails {
pub name: ForgeName, pub name: ForgeName,
pub forge_type: ForgeType, pub forge_type: ForgeType,