| Crates.io | minior |
| lib.rs | minior |
| version | 0.1.16 |
| created_at | 2024-01-06 23:50:29.979673+00 |
| updated_at | 2025-03-15 22:39:55.08149+00 |
| description | Ergonomic Minio Client |
| homepage | |
| repository | https://gitlab.com/robertlopezdev/minior |
| max_upload_size | |
| id | 1091309 |
| size | 5,499,504 |
Ergonomic client for Minio, built on top of the aws_sdk_s3 crate.
cargo add minior
This README provides a general overview, but does not go over all methods available. Full crate documentation can be found here at docs.rs
The crate exposes a struct Minio that can be used to interface with all core modules, however core is public so feel free to interact with those methods directly.
use minior::Minio;
#[tokio::main]
async fn main() -> Result<(), Box<dyn std::error::Error>> {
// Construct a client
let minio = Minio::new("http://127.0.0.1:9000").await;
// Create a bucket
minio.create_bucket("sharks").await?;
// Upload a object
let file = tokio::fs::File::open("some file path").await?;
minio.upload_object(
"sharks",
"shark",
file,
None,
).await?;
// Get a Presigned URL for a get that expires in 1_337 seconds
let presigned_request = minio.get_object_presigned(
"sharks",
"shark",
1_337,
).await?;
// Delete a object
minio.delete_object(
"sharks",
"shark",
).await?;
// Delete a bucket
minio.delete_bucket(
"sharks",
true,
).await?;
Ok(())
}
pagination_iter: gives access to ObjectPaginationIter
to asynchronously paginate through objects for a bucket via core::pagination_iter or Minio::pagination_object_iter.Please report bugs by creating an issue, or if there is a sufficient fix you are aware of, feel free to open a PR.
Please provide any of the following if applicable:
Code examples
Error messages
Steps to reproduce
System information
I welcome anyone to contribute to the crate. All tests must pass, and the feature/change should make sense based on the current API allotted.
I plan to maintain this crate for the foreseeable future.
MIT
See LICENSE.md for more information