nexus_common/db/config/
neo4j.rs1use serde::{Deserialize, Serialize};
2
3pub const NEO4J_URI: &str = "bolt://localhost:7687";
4pub const NEO4J_USER: &str = "neo4j";
5pub const NEO4J_PASS: &str = "12345678";
6
7#[derive(Debug, Clone, Serialize, Deserialize, Eq, PartialEq)]
9pub struct Neo4JConfig {
10 pub uri: String,
11 #[serde(default = "default_neo4j_user")]
12 pub user: String,
13 pub password: String,
14}
15
16fn default_neo4j_user() -> String {
17 String::from("neo4j")
18}
19
20impl Default for Neo4JConfig {
21 fn default() -> Self {
22 Self {
23 uri: String::from(NEO4J_URI),
24 user: String::from(NEO4J_USER),
25 password: String::from(NEO4J_PASS),
26 }
27 }
28}