Skip to content
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

Create an new interface to handle Manifest Lists #188

Closed
Tracked by #294
jjbustamante opened this issue Mar 28, 2023 · 0 comments · Fixed by #191
Closed
Tracked by #294

Create an new interface to handle Manifest Lists #188

jjbustamante opened this issue Mar 28, 2023 · 0 comments · Fixed by #191
Labels
good for mentorship A good issue for a mentorship project. type/enhancement New feature or request

Comments

@jjbustamante
Copy link
Member

jjbustamante commented Mar 28, 2023

Context

The OCI spec defines an Image Index concept to handle multiple manifests in an OCI image. Currently, we expose an Image interface that is consumed no matter the implementation (daemon, registry or layout), this is very convenient to decouple the implementation.

Requeriment

This issue suggests the definition and implementation of a new interface to expose the operations to deal with an Image Index .

Proposal

Note: I am using underscore to refer to a package, for example, foo_Bar referes to a Bar class in the foo package

classDiagram
    ManifestList <|-- remote_ManifestList
    ManifestList <|--  local_ManifestList 
    remote_ManifestList o-- ManifestListOption

    class ManifestListOption {
        +WithMediaTypes(requested imgutil.MediaTypes)
        +WithPath(path string)
    }

    class remote_ManifestList {
        +NewManifestList(repoName string, keychain authn.Keychain, ops []ManifestListOption) ManifestList 
    }

    class local_ManifestList {
         +NewManifestList(repoName string, path string, ops []ManifestListOption) ManifestList
    }

    class ManifestList {
       <<interface>>
        +Add(repoName string) error
        +Remove(repoName string) error
        +Save() error
    }
Loading

Notes

  • remote_ManifestList must be added into the imgutil.remote package in a manifest_list.go file
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
good for mentorship A good issue for a mentorship project. type/enhancement New feature or request
Projects
Status: Done
Development

Successfully merging a pull request may close this issue.

1 participant