53 Commits

Author SHA1 Message Date
Henk-Jan Lebbink
f4b4c9086d
feat: add request hooks infrastructure (#188)
Adds RequestHooks trait to enable intercepting and modifying S3 API
  requests at key points in the request lifecycle. This enables implementing
  cross-cutting concerns like load balancing, telemetry, and debug logging
  without modifying the core request handling logic.

---------

Co-authored-by: Tobias Pütz <tobias@minio.io>
2025-11-10 14:39:12 +01:00
Henk-Jan Lebbink
e16d6d40cf
Use TypedBuilder derive macro for S3 API request builders (#184)
Adopt the typed-builder crate throughout the S3 API to provide compile-time
validation of builder patterns. This change improves type safety and developer
experience when constructing S3 API requests.
2025-10-16 23:06:45 +02:00
Henk-Jan Lebbink
25d424b97f
Fixed clippy issues and cleanup of unnecessary imports (#182) 2025-08-26 11:04:51 +02:00
Henk-Jan Lebbink
5080bf9b85
Refactor/cleanup errors (#179)
* error refactored: moved to thiserror
* Result type alias for better ergonomics:
* removed field from MinioErrorCode::BucketNotEmpty enum
* made field private of MinioErrorResponse
* updated XmlError
* simplified calling errors
* bumped toolchain channel form 1.86.0 to 1.87.0
* bumped toolchain channel form 1.87.0 to 1.88.0 due to clippy fixes that are not compatible with 1.87.0
2025-08-14 21:31:45 -07:00
iTrooz
e73fa1019c
fix: allow to use rustls while also using sha2 and hmac (#175) 2025-08-12 19:55:41 +02:00
Henk-Jan Lebbink
e244229490
tests cleanup; cargo clippy fixes, minor doc updates (#177)
* Tests cleanup; cargo clippy fixes, minor doc updates
* updated label checker workflow
2025-07-11 11:08:22 +02:00
Tobias Pütz
8497fdb4ba
feat: add a test macro (#170) 2025-06-23 13:38:40 +02:00
Henk-Jan Lebbink
6f904b452a
moved Tokio runtime from general dependency to dev dependency (#167)
* moved Tokio runtime from general dependency to dev dependency
* reduced number of worker threads in tests
2025-06-18 11:26:29 +02:00
Henk-Jan Lebbink
9cbb95747f
Fixed doc warnings; fixed minor issue with trait separation in append_object (#160)
* minor issues fixed: bucket and object impl trait separated

* fixed doc warnings

* added CI, docs build and docs site to the initial icons

* inline doc updated

* more doc update

* bumped versions
2025-05-28 11:43:08 -07:00
Aditya Manthramurthy
621669cd7d
Release v0.2.0 (#156) 2025-05-21 16:01:36 -07:00
Henk-Jan Lebbink
58d9203153
refactored all functions (#145)
* refactored stat_object

refactored select_object_content

refactor get_presigned_object_url

refactor get_presigned_policy_form_data

refactored upload-part-copy

* fixed object.unwrap

* update region

* made client Arc

* made client Arc

* update client

* update tests

* update segmented_bytes

* bench updated

* cleanup version handling

* cleanup of headers: multimap

* added inner in Client

* updated clients: added Into<String>in API

* Separated http_client and shared client items in Client
2025-04-23 10:18:18 -07:00
Henk-Jan Lebbink
f23572dce8
added benchmarks (#142) 2025-03-29 15:26:11 -07:00
Alfred Mathew
b26ed09e42
optimize: use ring hash and hmac implementations as an opt-in feature (#141)
Defaults to sha2 and hmac.
2025-03-22 11:30:37 +01:00
Henk-Jan Lebbink
ddec540b22
Refactor object lock config, retention, tags (#140)
* refactor make-bucket, bucket_exists, remove_bucket

* refactor disable-object-legal-hold, enable-object-legal-hold, is-object-legal-hold-enabled
2025-03-21 09:25:06 -07:00
Aditya Manthramurthy
46bda8f960
Remove os_info dep (#133)
os_info is too heavy, for the purposes of this library using the consts
in std::env are enough

Fixes #107
2025-03-13 08:09:31 +01:00
Henk-Jan Lebbink
8134acdd09
Bumped rust edition from 2021 to 2024. Only change is some include sorting (#128) 2025-03-11 12:09:43 -07:00
Henk-Jan Lebbink
c4e302dda7
refactored tests into 24 separate tests (#118)
* cleanup remove_bucket_helper

* update TextContext creation

* update tests
2025-02-28 12:42:14 -08:00
Henk-Jan Lebbink
1a77ca826d
refactored set_bucket_encrypion (#116) 2025-02-04 11:59:49 -08:00
jeasai
26d67b80df
Fix object download to file (#105)
The ObjectContent::to_file() function was not working properly,
as it could not write in a temporary file (created with tokio::fs::File::open(),
which opens a file in read-only mode).

To solve this issue, modified the way temporary files are opened to be
able to write inside of it.

* Add an example to download a file

This new example demonstrates how to download an object and store its
content into a file.

---------

Co-authored-by: Henk-Jan Lebbink <henkjan.lebbink@gmail.com>
Co-authored-by: Jean Sainctavit <jean.sainctavit@qarnot-computing.com>
2025-01-23 23:42:40 +01:00
Henk-Jan Lebbink
0438f044ff
Added object_prompt support (#109) 2025-01-23 09:56:29 -08:00
Henk-Jan Lebbink
8facff7bad
fixed clippy issues (#106) 2024-12-14 19:31:51 -08:00
Aditya Manthramurthy
c28f576cb8
Update deps (#104) 2024-11-04 14:38:36 -08:00
Aditya Manthramurthy
903acae66a
feat: allow multiple trust certs in cert file (#102)
The `.ssl_cert_file()` option now can read files with multiple
certificate to trust. This is useful when using a single client instance
to access many minio servers.
2024-10-28 10:51:13 -07:00
Yao Zongyou
eae650296b
feat: add cargo features for tls options (#61)
Adds features to switch native-tls, rustls-tls or disable tls at all
2024-10-25 12:09:42 -07:00
Aditya Manthramurthy
b0d31e1126
Apply many clippy fixes (#95) 2024-06-18 12:25:26 -07:00
Aditya Manthramurthy
c80e4c42a1
Update http and hyper deps (#94) 2024-06-17 15:18:44 -07:00
Aditya Manthramurthy
43af36441a
fix: missing URL encoding for object names (#86)
URL encoding for S3 API requires that we do not encode '/' in addition
to the standard characters (`_-~.` and alphanumerics).

Also fixes a bug in error response parsing (bucket name was not parsed
correctly).

Also adds another put-object example accepting CLI args.
2024-04-26 10:06:27 -07:00
Aditya Manthramurthy
773ad9133f
Return size info in put/get APIs (#82)
Also:

- fix some constraints to allow ObjectContent to be sent across async
tasks.

- use new Size enum instead of Option for specifying object content
sizes

- add tests for part size calculation and validations
2024-04-10 07:51:42 -07:00
Aditya Manthramurthy
6d8031306e
Add file read/write ability to ObjectContent (#81) 2024-04-05 19:39:45 -07:00
Aditya Manthramurthy
54b671ef4c
Add new put and get APIs for objects (#78)
- put_object_content -> streaming object uploads

- put_object_from_file -> upload file

- put_object, create_multipart_uload, abort_multipart_upload,
upload_part, complete_multipart_upload -> S3 APIs for single and
multipart uploads

- get_object -> streaming object downloads
2024-04-03 06:39:54 +05:30
Aditya Manthramurthy
3f160cb6c0
Parse and add tags to list objects output type (#77) 2024-04-03 06:36:53 +05:30
Aditya Manthramurthy
fc20535f1d
Add builder style for list_objects (#74)
- Also add `include_user_metadata` option for list object versions
2024-04-03 06:09:40 +05:30
Henk-Jan Lebbink
75ea23aaf1
fix deprecated lifetime; update example file-uploader (#71)
* fix: deprecated elided_lifetimes_in_associated_constant

* fix warnings

* update: example file-file-uploader
2024-03-15 09:24:44 -07:00
Aditya Manthramurthy
17a6dead9c
Add streaming support to listen_bucket_notification() API (#55) 2023-10-03 22:37:52 +05:30
Aditya Manthramurthy
c63d3f9350
Add doc for list_objects API (#53) 2023-09-29 21:52:38 +05:30
Aditya Manthramurthy
8ecabea0d2
fix: Set user agent always (#52) 2023-09-27 21:34:06 +05:30
Aditya Manthramurthy
e5f6b16051
Add file-uploader example (#49)
Also add some basic fields to Cargo.toml to prepare for initial release.
2023-09-26 10:43:05 -07:00
Bala FA
aee702f337
Reuse reqwest::Client connection pool (#44)
Signed-off-by: Bala.FA <bala@minio.io>
2023-09-07 06:21:01 +05:30
Bala FA
bbc7945eb8
Simplify code using clippy (#38)
Signed-off-by: Bala.FA <bala@minio.io>
2023-09-06 07:52:31 +05:30
Bala FA
f4cadad6ef
list_objects(): fix user metadata as per MinIO server (#30)
Signed-off-by: Bala.FA <bala@minio.io>
2023-06-04 14:22:11 -07:00
Bala FA
c5f8f61bdf
Add compose_object() API (#20)
Signed-off-by: Bala.FA <bala@minio.io>
2022-09-04 20:11:02 -07:00
Bala FA
c21dda1492
Add listen_bucket_notification() API (#15)
Signed-off-by: Bala.FA <bala@minio.io>
2022-08-31 08:20:33 -07:00
Harshavardhana
f88c9dd919
add SSL_CERT_FILE support, add into tests (#18) 2022-08-24 20:02:23 -07:00
Bala FA
0fb80e1456
Refactor S3 client implementation (#13)
Added below S3 APIs

* abort_multipart_upload()
* bucket_exists()
* complete_multipart_upload()
* create_multipart_upload()
* get_object()
* list_buckets()
* list_objects_v1()
* list_objects_v2()
* list_object_versions()
* list_objects()
* make_bucket()
* put_object()
* put_object_api()
* remove_bucket()
* remove_object()
* remove_objects_api()
* remove_objects()
* select_object_content()
* stat_object()
* upload_part()

Signed-off-by: Bala.FA <bala@minio.io>
2022-08-20 15:10:11 -07:00
Daniel Valdivia
91ad6401c3
Parse XML Errors. (#11) 2021-03-25 13:31:38 -07:00
Daniel Valdivia
891d050e35 Move to debug! instead of println! (#7) 2019-07-10 09:56:11 -07:00
Daniel Valdivia
128ecb871f Add listen bucket notification (#3) 2019-06-24 17:04:27 -07:00
Krishnan Parthasarathi
fe8d248fed Add make_bucket api 2019-06-04 17:05:52 -07:00
Aditya Manthramurthy
035fced940 Use roxmltree for parsing 2019-05-30 16:41:03 -07:00
Aditya Manthramurthy
d91cdcf02c Parse region from xml resp for get_bucket_location 2019-05-30 15:13:35 -07:00