pub struct UserPatternEntry {
pub id: String,
pub display_name: String,
pub format_regex: String,
pub severity: Severity,
pub provider_id: Option<String>,
pub retrieval_url_template: Option<String>,
pub default_expiry_days: Option<u32>,
pub scopes_hint: Vec<String>,
}Expand description
On-disk representation of a single user pattern. Mirrors the shape from ADR-023 §3.6.
Fields§
§id: StringStable identifier (lowercase kebab-case, see
is_kebab_id).
display_name: StringHuman-readable name shown in the metadata card and scan reports.
format_regex: StringRegex source. Compiled at load time; a malformed regex is a load error.
severity: SeveritySeverity. Lowercase tokens ("low", "medium", "high")
per the Severity serde shape.
provider_id: Option<String>Optional provider id ("github", "internal", …). When
either of provider_id or retrieval_url_template is set,
the loader produces a PatternMetadata for the resulting
pattern. The two fields are independent — a pattern can have
a retrieval URL without naming a provider, or vice versa.
retrieval_url_template: Option<String>Optional URL template the user opens to obtain a fresh value.
default_expiry_days: Option<u32>Optional default rotation cadence in days.
scopes_hint: Vec<String>Optional scope hints. Surfaced in the metadata card; does not validate.
Trait Implementations§
Source§impl Clone for UserPatternEntry
impl Clone for UserPatternEntry
Source§fn clone(&self) -> UserPatternEntry
fn clone(&self) -> UserPatternEntry
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read more