seaweedfs/weed/s3api
Chris Lu e88392b50f
Fix s3 pagination (#3436)
* Revert previous changes

* s3: use cursor to track tree traversal

fix https://github.com/seaweedfs/seaweedfs/issues/3166

* special cases for empty prefix and empty directory

* use constants

* address empty folder

* undo local changes

* fix IsTruncated

* adjust counting directories

* fix cases when prefix is a directory

* s3: handle directory object

works for

aws --endpoint-url http://127.0.0.1:8333/ s3api list-objects-v2 --bucket test --prefix "fakedir"
2022-08-15 00:30:19 -07:00
..
policy move to https://github.com/seaweedfs/seaweedfs 2022-07-29 00:17:28 -07:00
s3_constants use const multipart uploads folder 2022-06-29 16:21:16 +05:00
s3err move to https://github.com/seaweedfs/seaweedfs 2022-07-29 00:17:28 -07:00
AmazonS3.xsd add list all my buckets 2018-07-18 02:37:09 -07:00
auth_credentials.go move to https://github.com/seaweedfs/seaweedfs 2022-07-29 00:17:28 -07:00
auth_credentials_subscribe.go move to https://github.com/seaweedfs/seaweedfs 2022-07-29 00:17:28 -07:00
auth_credentials_test.go move to https://github.com/seaweedfs/seaweedfs 2022-07-29 00:17:28 -07:00
auth_signature_v2.go move to https://github.com/seaweedfs/seaweedfs 2022-07-29 00:17:28 -07:00
auth_signature_v4.go move to https://github.com/seaweedfs/seaweedfs 2022-07-29 00:17:28 -07:00
auto_signature_v4_test.go move to https://github.com/seaweedfs/seaweedfs 2022-07-29 00:17:28 -07:00
chunked_reader_v4.go move to https://github.com/seaweedfs/seaweedfs 2022-07-29 00:17:28 -07:00
custom_types.go weed s3: generate time format acceptable by aws cli s3 2019-04-01 16:13:29 -07:00
filer_multipart.go move to https://github.com/seaweedfs/seaweedfs 2022-07-29 00:17:28 -07:00
filer_multipart_test.go move to https://github.com/seaweedfs/seaweedfs 2022-07-29 00:17:28 -07:00
filer_util.go move to https://github.com/seaweedfs/seaweedfs 2022-07-29 00:17:28 -07:00
filer_util_tags.go move to https://github.com/seaweedfs/seaweedfs 2022-07-29 00:17:28 -07:00
README.txt add list all my buckets 2018-07-18 02:37:09 -07:00
s3api_auth.go go fmt 2020-02-26 16:52:57 -08:00
s3api_bucket_handlers.go move to https://github.com/seaweedfs/seaweedfs 2022-07-29 00:17:28 -07:00
s3api_bucket_handlers_test.go move to https://github.com/seaweedfs/seaweedfs 2022-07-29 00:17:28 -07:00
s3api_bucket_skip_handlers.go move to https://github.com/seaweedfs/seaweedfs 2022-07-29 00:17:28 -07:00
s3api_circuit_breaker.go move to https://github.com/seaweedfs/seaweedfs 2022-07-29 00:17:28 -07:00
s3api_circuit_breaker_test.go move to https://github.com/seaweedfs/seaweedfs 2022-07-29 00:17:28 -07:00
s3api_handlers.go filer prefer volume server in same data center (#3405) 2022-08-04 17:35:00 -07:00
s3api_object_copy_handlers.go move to https://github.com/seaweedfs/seaweedfs 2022-07-29 00:17:28 -07:00
s3api_object_copy_handlers_test.go move to https://github.com/seaweedfs/seaweedfs 2022-07-29 00:17:28 -07:00
s3api_object_handlers.go s3: fix aws s3api head-object 2022-08-14 23:52:35 -07:00
s3api_object_handlers_postpolicy.go move to https://github.com/seaweedfs/seaweedfs 2022-07-29 00:17:28 -07:00
s3api_object_multipart_handlers.go move to https://github.com/seaweedfs/seaweedfs 2022-07-29 00:17:28 -07:00
s3api_object_skip_handlers.go AclHandlers 2021-10-11 15:03:56 +05:00
s3api_object_tagging_handlers.go move to https://github.com/seaweedfs/seaweedfs 2022-07-29 00:17:28 -07:00
s3api_objects_list_handlers.go Fix s3 pagination (#3436) 2022-08-15 00:30:19 -07:00
s3api_objects_list_handlers_test.go Fix s3 pagination (#3436) 2022-08-15 00:30:19 -07:00
s3api_policy.go correct comments 2022-02-26 22:44:26 +08:00
s3api_server.go filer prefer volume server in same data center (#3405) 2022-08-04 17:35:00 -07:00
s3api_server_grpc.go move to https://github.com/seaweedfs/seaweedfs 2022-07-29 00:17:28 -07:00
s3api_status_handlers.go move to https://github.com/seaweedfs/seaweedfs 2022-07-29 00:17:28 -07:00
s3api_test.go move to https://github.com/seaweedfs/seaweedfs 2022-07-29 00:17:28 -07:00
s3api_xsd_generated.go weed/s3api: added new bucket handlers for more compatibility with AWS S3 2022-02-03 17:17:05 +03:00
stats.go move to https://github.com/seaweedfs/seaweedfs 2022-07-29 00:17:28 -07:00
tags.go refactor and fix strings.Split 2022-08-07 01:34:32 -07:00
tags_test.go move to https://github.com/seaweedfs/seaweedfs 2022-07-29 00:17:28 -07:00

see https://blog.aqwari.net/xml-schema-go/

1. go get aqwari.net/xml/cmd/xsdgen
2. xsdgen -o s3api_xsd_generated.go -pkg s3api AmazonS3.xsd