Skip to main content

Crate autumn_storage_s3

Crate autumn_storage_s3 

Source
Expand description

S3-compatible BlobStore plugin for autumn-web.

§Quick start

[dependencies]
autumn-web     = { version = "0.3", features = ["storage", "multipart"] }
autumn-storage-s3 = "0.3"
ⓘ
use autumn_storage_s3::S3BlobStore;

#[tokio::main]
async fn main() {
    let config = autumn_web::config::TomlEnvConfigLoader::new()
        .load()
        .await
        .expect("failed to load config");

    let store = S3BlobStore::from_config(&config.storage.s3)
        .await
        .expect("failed to build S3 store");

    autumn_web::app()
        .with_blob_store(store)
        .run()
        .await;
}

Structs§

S3BlobStore
S3-compatible BlobStore backed by aws-sdk-s3.

Enums§

S3BlobStoreError
Errors returned during S3BlobStore construction.