systemprompt-models 0.21.1

Foundation data models for systemprompt.io AI governance infrastructure. Shared DTOs, config, and domain types consumed by every layer of the MCP governance pipeline.
Documentation
1
2
3
4
5
6
7
8
9
10
11
12
13
//! Config validation error collection types.
//!
//! Copyright (c) systemprompt.io — Business Source License 1.1.
//! See <https://systemprompt.io> for licensing details.

use crate::errors::ConfigError;

pub fn validate_postgres_url(url: &str) -> Result<(), ConfigError> {
    if !url.starts_with("postgres://") && !url.starts_with("postgresql://") {
        return Err(ConfigError::InvalidPostgresUrl);
    }
    Ok(())
}