Skip to content
This repository has been archived by the owner on Apr 7, 2024. It is now read-only.

feat: support login #42

Merged
merged 14 commits into from
Apr 13, 2023
Merged

feat: support login #42

merged 14 commits into from
Apr 13, 2023

Conversation

wangxiaoxuan273
Copy link
Collaborator

Resolves #31

Signed-off-by: wangxiaoxuan273 <[email protected]>
@codecov-commenter
Copy link

codecov-commenter commented Apr 6, 2023

Codecov Report

Merging #42 (310f0f7) into main (aead42c) will increase coverage by 2.61%.
The diff coverage is 75.00%.

📣 This organization is not using Codecov’s GitHub App Integration. We recommend you install it so Codecov can continue to function properly for your repositories. Learn more

@@            Coverage Diff             @@
##             main      #42      +/-   ##
==========================================
+ Coverage   69.69%   72.30%   +2.61%     
==========================================
  Files           1        2       +1     
  Lines          33       65      +32     
==========================================
+ Hits           23       47      +24     
- Misses          9       15       +6     
- Partials        1        3       +2     
Impacted Files Coverage Δ
native_store.go 69.69% <ø> (ø)
registry.go 75.00% <75.00%> (ø)

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: wangxiaoxuan273 <[email protected]>
Signed-off-by: wangxiaoxuan273 <[email protected]>
Signed-off-by: wangxiaoxuan273 <[email protected]>
login.go Outdated Show resolved Hide resolved
login.go Outdated Show resolved Hide resolved
login.go Outdated Show resolved Hide resolved
login_test.go Outdated Show resolved Hide resolved
login_test.go Outdated Show resolved Hide resolved
login.go Outdated Show resolved Hide resolved
Signed-off-by: wangxiaoxuan273 <[email protected]>
Signed-off-by: wangxiaoxuan273 <[email protected]>
registry.go Show resolved Hide resolved
registry_test.go Outdated Show resolved Hide resolved
Signed-off-by: wangxiaoxuan273 <[email protected]>
Signed-off-by: wangxiaoxuan273 <[email protected]>
registry.go Outdated Show resolved Hide resolved
registry_test.go Outdated Show resolved Hide resolved
Signed-off-by: wangxiaoxuan273 <[email protected]>
registry.go Outdated

// Login provides the login functionality with the given credentials.
func Login(ctx context.Context, store Store, registry remote.Registry, cred auth.Credential) error {
if err := registry.Ping(ctx); err != nil {
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

cred is never used in Ping().

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The word registry is a bit overloaded here although I don't have a better suggestion.

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The word registry is a bit overloaded here although I don't have a better suggestion.

Registry is the proper name here.

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The word registry is a bit overloaded here although I don't have a better suggestion.

reg might be good enough

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

changed to reg

Signed-off-by: wangxiaoxuan273 <[email protected]>
registry.go Outdated

// Login provides the login functionality with the given credentials.
func Login(ctx context.Context, store Store, registry remote.Registry, cred auth.Credential) error {
if err := registry.Ping(ctx); err != nil {
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The word registry is a bit overloaded here although I don't have a better suggestion.

registry.go Outdated Show resolved Hide resolved
wangxiaoxuan273 and others added 2 commits April 11, 2023 07:30
Signed-off-by: wangxiaoxuan273 <[email protected]>
Signed-off-by: wangxiaoxuan273 <[email protected]>
Copy link
Member

@Wwwsylvia Wwwsylvia left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

registry.go Outdated

// Login provides the login functionality with the given credentials.
func Login(ctx context.Context, store Store, registry remote.Registry, cred auth.Credential) error {
if err := registry.Ping(ctx); err != nil {
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The word registry is a bit overloaded here although I don't have a better suggestion.

reg might be good enough

registry.go Outdated Show resolved Hide resolved
registry.go Outdated Show resolved Hide resolved
Signed-off-by: wangxiaoxuan273 <[email protected]>
registry.go Outdated Show resolved Hide resolved
registry.go Show resolved Hide resolved
Signed-off-by: wangxiaoxuan273 <[email protected]>
Copy link
Contributor

@shizhMSFT shizhMSFT left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@shizhMSFT shizhMSFT merged commit d122fdd into oras-project:main Apr 13, 2023
@wangxiaoxuan273 wangxiaoxuan273 deleted the login branch April 13, 2023 07:29
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Support login
5 participants