ailake_store/lib.rs
1// SPDX-License-Identifier: MIT OR Apache-2.0
2//! ailake-store — object storage abstraction
3//!
4//! Thin wrapper over object_store crate.
5//! The get_range method is critical for partial S3 reads of the HNSW footer.
6//!
7//! ## Quick start
8//!
9//! Use `store_from_url` for env-based auth, or the typed builders for explicit credentials:
10//!
11//! ```rust,ignore
12//! // URL-based (env credentials)
13//! let store = ailake_store::store_from_url("s3://my-bucket/warehouse/my_table")?;
14//!
15//! // Explicit static credentials (dev / CI)
16//! use ailake_store::s3::{s3_store, S3Config, S3Credentials};
17//! let store = s3_store(S3Config {
18//! bucket: "my-bucket".into(),
19//! region: "us-east-1".into(),
20//! endpoint: None,
21//! allow_http: false,
22//! credentials: S3Credentials::Static {
23//! access_key_id: "AKIA...".into(),
24//! secret_access_key: "secret".into(),
25//! session_token: None,
26//! },
27//! }, "warehouse/my_table/")?;
28//! ```
29
30pub mod from_url;
31pub mod local;
32pub mod object_store_backend;
33pub mod store;
34
35#[cfg(feature = "store-azure")]
36pub mod azure;
37#[cfg(feature = "store-gcs")]
38pub mod gcs;
39#[cfg(feature = "store-s3")]
40pub mod s3;
41
42pub use from_url::store_from_url;
43pub use local::LocalStore;
44pub use object_store_backend::ObjectStoreBackend;
45pub use store::Store;
46
47#[cfg(feature = "store-azure")]
48pub use azure::{azure_store, AzureConfig, AzureCredentials};
49#[cfg(feature = "store-gcs")]
50pub use gcs::{gcs_store, GcsConfig, GcsCredentials};
51#[cfg(feature = "store-s3")]
52pub use s3::{s3_store, S3Config, S3Credentials};