Documentation ¶
Index ¶
- Constants
- func Is(spec cpi.RepositorySpec) bool
- func IsKind(k string) bool
- func NewDataAccess(fetcher remotes.Fetcher, digest digest.Digest, mimeType string, delayed bool) (*dataAccess, error)
- type BlobContainer
- type BlobContainers
- type Namespace
- func (n *Namespace) AddArtifact(artifact cpi.Artifact, tags ...string) (accessio.BlobAccess, error)
- func (n *Namespace) AddBlob(blob cpi.BlobAccess) error
- func (n *Namespace) AddTags(digest digest.Digest, tags ...string) error
- func (n *Namespace) Close() error
- func (n *Namespace) GetArtifact(vers string) (cpi.ArtifactAccess, error)
- func (n *Namespace) GetBlobData(digest digest.Digest) (int64, cpi.DataAccess, error)
- func (n *Namespace) GetNamespace() string
- func (n *Namespace) GetRepository() cpi.Repository
- func (n *Namespace) ListTags() ([]string, error)
- func (n *Namespace) NewArtifact(art ...*artdesc.Artifact) (cpi.ArtifactAccess, error)
- type NamespaceContainer
- func (n *NamespaceContainer) AddArtifact(artifact cpi.Artifact, tags ...string) (access accessio.BlobAccess, err error)
- func (n *NamespaceContainer) AddBlob(blob cpi.BlobAccess) error
- func (n *NamespaceContainer) AddTags(digest digest.Digest, tags ...string) error
- func (n *NamespaceContainer) Close() error
- func (n *NamespaceContainer) GetArtifact(vers string) (cpi.ArtifactAccess, error)
- func (n *NamespaceContainer) GetBlobData(digest digest.Digest) (int64, cpi.DataAccess, error)
- func (n *NamespaceContainer) GetBlobDescriptor(digest digest.Digest) *cpi.Descriptor
- func (n *NamespaceContainer) GetNamepace() string
- func (n *NamespaceContainer) IsClosed() bool
- func (n *NamespaceContainer) IsReadOnly() bool
- func (n *NamespaceContainer) ListTags() ([]string, error)
- func (n *NamespaceContainer) NewArtifactProvider(state accessobj.State) (cpi.ArtifactProvider, error)
- type Repository
- func (r *Repository) Close() error
- func (r *Repository) ExistsArtifact(name string, version string) (bool, error)
- func (r *Repository) GetBaseURL() string
- func (r *Repository) GetSpecification() cpi.RepositorySpec
- func (r *Repository) IsClosed() bool
- func (r *Repository) IsReadOnly() bool
- func (r *Repository) LookupArtifact(name string, version string) (cpi.ArtifactAccess, error)
- func (r *Repository) LookupNamespace(name string) (cpi.NamespaceAccess, error)
- func (r *Repository) NamespaceLister() cpi.NamespaceLister
- type RepositoryInfo
- type RepositorySpec
Constants ¶
View Source
const ( LegacyType = "ociRegistry" Type = "OCIRegistry" TypeV1 = Type + runtime.VersionSeparator + "v1" ShortType = "oci" ShortTypeV1 = ShortType + runtime.VersionSeparator + "v1" )
Variables ¶
This section is empty.
Functions ¶
Types ¶
type BlobContainer ¶
type BlobContainer interface { GetBlobData(digest digest.Digest) (int64, cpi.DataAccess, error) AddBlob(blob cpi.BlobAccess) (int64, digest.Digest, error) Unref() error }
func NewBlobContainer ¶
type BlobContainers ¶
type BlobContainers struct {
// contains filtered or unexported fields
}
func NewBlobContainers ¶
func (*BlobContainers) Get ¶
func (c *BlobContainers) Get(mime string) BlobContainer
func (*BlobContainers) Release ¶
func (c *BlobContainers) Release() error
type Namespace ¶
type Namespace struct {
// contains filtered or unexported fields
}
func NewNamespace ¶
func NewNamespace(repo *Repository, name string) (*Namespace, error)
func (*Namespace) AddArtifact ¶
func (*Namespace) GetArtifact ¶
func (n *Namespace) GetArtifact(vers string) (cpi.ArtifactAccess, error)
func (*Namespace) GetBlobData ¶
func (n *Namespace) GetBlobData(digest digest.Digest) (int64, cpi.DataAccess, error)
func (*Namespace) GetNamespace ¶
func (*Namespace) GetRepository ¶
func (n *Namespace) GetRepository() cpi.Repository
func (*Namespace) NewArtifact ¶
type NamespaceContainer ¶
type NamespaceContainer struct {
// contains filtered or unexported fields
}
func (*NamespaceContainer) AddArtifact ¶
func (n *NamespaceContainer) AddArtifact(artifact cpi.Artifact, tags ...string) (access accessio.BlobAccess, err error)
func (*NamespaceContainer) AddBlob ¶
func (n *NamespaceContainer) AddBlob(blob cpi.BlobAccess) error
func (*NamespaceContainer) AddTags ¶
func (n *NamespaceContainer) AddTags(digest digest.Digest, tags ...string) error
func (*NamespaceContainer) Close ¶
func (n *NamespaceContainer) Close() error
func (*NamespaceContainer) GetArtifact ¶
func (n *NamespaceContainer) GetArtifact(vers string) (cpi.ArtifactAccess, error)
func (*NamespaceContainer) GetBlobData ¶
func (n *NamespaceContainer) GetBlobData(digest digest.Digest) (int64, cpi.DataAccess, error)
func (*NamespaceContainer) GetBlobDescriptor ¶
func (n *NamespaceContainer) GetBlobDescriptor(digest digest.Digest) *cpi.Descriptor
func (*NamespaceContainer) GetNamepace ¶
func (n *NamespaceContainer) GetNamepace() string
func (*NamespaceContainer) IsClosed ¶
func (n *NamespaceContainer) IsClosed() bool
func (*NamespaceContainer) IsReadOnly ¶
func (n *NamespaceContainer) IsReadOnly() bool
func (*NamespaceContainer) ListTags ¶
func (n *NamespaceContainer) ListTags() ([]string, error)
func (*NamespaceContainer) NewArtifactProvider ¶
func (n *NamespaceContainer) NewArtifactProvider(state accessobj.State) (cpi.ArtifactProvider, error)
type Repository ¶
type Repository struct {
// contains filtered or unexported fields
}
func NewRepository ¶
func NewRepository(ctx cpi.Context, spec *RepositorySpec, info *RepositoryInfo) (*Repository, error)
func (*Repository) Close ¶
func (r *Repository) Close() error
func (*Repository) ExistsArtifact ¶
func (r *Repository) ExistsArtifact(name string, version string) (bool, error)
func (*Repository) GetBaseURL ¶
func (r *Repository) GetBaseURL() string
func (*Repository) GetSpecification ¶
func (r *Repository) GetSpecification() cpi.RepositorySpec
func (*Repository) IsClosed ¶
func (r *Repository) IsClosed() bool
func (*Repository) IsReadOnly ¶
func (r *Repository) IsReadOnly() bool
func (*Repository) LookupArtifact ¶
func (r *Repository) LookupArtifact(name string, version string) (cpi.ArtifactAccess, error)
func (*Repository) LookupNamespace ¶
func (r *Repository) LookupNamespace(name string) (cpi.NamespaceAccess, error)
func (*Repository) NamespaceLister ¶
func (r *Repository) NamespaceLister() cpi.NamespaceLister
type RepositoryInfo ¶
type RepositoryInfo struct { Scheme string Locator string Creds credentials.Credentials Legacy bool }
type RepositorySpec ¶
type RepositorySpec struct { runtime.ObjectVersionedType `json:",inline"` // BaseURL is the base url of the repository to resolve artifacts. BaseURL string `json:"baseUrl"` LegacyTypes *bool `json:"legacyTypes,omitempty"` }
RepositorySpec describes an OCI registry interface backed by an oci registry.
func NewLegacyRepositorySpec ¶
func NewLegacyRepositorySpec(baseURL string) *RepositorySpec
func NewRepositorySpec ¶
func NewRepositorySpec(baseURL string) *RepositorySpec
NewRepositorySpec creates a new RepositorySpec.
func (*RepositorySpec) GetType ¶
func (a *RepositorySpec) GetType() string
func (*RepositorySpec) Name ¶
func (a *RepositorySpec) Name() string
func (*RepositorySpec) Repository ¶
func (a *RepositorySpec) Repository(ctx cpi.Context, creds credentials.Credentials) (cpi.Repository, error)
func (*RepositorySpec) UniformRepositorySpec ¶
func (a *RepositorySpec) UniformRepositorySpec() *cpi.UniformRepositorySpec
Source Files ¶
Click to show internal directories.
Click to hide internal directories.