api2/node/syslog.rs: add syslog api schema

This commit is contained in:
Dietmar Maurer
2019-01-25 17:17:30 +01:00
parent 68cacc0066
commit 4f9a726833
3 changed files with 75 additions and 2 deletions

View File

@ -35,5 +35,11 @@ macro_rules! IPRE { () => (concat!(r"(?:", IPV4RE!(), "|", IPV6RE!(), ")")) }
lazy_static! {
pub static ref IP_REGEX: Regex = Regex::new(IPRE!()).unwrap();
pub static ref SHA256_HEX_REGEX: Regex = Regex::new("^[a-f0-9]{64}$").unwrap();
pub static ref SHA256_HEX_REGEX: Regex =
Regex::new(r"^[a-f0-9]{64}$")
.unwrap();
pub static ref SYSTEMD_DATETIME_REGEX: Regex =
Regex::new(r"^\d{4}-\d{2}-\d{2}( \d{2}:\d{2}(:\d{2})?)?$")
.unwrap();
}