Documentation ¶
Index ¶
- Constants
- Variables
- 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)
- func NewNamespace(repo *RepositoryImpl, name string) (cpi.NamespaceAccess, error)
- func NewRepository(ctx cpi.Context, spec *RepositorySpec, info *RepositoryInfo) (cpi.Repository, error)
- type BlobContainer
- type BlobContainers
- type NamespaceContainer
- func (n *NamespaceContainer) AddArtifact(artifact cpi.Artifact, tags ...string) (access blobaccess.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(i support.NamespaceAccessImpl, vers string) (cpi.ArtifactAccess, error)
- func (n *NamespaceContainer) GetBlobData(digest digest.Digest) (int64, cpi.DataAccess, error)
- func (n *NamespaceContainer) HasArtifact(vers string) (bool, error)
- func (n *NamespaceContainer) IsReadOnly() bool
- func (n *NamespaceContainer) ListTags() ([]string, error)
- func (n *NamespaceContainer) NewArtifact(i support.NamespaceAccessImpl, art ...cpi.Artifact) (cpi.ArtifactAccess, error)
- func (n *NamespaceContainer) SetImplementation(impl support.NamespaceAccessImpl)
- type RepositoryImpl
- func (r *RepositoryImpl) Close() error
- func (r *RepositoryImpl) ExistsArtifact(name string, version string) (bool, error)
- func (r *RepositoryImpl) GetBaseURL() string
- func (r *RepositoryImpl) GetConsumerId(uctx ...credentials.UsageContext) credentials.ConsumerIdentity
- func (r *RepositoryImpl) GetIdentityMatcher() string
- func (r *RepositoryImpl) GetRef(comp, vers string) string
- func (r *RepositoryImpl) GetSpecification() cpi.RepositorySpec
- func (r *RepositoryImpl) IsReadOnly() bool
- func (r *RepositoryImpl) LookupArtifact(name string, version string) (acc cpi.ArtifactAccess, err error)
- func (r *RepositoryImpl) LookupNamespace(name string) (cpi.NamespaceAccess, error)
- func (r *RepositoryImpl) NamespaceLister() cpi.NamespaceLister
- type RepositoryInfo
- type RepositorySpec
- func (a *RepositorySpec) GetConsumerId(uctx ...credentials.UsageContext) credentials.ConsumerIdentity
- func (a *RepositorySpec) GetIdentityMatcher() string
- func (a *RepositorySpec) GetType() string
- func (a *RepositorySpec) Name() string
- func (a *RepositorySpec) Repository(ctx cpi.Context, creds credentials.Credentials) (cpi.Repository, error)
- func (a *RepositorySpec) UniformRepositorySpec() *cpi.UniformRepositorySpec
- func (a *RepositorySpec) Validate(ctx cpi.Context, creds credentials.Credentials, ...) error
Constants ¶
View Source
const ( LegacyType = "ociRegistry" Type = "OCIRegistry" TypeV1 = Type + runtime.VersionSeparator + "v1" ShortType = "oci" ShortTypeV1 = ShortType + runtime.VersionSeparator + "v1" )
Variables ¶
View Source
var REALM = ocmlog.DefineSubRealm("OCI repository handling", "oci", "ocireg")
Functions ¶
func NewDataAccess ¶
func NewNamespace ¶
func NewNamespace(repo *RepositoryImpl, name string) (cpi.NamespaceAccess, error)
func NewRepository ¶
func NewRepository(ctx cpi.Context, spec *RepositorySpec, info *RepositoryInfo) (cpi.Repository, error)
Types ¶
type BlobContainer ¶
type BlobContainer interface { GetBlobData(digest digest.Digest) (int64, cpi.DataAccess, error) AddBlob(blob cpi.BlobAccess) (int64, digest.Digest, error) Unref() error }
type BlobContainers ¶
type BlobContainers struct {
// contains filtered or unexported fields
}
func NewBlobContainers ¶
func (*BlobContainers) Get ¶
func (c *BlobContainers) Get(mime string) (BlobContainer, error)
func (*BlobContainers) Release ¶
func (c *BlobContainers) Release() error
type NamespaceContainer ¶
type NamespaceContainer struct {
// contains filtered or unexported fields
}
func (*NamespaceContainer) AddArtifact ¶
func (n *NamespaceContainer) AddArtifact(artifact cpi.Artifact, tags ...string) (access blobaccess.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(i support.NamespaceAccessImpl, vers string) (cpi.ArtifactAccess, error)
func (*NamespaceContainer) GetBlobData ¶
func (n *NamespaceContainer) GetBlobData(digest digest.Digest) (int64, cpi.DataAccess, error)
func (*NamespaceContainer) HasArtifact ¶
func (n *NamespaceContainer) HasArtifact(vers string) (bool, error)
func (*NamespaceContainer) IsReadOnly ¶
func (n *NamespaceContainer) IsReadOnly() bool
func (*NamespaceContainer) ListTags ¶
func (n *NamespaceContainer) ListTags() ([]string, error)
func (*NamespaceContainer) NewArtifact ¶
func (n *NamespaceContainer) NewArtifact(i support.NamespaceAccessImpl, art ...cpi.Artifact) (cpi.ArtifactAccess, error)
func (*NamespaceContainer) SetImplementation ¶
func (n *NamespaceContainer) SetImplementation(impl support.NamespaceAccessImpl)
type RepositoryImpl ¶
type RepositoryImpl struct { cpi.RepositoryImplBase // contains filtered or unexported fields }
func GetRepositoryImplementation ¶
func GetRepositoryImplementation(r cpi.Repository) (*RepositoryImpl, error)
func (*RepositoryImpl) Close ¶
func (r *RepositoryImpl) Close() error
func (*RepositoryImpl) ExistsArtifact ¶
func (r *RepositoryImpl) ExistsArtifact(name string, version string) (bool, error)
func (*RepositoryImpl) GetBaseURL ¶
func (r *RepositoryImpl) GetBaseURL() string
func (*RepositoryImpl) GetConsumerId ¶
func (r *RepositoryImpl) GetConsumerId(uctx ...credentials.UsageContext) credentials.ConsumerIdentity
func (*RepositoryImpl) GetIdentityMatcher ¶
func (r *RepositoryImpl) GetIdentityMatcher() string
func (*RepositoryImpl) GetRef ¶
func (r *RepositoryImpl) GetRef(comp, vers string) string
func (*RepositoryImpl) GetSpecification ¶
func (r *RepositoryImpl) GetSpecification() cpi.RepositorySpec
func (*RepositoryImpl) IsReadOnly ¶
func (r *RepositoryImpl) IsReadOnly() bool
func (*RepositoryImpl) LookupArtifact ¶
func (r *RepositoryImpl) LookupArtifact(name string, version string) (acc cpi.ArtifactAccess, err error)
func (*RepositoryImpl) LookupNamespace ¶
func (r *RepositoryImpl) LookupNamespace(name string) (cpi.NamespaceAccess, error)
func (*RepositoryImpl) NamespaceLister ¶
func (r *RepositoryImpl) NamespaceLister() cpi.NamespaceLister
type RepositoryInfo ¶
type RepositoryInfo struct { Scheme string Locator string Creds credentials.Credentials Legacy bool }
func (*RepositoryInfo) HostPort ¶
func (r *RepositoryInfo) HostPort() string
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) GetConsumerId ¶
func (a *RepositorySpec) GetConsumerId(uctx ...credentials.UsageContext) credentials.ConsumerIdentity
func (*RepositorySpec) GetIdentityMatcher ¶
func (a *RepositorySpec) GetIdentityMatcher() string
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
func (*RepositorySpec) Validate ¶
func (a *RepositorySpec) Validate(ctx cpi.Context, creds credentials.Credentials, context ...credentials.UsageContext) error
Click to show internal directories.
Click to hide internal directories.