97 Commits

Author SHA1 Message Date
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
Alfred Mathew
d2afb4d3f6
wrap region map in Arc (#136) 2025-03-16 11:21:59 +01:00
Aditya Manthramurthy
c9172cf189
Remove deprecated downloads, uploads, and multipart API (#137)
Add From<&'static str> for ObjectContent and remove deprecated API
2025-03-14 21:39:24 +01: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
8ea83b45ae
Refactor bucket tags, bucket notification, and bucket replication (#132)
* refactor get-set-delete bucket notification

* refactor get-set-delete bucket notification

* refactor get-set-delete bucket notification
2025-03-12 12:44:45 -07: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
48da7630a9
refactor: split tests into separate files (#127) 2025-03-10 10:46:12 -07:00
Henk-Jan Lebbink
112c0aed1a
Refactor bucket-lifecycle, bucket-policy, bucket-encryption (#124)
* refactored from_s3response trait, and refactored get/set/delete policy

* * refactor set/get/delete bucket lifecycle

* refactored from_s3response trait,
* refactored get/set/delete bucket policy
* delete-bucket-encryption
2025-03-07 16:33:41 -08:00
Henk-Jan Lebbink
b2a6cb2655
Refactor bucket lifecycle (#121)
* bugfix & added example

* refactor set_bucket_lifecycle amd get_bucket_lifecycle
2025-03-03 17:41:04 -08: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
cba673a379
Refactor set_bucket_versioning (#114) 2025-02-20 17:52:07 -08:00
Henk-Jan Lebbink
1a77ca826d
refactored set_bucket_encrypion (#116) 2025-02-04 11:59:49 -08:00
Andre Natal
7ce9ad3594
Update README.md - dead links (#112) 2025-01-31 16:41:47 -08:00
Henk-Jan Lebbink
72401be3fb
added release notes automation (#111) 2025-01-31 16:41:36 -08:00
Henk-Jan Lebbink
e98264fa3d
Refactor get bucket encryption (#110) 2025-01-31 16:38:50 -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
vajexal
2ce4fefbc3
Respect content_type prop (#100) 2024-10-25 11:59:47 -07:00
Bala FA
b254b2f7ae
SignV4: trim leading/trailing spaces in header value (#99)
Signed-off-by: Bala.FA <bala@minio.io>
2024-09-12 09:23:41 -07:00
Aditya Manthramurthy
b19513c90f
Unexport unnecessary list functions (#97)
Unexports `list_objects_v1`, `list_objects_v2` and
`list_object_versions` and associated request/response types.

These are not necessary as the higher level `list_objects()` can be used
instead for equivalent functionality.
2024-06-18 19:54:01 -07:00
Aditya Manthramurthy
1d917a8b7a
Rename some exposed types (#96) 2024-06-18 13:55:01 -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
6f2dd62691
Size should be platform independent and 64 bit. (#93) 2024-06-17 12:42:12 -07:00
Shireesh Anjal
6e1af9166f
Make request_parameters optional (#91)
Some events e.g. s3:Replication:OperationCompletedReplication send
'null' value in request_parameters and the deserialization can fail in
such cases ('deault' doesn't help here)

Marking this field as optional will ensure that such events can also be
deserialized without any error.
2024-06-05 16:30:35 -07:00
Aditya Manthramurthy
af8193aa95
Add metadata and other options for CreateMultipart (#90)
- Add validation for user-metadata keys.

- Ensure that options are passed to both single part PutObject and
  Multipart upload when using the PutObjectContent higher level API.
2024-05-29 18:43:34 -07:00
Bala FA
18c5707a4a
fix range calculation in compose_object API (#87)
Signed-off-by: Bala.FA <bala@minio.io>
2024-05-29 12:52:33 -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
d5a648f03c
Add builder style remove_object(s) APIs (#85)
- remove older APIs
2024-04-12 18:21:32 -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
Kyle Davis
1a36097bb8
Add send and sync traits to dyn SSE (#83) 2024-04-09 14:02:28 -07:00
Aditya Manthramurthy
6d8031306e
Add file read/write ability to ObjectContent (#81) 2024-04-05 19:39:45 -07:00
Aditya Manthramurthy
220887f171
Fix missing module import (#80) 2024-04-02 18:29:52 -07:00
OlalalaO
de434ed179
Fix download file error (#69)
Fixed the error where the path does not exist when downloading files with paths like 'xxx/xxx/xxx/xxx.xx'.
2024-04-02 18:15:40 -07:00
Aditya Manthramurthy
e1542939b3
Clippy fixes (#79) 2024-04-03 06:45:19 +05:30
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
c672e7528b
Fix list objects xml parsing bug and improve perf. (#59)
For list-object-versions there was a bug that would return delete
markers after all versions of an object. The server response contains
the order of versions and delete markers according to recency and the
list objects client call should preserve this. This is fixed in this
change.

XML parsing was using the `take_child` call, that mutates a vector
removing an element in it. For a response containing N items, using
take_child on item, causes the XML parsing cost to be O(N^2) (so 1
million operations for a 1000 item list) - this change makes the parsing
cost linear.
2024-04-03 06:33:37 +05:30
Aditya Manthramurthy
35954da61d
Add builders for bucket methods: (#76)
- list buckets
- get bucket versioning
2024-04-03 06:29:40 +05:30
Aditya Manthramurthy
6a34d4c677
Add builder for ListenBucketNotification (#75)
- Also update the types used in NotificationRecords
2024-04-03 06:25:38 +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
8fb211ae0e
Add streaming APIs for list objects (#54) 2023-10-05 09:46:44 +05:30
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