use std::{path::Path, sync::Arc};
use neoengram_core::{LooseObjectStore, ObjectStore};
use serde::{Deserialize, Serialize};
#[derive(Debug, Clone, Copy, PartialEq, Eq, Serialize, Deserialize)]
#[serde(rename_all = "snake_case")]
pub(crate) enum ObjectStoreKind {
Loose,
}
pub(crate) fn open_object_store(
kind: ObjectStoreKind,
objects_root: &Path,
) -> Arc<dyn ObjectStore> {
match kind {
ObjectStoreKind::Loose => Arc::new(LooseObjectStore::new(objects_root.to_path_buf())),
}
}