//! Replaceable storage for opaque blob bytes. //! //! A blob store knows nothing about accounts, MIME types, or database rows. It //! receives a namespaced key and bytes. Implementations can therefore target a //! filesystem, object storage, an encrypted vault, or a test double without //! changing repository behavior. mod filesystem; mod memory; use async_trait::async_trait; use cid::Cid; use crate::error::Result; pub use filesystem::FileBlobStore; pub use memory::MemoryBlobStore; #[async_trait] pub trait BlobStore: Send + Sync { async fn put(&self, owner: &str, cid: &Cid, bytes: &[u8]) -> Result<()>; async fn get(&self, owner: &str, cid: &Cid) -> Result>>; async fn delete(&self, owner: &str, cid: &Cid) -> Result; }