Feature Description
Add ListWithVersions and ListWithDeleted functional options to the Go binding's List operation, exposing the corresponding fields from the Rust ListOptions struct.
// List all versions of objects under a prefix
lister, err := op.List("path/", opendal.ListWithVersions(true))
// List including delete markers
lister, err := op.List("path/", opendal.ListWithDeleted(true))
Problem and Solution
The Go binding currently only exposes ListWithRecursive (added in #7605). The Rust core's ListOptions has two more boolean fields that are useful for version-aware backends (e.g. S3 versioning):
versions: bool — include all object versions in the listing
deleted: bool — include delete markers in the listing
The implementation follows the same pattern as ListWithRecursive:
- Add
ListWithVersions(bool) WithListFn and ListWithDeleted(bool) WithListFn in lister.go
- Add
opendal_list_options_set_versions and opendal_list_options_set_deleted to the C binding (bindings/c/src/types.rs) and regenerate opendal.h
- Add corresponding FFI wrappers (
ffiListOptionsSetVersions, ffiListOptionsSetDeleted) in Go
- Add behavior tests gated on
cap.ListWithVersions() / cap.ListWithDeleted()
Additional Context
Are you willing to contribute to the development of this feature?
Feature Description
Add
ListWithVersionsandListWithDeletedfunctional options to the Go binding'sListoperation, exposing the corresponding fields from the RustListOptionsstruct.Problem and Solution
The Go binding currently only exposes
ListWithRecursive(added in #7605). The Rust core'sListOptionshas two more boolean fields that are useful for version-aware backends (e.g. S3 versioning):versions: bool— include all object versions in the listingdeleted: bool— include delete markers in the listingThe implementation follows the same pattern as
ListWithRecursive:ListWithVersions(bool) WithListFnandListWithDeleted(bool) WithListFninlister.goopendal_list_options_set_versionsandopendal_list_options_set_deletedto the C binding (bindings/c/src/types.rs) and regenerateopendal.hffiListOptionsSetVersions,ffiListOptionsSetDeleted) in Gocap.ListWithVersions()/cap.ListWithDeleted()Additional Context
Are you willing to contribute to the development of this feature?