feat(copy.go): add copy options#7707
Open
FrankYang0529 wants to merge 1 commit into
Open
Conversation
Signed-off-by: PoAn Yang <payang@apache.org>
df0a0c4 to
0989d4a
Compare
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Which issue does this PR close?
Closes #7706
Rationale for this change
The Rust core already supports
Operator::copy_with()with options likeif_not_exists,if_match,source_version,source_content_length_hint,concurrent, andchunk, but the C and Go bindings only expose the basicOperator::copy()without any options. This PR exposes the full copy options API in both bindings.What changes are included in this PR?
C binding
opendal_copy_optionsstruct with new/free/setter functions for all copy optionsopendal_operator_copy_with()for blocking copy with optionsopendal_capability:copy_with_if_not_exists,copy_with_if_match,copy_with_source_version,copy_can_multi,copy_multi_max_size,copy_multi_min_sizeGo binding
copy.gowith functional options:CopyWithIfNotExists,CopyWithIfMatch,CopyWithSourceVersion,CopyWithSourceContentLengthHint,CopyWithConcurrent,CopyWithChunkOperator.Copy()to accept optional copy optionsCapability:CopyWithIfNotExists,CopyWithIfMatch,CopyWithSourceVersion,CopyCanMulti,CopyMultiMinSize,CopyMultiMaxSizeAre there any user-facing changes?
Yes. C and Go binding users can now use copy options that were previously only available in Rust.
AI Usage Statement
OpenCode with GLM-5.1