====================== Server Control ==================== Add a database to the server state.
(&self, name: &str)
| 522 | // ====================== Server Control ==================== |
| 523 | /// Add a database to the server state. |
| 524 | pub fn add_database(&self, name: &str) { |
| 525 | let mut s = self.inner.lock().unwrap(); |
| 526 | s.databases.entry(name.to_string()).or_insert_with(|| { |
| 527 | GetDatabaseResponse::new( |
| 528 | Some(name.to_string()), |
| 529 | Some(name.to_string()), |
| 530 | None, |
| 531 | HashMap::new(), |
| 532 | AuditRESTResponse::new(None, None, None, None, None), |
| 533 | ) |
| 534 | }); |
| 535 | } |
| 536 | /// Add a no-permission database to the server state. |
| 537 | pub fn add_no_permission_database(&self, name: &str) { |
| 538 | let mut s = self.inner.lock().unwrap(); |