From 6b977533d6d59c2a7235576ad1898ae14ab837ad Mon Sep 17 00:00:00 2001 From: Dietmar Maurer Date: Thu, 2 Sep 2021 14:25:15 +0200 Subject: [PATCH] move remote config into pbs-config workspace --- pbs-api-types/src/lib.rs | 13 +++++++++++++ 1 file changed, 13 insertions(+) diff --git a/pbs-api-types/src/lib.rs b/pbs-api-types/src/lib.rs index aa0dd9a1..0aa9374c 100644 --- a/pbs-api-types/src/lib.rs +++ b/pbs-api-types/src/lib.rs @@ -58,6 +58,9 @@ pub use crypto::{CryptMode, Fingerprint}; pub mod file_restore; +mod remote; +pub use remote::*; + #[rustfmt::skip] #[macro_use] mod local_macros { @@ -132,6 +135,16 @@ pub const CIDR_V4_FORMAT: ApiStringFormat = ApiStringFormat::Pattern(&CIDR_V4_RE pub const CIDR_V6_FORMAT: ApiStringFormat = ApiStringFormat::Pattern(&CIDR_V6_REGEX); pub const CIDR_FORMAT: ApiStringFormat = ApiStringFormat::Pattern(&CIDR_REGEX); +pub const DNS_NAME_FORMAT: ApiStringFormat = + ApiStringFormat::Pattern(&DNS_NAME_REGEX); + +pub const DNS_NAME_OR_IP_FORMAT: ApiStringFormat = + ApiStringFormat::Pattern(&DNS_NAME_OR_IP_REGEX); + +pub const DNS_NAME_OR_IP_SCHEMA: Schema = StringSchema::new("DNS name or IP address.") + .format(&DNS_NAME_OR_IP_FORMAT) + .schema(); + pub const BACKUP_ID_SCHEMA: Schema = StringSchema::new("Backup ID.") .format(&BACKUP_ID_FORMAT) .schema();