store

package
v1.0.8 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Aug 11, 2026 License: Apache-2.0 Imports: 19 Imported by: 0

Documentation

Overview

Package store reads and writes Zot-compatible OCI image layout repositories.

Index

Constants

View Source
const RefNameAnnotation = "org.opencontainers.image.ref.name"

Variables

This section is empty.

Functions

This section is empty.

Types

type PlatformArchive added in v1.0.4

type PlatformArchive struct {
	Path     string
	Src      name.Tag
	Platform v1.Platform
}

PlatformArchive describes one platform image in a Docker archive.

type PushOptions added in v1.0.5

type PushOptions struct {
	Destination   name.Tag
	RemoteOptions []remote.Option
}

PushOptions configures Store.Push.

type Store

type Store struct{ Root string }

func (Store) Descriptor

func (s Store) Descriptor(_ context.Context, ref name.Tag) (v1.Descriptor, error)

Descriptor returns the store descriptor tagged by ref.

func (Store) Image

func (s Store) Image(_ context.Context, ref name.Tag, platform v1.Platform) (v1.Image, error)

Image returns the image stored under ref for platform.

func (Store) LoadDockerArchives added in v1.0.4

func (s Store) LoadDockerArchives(ctx context.Context, dst name.Tag, archives []PlatformArchive) error

LoadDockerArchives imports Docker archives into the store under dst.

func (Store) Pull added in v1.0.8

func (s Store) Pull(ctx context.Context, ref name.Tag, opts ...remote.Option) error

Pull imports an image or complete image index from its remote registry reference.

func (Store) Push

func (s Store) Push(ctx context.Context, src name.Tag, opts ...PushOptions) error

Push pushes a stored image or index to its remote registry reference.

func (Store) PutArtifact

func (s Store) PutArtifact(_ context.Context, ref name.Tag, subject v1.Descriptor, artifact v1.Image, title string) error

PutArtifact writes an OCI artifact that refers to subject.

func (Store) PutImage

func (s Store) PutImage(_ context.Context, ref name.Tag, img v1.Image) error

PutImage writes an image to the store under ref.

func (Store) PutIndex

func (s Store) PutIndex(_ context.Context, ref name.Tag, idx v1.ImageIndex) error

PutIndex writes an image index to the store under ref.

func (Store) RepoPath

func (s Store) RepoPath(ref name.Tag) string

RepoPath returns the Zot-compatible repository layout path for ref.

func (Store) Save

func (s Store) Save(ctx context.Context, refs []name.Tag, platform *v1.Platform, w io.Writer) error

Save writes stored images as a Docker-compatible image archive.

func (Store) Tag

func (s Store) Tag(ctx context.Context, src, dst name.Tag) error

Tag creates dst as another store reference to src.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL