Skip to main content

Crate azalia_remi

Crate azalia_remi 

Source
Expand description

πŸ»β€β„οΈπŸͺš azalia-remi

Unified storage services for remi::StorageService of official crates


Β§πŸ»β€β„οΈπŸͺš azalia-remi

azalia-remi adds a unified storage service on top of remi-rs for allow configuring multiple storage services but only uses one from what the end user wants.

This uses Cargo’s crate features to implicitilly allow you to pick out which Remi-based crates to implement into your applications. You can use the features = ["all"] in your Cargo.toml’s definition of azalia-remi to include all crates.

Β§Example

// Cargo.toml:
//
// [dependencies]
// tokio = { version = "*", features = ["full"] }
// azalia-remi = { version = "^0", features = ["fs"] }

use azalia_remi::{
    StorageService,
    Config,

    core::StorageService as _,
    fs
};

let config = fs::StorageConfig {
    directory: "/data".into(),
};

let service = StorageService::Filesystem(fs::StorageService::with_config(config));
service.init().await.unwrap(); // initialize the fs version of remi

// do whatever you want

Re-exportsΒ§

pub use remi as core;
pub use remi_gridfs as gridfs;gridfs
pub use remi_azure as azure;azure
pub use remi_s3 as s3;s3
pub use remi_fs as fs;fs

EnumsΒ§

Config
Error
Error variant when using methods from StorageService.
StorageService
Represents a unified StorageService that can be either the following: