Skip to content

Commit

Permalink
Make Catalog config section optional
Browse files Browse the repository at this point in the history
  • Loading branch information
gruuya committed Jun 19, 2024
1 parent 5c29a81 commit c1e3926
Showing 1 changed file with 11 additions and 0 deletions.
11 changes: 11 additions & 0 deletions src/config/schema.rs
Original file line number Diff line number Diff line change
Expand Up @@ -42,6 +42,7 @@ pub const MEBIBYTES: u64 = 1024 * 1024;
#[derive(Deserialize, Debug, PartialEq, Eq, Clone)]
pub struct SeafowlConfig {
pub object_store: Option<ObjectStore>,
#[serde(default)]
pub catalog: Catalog,
#[serde(default)]
pub frontend: Frontend,
Expand Down Expand Up @@ -178,6 +179,16 @@ pub enum Catalog {
Clade(Clade),
}

impl Default for Catalog {
fn default() -> Self {
Catalog::Sqlite(Sqlite {
dsn: ":memory:".to_string(),
journal_mode: Default::default(),
read_only: false,
})
}
}

#[derive(Deserialize, Debug, PartialEq, Eq, Clone)]
pub struct Postgres {
pub dsn: String,
Expand Down

0 comments on commit c1e3926

Please sign in to comment.