sentri_core/generated/
invariants.rs1use once_cell::sync::Lazy;
3use serde::{Deserialize, Serialize};
4use std::collections::BTreeMap;
5
6#[derive(Debug, Clone, Serialize, Deserialize)]
7pub struct CompiledInvariant {
8 pub id: &'static str,
9 pub severity: &'static str,
10 pub chain: &'static str,
11 pub description: &'static str,
12 pub message: &'static str,
13}
14
15pub static INVARIANT_REGISTRY: Lazy<BTreeMap<&'static str, CompiledInvariant>> =
16 Lazy::new(BTreeMap::new);
17
18pub fn get_invariant(id: &str) -> Option<&'static CompiledInvariant> {
19 INVARIANT_REGISTRY.get(id)
20}
21
22pub fn invariants_for_chain(_chain: &str) -> Vec<&'static CompiledInvariant> {
23 vec![]
24}
25
26pub fn invariant_count() -> usize {
27 0
28}