Skip to main content

nexus_common/db/config/
mod.rs

1use serde::{Deserialize, Serialize};
2use std::fmt::Debug;
3
4mod neo4j;
5pub use neo4j::Neo4JConfig;
6
7pub const REDIS_URI: &str = "redis://localhost:6379";
8
9#[derive(Debug, Clone, Serialize, Deserialize, Eq, PartialEq)]
10pub struct DatabaseConfig {
11    pub redis: String,
12    pub neo4j: Neo4JConfig,
13}
14
15impl Default for DatabaseConfig {
16    fn default() -> Self {
17        Self {
18            redis: String::from(REDIS_URI),
19            neo4j: Neo4JConfig::default(),
20        }
21    }
22}