aboutsummaryrefslogtreecommitdiff
path: root/src/api/s3_list.rs
Commit message (Collapse)AuthorAgeFilesLines
* Fix some new clippy lintsfix-resyncAlex Auvolat2022-03-141-3/+3
|
* Implement ListPartsQuentin Dufour2022-01-211-4/+370
|
* Add date verification to presigned urls (#196)trinity-1686a2022-01-181-1/+1
| | | | | | | | | | fix #96 fix #162 by returning Forbidden instead Bad Request Co-authored-by: Trinity Pointard <trinity.pointard@gmail.com> Reviewed-on: https://git.deuxfleurs.fr/Deuxfleurs/garage/pulls/196 Co-authored-by: trinity-1686a <trinity.pointard@gmail.com> Co-committed-by: trinity-1686a <trinity.pointard@gmail.com>
* Add quotes in returned etagsimprove-copiesAlex Auvolat2022-01-131-1/+1
|
* Implement ListMultipartUploads (#171)Quentin2022-01-121-238/+934
| | | | | | | | | | | | | | | | | | | | | | | Implement ListMultipartUploads, also refactor ListObjects and ListObjectsV2. It took me some times as I wanted to propose the following things: - Using an iterator instead of the loop+goto pattern. I find it easier to read and it should enable some optimizations. For example, when consuming keys of a common prefix, we do many [redundant checks](https://git.deuxfleurs.fr/Deuxfleurs/garage/src/branch/main/src/api/s3_list.rs#L125-L156) while the only thing to do is to [check if the following key is still part of the common prefix](https://git.deuxfleurs.fr/Deuxfleurs/garage/src/branch/feature/s3-multipart-compat/src/api/s3_list.rs#L476). - Try to name things (see ExtractionResult and RangeBegin enums) and to separate concerns (see ListQuery and Accumulator) - An IO closure to make unit tests possibles. - Unit tests, to track regressions and document how to interact with the code - Integration tests with `s3api`. In the future, I would like to move them in Rust with the aws rust SDK. Merging of the logic of ListMultipartUploads and ListObjects was not a goal but a consequence of the previous modifications. Some points that we might want to discuss: - ListObjectsV1, when using pagination and delimiters, has a weird behavior (it lists multiple times the same prefix) with `aws s3api` due to the fact that it can not use our optimization to skip the whole prefix. It is independant from my refactor and can be tested with the commented `s3api` tests in `test-smoke.sh`. It probably has the same weird behavior on the official AWS S3 implementation. - Considering ListMultipartUploads, I had to "abuse" upload id marker to support prefix skipping. I send an `upload-id-marker` with the hardcoded value `include` to emulate your "including" token. - Some ways to test ListMultipartUploads with existing software (my tests are limited to s3api for now). Co-authored-by: Quentin Dufour <quentin@deuxfleurs.fr> Reviewed-on: https://git.deuxfleurs.fr/Deuxfleurs/garage/pulls/171 Co-authored-by: Quentin <quentin@dufour.io> Co-committed-by: Quentin <quentin@dufour.io>
* New model for bucketsAlex Auvolat2022-01-041-3/+5
|
* add proper request router for s3 api (#163)trinity-1686a2021-12-061-27/+1
| | | | | | | | | | | | | fix #161 Current request router was organically grown, and is getting messier and messier with each addition. This router cover exaustively existing API endpoints (with exceptions listed in [#161(comment)](https://git.deuxfleurs.fr/Deuxfleurs/garage/issues/161#issuecomment-1773) either because new and old api endpoint can't feasabily be differentied, or it's more lambda than s3). Co-authored-by: Trinity Pointard <trinity.pointard@gmail.com> Reviewed-on: https://git.deuxfleurs.fr/Deuxfleurs/garage/pulls/163 Reviewed-by: Alex <alex@adnab.me> Co-authored-by: trinity-1686a <trinity.pointard@gmail.com> Co-committed-by: trinity-1686a <trinity.pointard@gmail.com>
* WIP: try to fix #93, and improve S3 ListObjects (v1 and v2) API callsAlex Auvolat2021-10-111-58/+160
|
* Improved XML serializationbetter_xmlAlex Auvolat2021-05-061-96/+51
| | | | | | - Use quick_xml and serde for all XML response returned by the S3 API. - Include tests for all structs used to generate XML - Remove old manual XML escaping function which was unsafe
* fix clippy warnings on apiTrinity Pointard2021-05-031-4/+7
|
* Time and metadata improvementsAlex Auvolat2021-03-151-4/+2
|
* Fix list API bugAlex Auvolat2021-03-151-1/+1
|
* Cargo fmtAlex Auvolat2021-02-231-4/+14
|
* add application/xml header and missing xml escapesAlex Auvolat2021-02-191-1/+3
|
* Implement ListObjectsV2Alex Auvolat2021-02-191-42/+148
|
* Fix S3 ListObjects result and replace println!s by debug!s0.1.1bAlex Auvolat2021-01-161-3/+3
|
* Improved compatibility on list API callAlex Auvolat2020-12-061-11/+25
|
* Slight refactoring to make things clearer with DeletedFilterAlex Auvolat2020-11-201-1/+3
|
* Simplify and_then(Some) as map() and remove moveAlex Auvolat2020-11-111-1/+1
|
* Replace with option syntaxic sugarQuentin2020-11-111-4/+3
|
* cargo fmtAlex Auvolat2020-07-081-5/+9
|
* Migrate S3 api to use new modelAlex Auvolat2020-07-081-1/+7
|
* Update to Hyper 0.13.6 that accepts non-Sync streams in wrap_stream.Alex Auvolat2020-07-071-4/+3
| | | | Simplifies code and makes it possible to publish on crates.io
* Rename garage_core to garage_modelAlex Auvolat2020-07-071-1/+1
|
* Implement HTTP ranges in getAlex Auvolat2020-05-041-6/+6
|
* Implement DeleteObjectsAlex Auvolat2020-05-011-7/+12
|
* Slightly improved S3 compatibilityAlex Auvolat2020-05-011-5/+14
| | | | | | | | - ListBucket does not require any of the parameters (delimiter, prefix, max-keys, etc) - URLs are properly percent_decoded - PutObject and DeleteObject calls now answer correctly (empty body, version id in the x-amz-version-id: header)
* Compatibility fixesAlex Auvolat2020-04-281-2/+4
|
* Work on APIAlex Auvolat2020-04-281-3/+16
|
* Implement multipart uploadsAlex Auvolat2020-04-261-6/+0
|
* Prepare for multipart uploadsAlex Auvolat2020-04-261-9/+6
|
* S3 compatibility: fix bucket listing and HEAD and PUT on bucketAlex Auvolat2020-04-261-29/+34
|
* Remove leading / in keys; better delimiter handlingAlex Auvolat2020-04-241-3/+7
|
* Less verbosityAlex Auvolat2020-04-241-3/+1
|
* xml escapeAlex Auvolat2020-04-241-2/+8
|
* Some basic S3 functionnalityAlex Auvolat2020-04-241-0/+112