minio-rsc

Rust Library for Minio.
The API is compliant with the Amazon S3 protocol.

Minio client

```rust use miniorsc::client::Minio; use miniorsc::provider::StaticProvider; use tokio;

[tokio::main]

async fn main() { let provider = StaticProvider::new("minio-access-key-test", "minio-secret-key-test", None); let minio = Minio::builder() .endpoint("localhost:9022") .provider(provider) .secure(false) .build() .unwrap(); let (buckets, owner) = minio.list_buckets().await.unwrap(); } ```

Operations

| Bucket operations | Object operations | |-|-| | makebucket | getobject | | listbuckets | fgetobject | | bucketexists | copyobject | | removebucket | statobject | | listobjects | removeobject | | getbuckettags | putobject | | setbuckettags | fputobject | | deletebuckettags | presignedgetobject | | getbucketversioning | presignedputobject | | setbucketversioning | isobjectlegalholdenabled | | getobjectlockconfig | enableobjectlegalholdenabled | | setobjectlockconfig | disableobjectlegalholdenabled | | deleteobjectlockconfig | getobjecttags | | | setobjecttags | | | deleteobjecttags | | | getobjectretention | | | putobject_retention | | | |

Features

Custom requests

Implemented by BaseExecutor

```rust use miniorsc::Minio; use hyper::Method; use miniorsc::errors::Result; use reqwest::Response; use bytes::Bytes;

async fn getobject(minio:Minio)-> Result { let executor = minio.executor(Method::GET); let res: Response = executor .bucketname("bucket") .objectname("test.txt") .query("versionId", "cdabf31a-9752-4265-b137-6b3961fbaf9b") .sendok() .await?; Ok(res) }

async fn putobject(minio:Minio, data:Bytes)-> Result<()> { let executor = minio.executor(Method::PUT); let res: Response = executor .bucketname("bucket") .objectname("test.txt") .body(data) .sendok() .await?; Ok(()) } ```