Documentation
¶
Index ¶
- Constants
- func IsImageConfig(mediaType string) bool
- type ClosureEntry
- type ClosureRole
- type Index
- func (x *Index) Blobs(ctx context.Context, repository string, after oci.Digest, limit int) ([]backend.BlobRecord, error)
- func (x *Index) Closure(ctx context.Context, repository string, digest oci.Digest) ([]ClosureEntry, error)
- func (x *Index) Dependents(ctx context.Context, digest oci.Digest, limit int) ([]backend.Dependent, error)
- func (x *Index) ImageConfig(ctx context.Context, config oci.Descriptor) ([]byte, error)
- func (x *Index) Locations(ctx context.Context, digest oci.Digest) ([]backend.Location, error)
- func (x *Index) Manifest(ctx context.Context, repository string, digest oci.Digest) (backend.ManifestRecord, error)
- func (x *Index) Manifests(ctx context.Context, repository string, after oci.Digest, limit int) ([]backend.ManifestRecord, error)
- func (x *Index) Referrers(ctx context.Context, repository string, digest oci.Digest, ...) ([]oci.Descriptor, error)
- func (x *Index) Repositories(ctx context.Context, after string, limit int) ([]string, error)
- func (x *Index) Reserved(ctx context.Context, digest oci.Digest) (bool, error)
- func (x *Index) ResolveTag(ctx context.Context, repository, tag string) (oci.Descriptor, error)
- func (x *Index) TagRecords(ctx context.Context, repository, after string, limit int) ([]backend.TagRecord, error)
- type ManifestMetadata
- type ManifestParser
- type Metadata
- type Option
- type Store
Constants ¶
const (
// MaxImageConfigSize bounds how much of an image config Index.ImageConfig reads.
MaxImageConfigSize = 4 << 20
)
Variables ¶
This section is empty.
Functions ¶
func IsImageConfig ¶
Types ¶
type ClosureEntry ¶
type ClosureEntry struct {
Descriptor oci.Descriptor
Role ClosureRole
// RetainedInRepository is true if removing the closure from its
// repository must keep the digest there: a manifest in the repository
// outside the closure references it, or it is a tagged non-root manifest.
RetainedInRepository bool
// repository.
Shared bool
SharedWith []backend.Dependent
// Locations are every repository holding the digest.
Locations []backend.Location
}
ClosureEntry is a digest in a manifest closure, classified against everything outside the closure.
type ClosureRole ¶
type ClosureRole string
ClosureRole is how content takes part in a manifest closure.
const ( RoleManifest ClosureRole = "MANIFEST" RoleConfig ClosureRole = "CONFIG" RoleLayer ClosureRole = "LAYER" RoleReference ClosureRole = "REFERENCE" )
type Index ¶
type Index struct {
// contains filtered or unexported fields
}
Index is the typed, read-only view of a Store's metadata indexes. Results are snapshots: they never authorize deletion, which garbage collection re-checks itself.
func (*Index) Closure ¶
func (x *Index) Closure(ctx context.Context, repository string, digest oci.Digest) ([]ClosureEntry, error)
Closure walks the manifest digest names and everything it transitively references in repository, root first. Child manifests absent from the repository are skipped.
func (*Index) Dependents ¶
func (*Index) ImageConfig ¶
ImageConfig returns the raw image config config describes, or nil when it is not an image config.
func (*Index) Repositories ¶
func (*Index) ResolveTag ¶
type ManifestMetadata ¶ added in v1.2.0
type ManifestMetadata struct {
ArtifactType string
Subject *oci.Digest
Annotations map[string]string
Config *oci.Descriptor
Layers []oci.Descriptor
Manifests []oci.Descriptor
Dependencies []oci.Descriptor
Details json.RawMessage
}
ManifestMetadata is the normalized metadata a parser extracts from a manifest. Dependencies are blob descriptors; Manifests are child manifests. Config and Layers retain the image-specific projections used by existing registry and query APIs.
type ManifestParser ¶ added in v1.2.0
type ManifestParser interface {
Supports(mediaType, artifactType string) bool
ParseManifest(mediaType string, content []byte) (ManifestMetadata, error)
}
ManifestParser handles a manifest format identified by its media type and, when present, artifact type.
type Metadata ¶
type Metadata interface {
backend.MetadataStore
backend.MetadataQuerier
}
Metadata is a metadata store together with the indexes it maintains.
type Option ¶ added in v1.2.0
type Option func(*storeOptions) error
Option configures a Store.
func WithAllowMissingManifestChildren ¶ added in v1.2.0
func WithAllowMissingManifestChildren() Option
WithAllowMissingManifestChildren allows a manifest to reference child manifests that are not present in the same repository. Present children must still match their descriptor. This is useful for partial index pulls.
func WithManifestParser ¶ added in v1.2.0
func WithManifestParser(parser ManifestParser) Option
WithManifestParser registers a parser for additional manifest formats. When multiple registered parsers support the same manifest, the push fails rather than selecting one ambiguously.
type Store ¶
func (*Store) CleanupExpiredReservations ¶
func (*Store) CleanupExpiredUploads ¶
Directories
¶
| Path | Synopsis |
|---|---|
|
Package backend defines the storage and metadata contracts used by the standalone registry implementation.
|
Package backend defines the storage and metadata contracts used by the standalone registry implementation. |
|
Package kv defines the ordered, transactional key-value contract that registry metadata is stored in.
|
Package kv defines the ordered, transactional key-value contract that registry metadata is stored in. |
|
boltkv
Package boltkv is a kv.Store backed by a local bbolt database.
|
Package boltkv is a kv.Store backed by a local bbolt database. |
|
etcdkv
Package etcdkv is a kv.Store backed by etcd.
|
Package etcdkv is a kv.Store backed by etcd. |
|
kvtest
Package kvtest is a conformance suite every kv.Store driver must pass.
|
Package kvtest is a conformance suite every kv.Store driver must pass. |
|
memkv
Package memkv is an in-process kv.Store.
|
Package memkv is an in-process kv.Store. |
|
natskv
Package natskv is a kv.Store backed by a NATS JetStream stream.
|
Package natskv is a kv.Store backed by a NATS JetStream stream. |
|
remotekv
Package remotekv turns a networked key-value service with an atomic, revision-guarded multi-key commit into a serializable kv.Store.
|
Package remotekv turns a networked key-value service with an atomic, revision-guarded multi-key commit into a serializable kv.Store. |
|
Package kvmeta implements backend.MetadataStore and backend.MetadataQuerier over any kv.Store.
|
Package kvmeta implements backend.MetadataStore and backend.MetadataQuerier over any kv.Store. |
|
Package query is ocistore's GraphQL metadata query layer.
|
Package query is ocistore's GraphQL metadata query layer. |