Documentation
¶
Overview ¶
Package scheme defines the interface for various reference schemes
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type API ¶
type API interface {
// Info is experimental, do not use
Info() Info
// BlobDelete removes a blob from the repository
BlobDelete(ctx context.Context, r ref.Ref, d types.Descriptor) error
// BlobGet retrieves a blob, returning a reader
BlobGet(ctx context.Context, r ref.Ref, d types.Descriptor) (blob.Reader, error)
// BlobHead verifies the existence of a blob, the reader contains the headers but no body to read
BlobHead(ctx context.Context, r ref.Ref, d types.Descriptor) (blob.Reader, error)
// BlobMount attempts to perform a server side copy of the blob
BlobMount(ctx context.Context, refSrc ref.Ref, refTgt ref.Ref, d types.Descriptor) error
// BlobPut sends a blob to the repository, returns the digest and size when successful
BlobPut(ctx context.Context, r ref.Ref, d types.Descriptor, rdr io.Reader) (types.Descriptor, error)
// ManifestDelete removes a manifest, including all tags that point to that manifest
ManifestDelete(ctx context.Context, r ref.Ref, opts ...ManifestOpts) error
// ManifestGet retrieves a manifest from a repository
ManifestGet(ctx context.Context, r ref.Ref) (manifest.Manifest, error)
// ManifestHead gets metadata about the manifest (existence, digest, mediatype, size)
ManifestHead(ctx context.Context, r ref.Ref) (manifest.Manifest, error)
// ManifestPut sends a manifest to the repository
ManifestPut(ctx context.Context, r ref.Ref, m manifest.Manifest, opts ...ManifestOpts) error
// ReferrerList returns a list of referrers to a given reference
ReferrerList(ctx context.Context, r ref.Ref, opts ...ReferrerOpts) (referrer.ReferrerList, error)
// TagDelete removes a tag from the repository
TagDelete(ctx context.Context, r ref.Ref) error
// TagList returns a list of tags from the repository
TagList(ctx context.Context, r ref.Ref, opts ...TagOpts) (*tag.List, error)
}
API is used to interface between different methods to store images
type Info ¶
type Info struct {
ManifestPushFirst bool
}
Info provides details on the scheme, this is experimental, do not use
type ManifestConfig ¶
type ManifestConfig struct {
CheckReferrers bool
Child bool // used when pushing a child of a manifest list, skips indexing in ocidir
Manifest manifest.Manifest
}
ManifestConfig is used by schemes to import ManifestOpts
type ManifestOpts ¶
type ManifestOpts func(*ManifestConfig)
ManifestOpts is used to set options on manifest APIs
func WithManifest ¶ added in v0.4.5
func WithManifest(m manifest.Manifest) ManifestOpts
WithManifest is used to pass the manifest to a method to avoid an extra GET request This is used on a delete to check for referrers
func WithManifestCheckReferrers ¶ added in v0.4.5
func WithManifestCheckReferrers() ManifestOpts
WithManifestCheckReferrers is used when deleting a manifest It indicates the manifest should be fetched and referrers should be deleted if defined
func WithManifestChild ¶
func WithManifestChild() ManifestOpts
WithManifestChild indicates the API call is on a child manifest This is used internally when copying multi-platform manifests This bypasses tracking of an untagged digest in ocidir which is needed for garbage collection
type ReferrerConfig ¶ added in v0.4.3
ReferrerConfig is used by schemes to import ReferrerOpts
type ReferrerOpts ¶ added in v0.4.3
type ReferrerOpts func(*ReferrerConfig)
ReferrerOpts is used to set options on referrer APIs
func WithReferrerAT ¶ added in v0.4.5
func WithReferrerAT(at string) ReferrerOpts
WithReferrerAT filters by a specific artifactType value
func WithReferrerAnnotations ¶ added in v0.4.5
func WithReferrerAnnotations(annotations map[string]string) ReferrerOpts
WithReferrerAnnotations filters by a list of annotations, all of which must match
type RepoConfig ¶
RepoConfig is used by schemes to import RepoOpts
type RepoOpts ¶
type RepoOpts func(*RepoConfig)
RepoOpts is used to set options on repo APIs
func WithRepoLast ¶
WithRepoLast passes the last received repository for requesting the next batch of repositories Registries may ignore this
func WithRepoLimit ¶
WithRepoLimit passes a maximum number of repositories to return to the repository list API Registries may ignore this
type TagOpts ¶
type TagOpts func(*TagConfig)
TagOpts is used to set options on tag APIs
func WithTagLast ¶
WithTagLast passes the last received tag for requesting the next batch of tags Registries may ignore this
func WithTagLimit ¶
WithTagLimit passes a maximum number of tags to return to the tag list API Registries may ignore this
Directories
¶
| Path | Synopsis |
|---|---|
|
Package ocidir implements the OCI Image Layout scheme with a directory (not packed in a tar)
|
Package ocidir implements the OCI Image Layout scheme with a directory (not packed in a tar) |
|
Package reg implements the OCI registry scheme used by most images (host:port/repo:tag)
|
Package reg implements the OCI registry scheme used by most images (host:port/repo:tag) |