Documentation ¶
Index ¶
- Constants
- Variables
- type Manifest
- type Registry
- func (registry *Registry) GetImageDigests(ctx context.Context, repositoryName string, digest string) (digests []string, err error)
- func (registry *Registry) GetManifest(ctx context.Context, repositoryName string, digest string) (Manifest, error)
- func (registry *Registry) HeadManifest(ctx context.Context, repositoryName string, reference string) (ocispec.Descriptor, error)
- func (registry *Registry) Pull(ctx context.Context, repositoryName string, sociStore *store.SociStore, ...) (*ocispec.Descriptor, error)
- func (registry *Registry) Push(ctx context.Context, sociStore *store.SociStore, indexDesc ocispec.Descriptor, ...) error
- func (registry *Registry) ValidateImageManifest(ctx context.Context, repositoryName string, digest string) error
Constants ¶
View Source
const ( MediaTypeDockerManifestList = "application/vnd.docker.distribution.manifest.list.v2+json" MediaTypeDockerManifest = "application/vnd.docker.distribution.manifest.v2+json" MediaTypeOCIManifest = "application/vnd.oci.image.manifest.v1+json" MediaTypeOCIIndexManifest = "application/vnd.oci.image.index.v1+json" MediaTypeDockerImageConfig = "application/vnd.docker.container.image.v1+json" MediaTypeOCIImageConfig = "application/vnd.oci.image.config.v1+json" )
Variables ¶
View Source
var ImageConfigMediaTypes = []string{MediaTypeDockerImageConfig, MediaTypeOCIImageConfig}
List of config's media type for images
View Source
var RegistryNotSupportingOciArtifacts = errors.New("Registry does not support OCI artifacts")
Functions ¶
This section is empty.
Types ¶
type Manifest ¶ added in v1.0.2
type Manifest struct { ocispec.Manifest Manifests []ocispec.Descriptor `json:"manifests"` }
type Registry ¶
type Registry struct {
// contains filtered or unexported fields
}
func (*Registry) GetImageDigests ¶ added in v1.0.2
func (registry *Registry) GetImageDigests(ctx context.Context, repositoryName string, digest string) (digests []string, err error)
GetImageDigests inspects an image reference and returns all valid digets that need to be indexed. For multi-arch images (docker manifest), that includes all digests mentioned by the manifest. For normal images, it's just the image digest itself.
func (*Registry) GetManifest ¶
func (registry *Registry) GetManifest(ctx context.Context, repositoryName string, digest string) (Manifest, error)
Call registry's getManifest and return the image's manifest The image reference must be a digest because that's what oras-go FetchReference takes
func (*Registry) HeadManifest ¶
func (registry *Registry) HeadManifest(ctx context.Context, repositoryName string, reference string) (ocispec.Descriptor, error)
Call registry's headManifest and return the manifest's descriptor
func (*Registry) Pull ¶
func (registry *Registry) Pull(ctx context.Context, repositoryName string, sociStore *store.SociStore, imageReference string) (*ocispec.Descriptor, error)
Pull an image from the remote registry to a local OCI Store imageReference can be either a digest or a tag
Click to show internal directories.
Click to hide internal directories.