-
Notifications
You must be signed in to change notification settings - Fork 94
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
Registry Interface #81
Conversation
Signed-off-by: Shiwei Zhang <shizh@microsoft.com>
Signed-off-by: Shiwei Zhang <shizh@microsoft.com>
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
@shizhMSFT I am trying to wrap my head around it. I have a few questions, although I think I get it.
|
@deitch Yes, exactly. Behind the scene,
Besides |
To get the full picture, you may take a look at my current working branch, which I will make a PR and send it out after this PR is merged. Here are some example usages (note: I am still implementing the auth): src, err := distribution.NewRepository("localhost:5000/hello-world")
check(err)
src.PlainHTTP = true
dst, err := distribution.NewRepository("localhost:5001/hello")
check(err)
dst.PlainHTTP = true
desc, err := oras.Copy(ctx, src, "latest", dst, "")
check(err) src, err := distribution.NewRepository("mcr.microsoft.com/hello-world:latest")
check(err)
dst := memory.New()
_, err = oras.Copy(ctx, src, src.Reference.String(), dst, "")
check(err) reg, err := distribution.NewRegistry("localhost:5000")
check(err)
reg.PlainHTTP = true
catalog, err := registry.Repositories(ctx, reg)
check(err)
fmt.Println(catalog)
repo, err := reg.Repository(ctx, "alpine")
check(err)
tags, err := registry.Tags(ctx, repo)
check(err)
fmt.Println(tags) where the full package name of |
Thanks for the explanation @shizhMSFT ; makes sense. I do think we need clearer docs explaining what the high level interfaces are (primarily two: |
We definitely will document the library in the |
Resolves #58