- Introduced corex-storage crate with support for local disk, S3-compatible, and Google Cloud Storage backends. - Implemented StorageDriver trait for various storage backends. - Added LocalFileStorage for local disk operations. - Added S3Storage for S3-compatible object storage with multipart upload support. - Added GcsStorage for Google Cloud Storage operations. - Included error handling for storage operations. - Added tests for each storage backend to ensure functionality. - Created README.md for documentation and usage examples. - Added Apache and MIT licenses for open-source compliance.
45 lines
1.6 KiB
TOML
45 lines
1.6 KiB
TOML
[package]
|
|
name = "corex-storage"
|
|
version = "1.2.0"
|
|
edition = "2021"
|
|
rust-version = "1.75"
|
|
license = "MIT OR Apache-2.0"
|
|
repository = "https://github.com/asepharyana/mytheclipse"
|
|
homepage = "https://github.com/asepharyana/mytheclipse"
|
|
documentation = "https://docs.rs/corex-storage"
|
|
authors = ["asepharyana <superaseph@gmail.com>"]
|
|
description = "Unified storage & file system abstraction: one driver interface over Local Disk, S3/MinIO, and Google Cloud Storage, with stream-based upload/download."
|
|
readme = "README.md"
|
|
keywords = ["storage", "s3", "gcs", "minio", "filesystem"]
|
|
categories = ["filesystem", "asynchronous"]
|
|
|
|
[features]
|
|
default = ["local"]
|
|
# The core `StorageDriver` trait (always compiled) needs `tokio`'s io-util for
|
|
# `AsyncRead`/`ReadBuf`; `local` additionally needs `fs`/`rt`.
|
|
local = ["tokio/fs", "tokio/rt"]
|
|
# S3-compatible object storage (also covers MinIO via a custom endpoint).
|
|
s3 = ["dep:aws-sdk-s3", "dep:aws-config", "dep:aws-credential-types"]
|
|
# Google Cloud Storage.
|
|
gcs = ["dep:google-cloud-storage", "dep:google-cloud-auth"]
|
|
|
|
[dependencies]
|
|
tracing = "0.1"
|
|
# Required unconditionally: the core `StorageDriver` trait uses both.
|
|
async-trait = "0.1"
|
|
tokio = { version = "1.53", features = ["io-util"] }
|
|
bytes = "1"
|
|
|
|
# S3 / MinIO
|
|
aws-sdk-s3 = { version = "1", optional = true }
|
|
aws-config = { version = "1", optional = true, features = ["behavior-version-latest"] }
|
|
aws-credential-types = { version = "1", optional = true }
|
|
|
|
# Google Cloud Storage
|
|
google-cloud-storage = { version = "0.24", optional = true }
|
|
google-cloud-auth = { version = "0.17", optional = true }
|
|
|
|
[dev-dependencies]
|
|
tokio = { version = "1.53", features = ["full"] }
|
|
tempfile = "3"
|