-
Notifications
You must be signed in to change notification settings - Fork 102
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
feat!: support oras.Fetch
and oras.FetchBytes
#282
Conversation
Signed-off-by: Sylvia Lei <lixlei@microsoft.com>
Codecov Report
@@ Coverage Diff @@
## main #282 +/- ##
==========================================
+ Coverage 70.87% 70.97% +0.10%
==========================================
Files 37 37
Lines 3368 3421 +53
==========================================
+ Hits 2387 2428 +41
- Misses 734 743 +9
- Partials 247 250 +3
Help us with your feedback. Take ten seconds to tell us how you rate us. Have a feature suggestion? Share it here. |
Signed-off-by: Sylvia Lei <lixlei@microsoft.com>
Signed-off-by: Sylvia Lei <lixlei@microsoft.com>
} | ||
|
||
// FetchBytes fetches the content bytes identified by the reference. | ||
func FetchBytes(ctx context.Context, target ReadOnlyTarget, reference string, opts FetchBytesOptions) (ocispec.Descriptor, []byte, error) { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Any naming suggestions are welcomed!
oras.Fetch
and oras.FetchBytes
oras.Fetch
and oras.FetchBytes
oras.Fetch
and oras.FetchBytes
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM
Add utility methods for convenient content fetching.
Resolves #272
BREAKING CHANGE: Move
content.ErrSizeExceedLimit
toerrdef.ErrSizeExceedsLimit
Signed-off-by: Sylvia Lei lixlei@microsoft.com