15 releases
0.1.15 | Sep 23, 2024 |
---|---|
0.1.14 | Jul 23, 2024 |
0.1.12 | Jun 4, 2024 |
0.1.11 | May 7, 2024 |
0.1.4 | Jan 16, 2024 |
#264 in Asynchronous
128 downloads per month
5.5MB
1.5K
SLoC
minior
Ergonomic client for Minio, built on top of the aws_sdk_s3
crate.
Table of Contents
- Requirements
- Installation
- Documentation
- Usage
- Features
- Bug Reports
- Feature Requests
- Contributing
- Project Status
- License
Requirements
- Minio deployment:
- Rust (version 1.6+):
Installation
cargo add minior
Documentation
This README provides a general overview, but does not go over all methods available. Full crate documentation can be found here at docs.rs
Usage
Overview
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.
Basic Example
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(())
}
Features
pagination_iter
: gives access toObjectPaginationIter
to asynchronously paginate through objects for a bucket viacore::pagination_iter
orMinio::pagination_object_iter
.
Bug Reports
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 (If applicable)
Contributing
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.
Project Status
I plan to maintain this crate for the forseeable future.
License
MIT
See LICENSE.md
for more information
Dependencies
~32MB
~408K SLoC