support

package
v0.0.0-...-877fc11 Latest Latest
Warning

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

Go to latest
Published: Jun 7, 2024 License: Apache-2.0 Imports: 13 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var ErrNoIndex = errors.New("manifest does not support access to subsequent artifacts")

Functions

func AdjustSize

func AdjustSize(d *artdesc.Descriptor, size int64) error

func NewArtifact

func NewArtifact(container NamespaceAccessImpl, defs ...cpi.Artifact) (cpi.ArtifactAccess, error)

func NewArtifactForBlob

func NewArtifactForBlob(container NamespaceAccessImpl, blob blobaccess.BlobAccess, closer ...io.Closer) (cpi.ArtifactAccess, error)

func NewNamespaceAccess

func NewNamespaceAccess(namespace string, c NamespaceContainer, repo cpi.RepositoryViewManager, kind ...string) (cpi.NamespaceAccess, error)

Types

type ArtifactAccessImpl

type ArtifactAccessImpl struct {
	cpi.ArtifactAccessImplBase
	// contains filtered or unexported fields
}

func (*ArtifactAccessImpl) AddArtifact

func (a *ArtifactAccessImpl) AddArtifact(art cpi.Artifact, platform *artdesc.Platform) (cpi.BlobAccess, error)

func (*ArtifactAccessImpl) AddBlob

func (a *ArtifactAccessImpl) AddBlob(access cpi.BlobAccess) error

func (*ArtifactAccessImpl) AddLayer

func (a *ArtifactAccessImpl) AddLayer(blob cpi.BlobAccess, d *cpi.Descriptor) (int, error)

func (*ArtifactAccessImpl) Artifact

func (a *ArtifactAccessImpl) Artifact() *artdesc.Artifact

func (*ArtifactAccessImpl) Blob

func (a *ArtifactAccessImpl) Blob() (cpi.BlobAccess, error)

func (*ArtifactAccessImpl) Digest

func (a *ArtifactAccessImpl) Digest() digest.Digest

func (*ArtifactAccessImpl) GetArtifact

func (a *ArtifactAccessImpl) GetArtifact(digest digest.Digest) (cpi.ArtifactAccess, error)

func (*ArtifactAccessImpl) GetBlob

func (a *ArtifactAccessImpl) GetBlob(digest digest.Digest) (cpi.BlobAccess, error)

func (*ArtifactAccessImpl) GetBlobData

func (a *ArtifactAccessImpl) GetBlobData(digest digest.Digest) (int64, cpi.DataAccess, error)

func (*ArtifactAccessImpl) GetBlobDescriptor

func (a *ArtifactAccessImpl) GetBlobDescriptor(digest digest.Digest) *cpi.Descriptor

func (*ArtifactAccessImpl) GetDescriptor

func (a *ArtifactAccessImpl) GetDescriptor() *artdesc.Artifact

func (*ArtifactAccessImpl) Index

func (a *ArtifactAccessImpl) Index() (*artdesc.Index, error)

func (*ArtifactAccessImpl) IndexAccess

func (*ArtifactAccessImpl) IsIndex

func (a *ArtifactAccessImpl) IsIndex() bool

func (*ArtifactAccessImpl) IsManifest

func (a *ArtifactAccessImpl) IsManifest() bool

func (*ArtifactAccessImpl) IsReadOnly

func (a *ArtifactAccessImpl) IsReadOnly() bool

func (*ArtifactAccessImpl) IsValid

func (a *ArtifactAccessImpl) IsValid() bool

func (*ArtifactAccessImpl) Manifest

func (a *ArtifactAccessImpl) Manifest() (*artdesc.Manifest, error)

func (*ArtifactAccessImpl) ManifestAccess

func (*ArtifactAccessImpl) NewArtifact

func (a *ArtifactAccessImpl) NewArtifact(art ...cpi.Artifact) (cpi.ArtifactAccess, error)

type ArtifactSetBlobAccess

type ArtifactSetBlobAccess struct {
	// contains filtered or unexported fields
}

func NewArtifactSetBlobAccess

func NewArtifactSetBlobAccess(container NamespaceAccessImpl) *ArtifactSetBlobAccess

func (*ArtifactSetBlobAccess) AddArtifact

func (a *ArtifactSetBlobAccess) AddArtifact(artifact cpi.Artifact, tags ...string) (access blobaccess.BlobAccess, err error)

func (*ArtifactSetBlobAccess) AddBlob

func (a *ArtifactSetBlobAccess) AddBlob(blob cpi.BlobAccess) error

func (*ArtifactSetBlobAccess) GetBlob

func (a *ArtifactSetBlobAccess) GetBlob(digest digest.Digest) (cpi.BlobAccess, error)

func (*ArtifactSetBlobAccess) GetBlobData

func (a *ArtifactSetBlobAccess) GetBlobData(digest digest.Digest) (int64, cpi.DataAccess, error)

func (*ArtifactSetBlobAccess) GetBlobDescriptor

func (a *ArtifactSetBlobAccess) GetBlobDescriptor(digest digest.Digest) *cpi.Descriptor

func (*ArtifactSetBlobAccess) IsReadOnly

func (a *ArtifactSetBlobAccess) IsReadOnly() bool

type BlobProvider

type BlobProvider interface {
	refmgmt.Allocatable
	cpi.BlobSource
	cpi.BlobSink
}

BlobProvider manages the technical access to blobs.

type IndexAccess

type IndexAccess struct {
	// contains filtered or unexported fields
}

func NewIndexForArtifact

func NewIndexForArtifact(master cpi.ArtifactAccess, a *ArtifactAccessImpl) *IndexAccess

func (*IndexAccess) AddArtifact

func (a *IndexAccess) AddArtifact(art cpi.Artifact, platform *artdesc.Platform) (access blobaccess.BlobAccess, err error)

func (*IndexAccess) AddBlob

func (i *IndexAccess) AddBlob(blob internal.BlobAccess) error

func (*IndexAccess) Artifact

func (i *IndexAccess) Artifact() *artdesc.Artifact

func (*IndexAccess) Blob

func (a *IndexAccess) Blob() (cpi.BlobAccess, error)

func (*IndexAccess) Digest

func (a *IndexAccess) Digest() digest.Digest

func (*IndexAccess) GetArtifact

func (i *IndexAccess) GetArtifact(digest digest.Digest) (internal.ArtifactAccess, error)

func (*IndexAccess) GetBlob

func (i *IndexAccess) GetBlob(digest digest.Digest) (internal.BlobAccess, error)

func (*IndexAccess) GetBlobDescriptor

func (i *IndexAccess) GetBlobDescriptor(digest digest.Digest) *cpi.Descriptor

func (*IndexAccess) GetDescriptor

func (i *IndexAccess) GetDescriptor() *artdesc.Index

func (*IndexAccess) Index

func (i *IndexAccess) Index() (*artdesc.Index, error)

func (*IndexAccess) IsIndex

func (a *IndexAccess) IsIndex() bool

func (*IndexAccess) IsManifest

func (a *IndexAccess) IsManifest() bool

func (*IndexAccess) IsReadOnly

func (a *IndexAccess) IsReadOnly() bool

func (*IndexAccess) IsValid

func (a *IndexAccess) IsValid() bool

func (*IndexAccess) Manifest

func (i *IndexAccess) Manifest() (*artdesc.Manifest, error)

func (*IndexAccess) NewArtifact

func (i *IndexAccess) NewArtifact(art ...cpi.Artifact) (cpi.ArtifactAccess, error)

type ManifestAccess

type ManifestAccess struct {
	// contains filtered or unexported fields
}

func NewManifestForArtifact

func NewManifestForArtifact(master cpi.ArtifactAccess, a *ArtifactAccessImpl) *ManifestAccess

func (*ManifestAccess) AddBlob

func (m *ManifestAccess) AddBlob(access cpi.BlobAccess) error

func (*ManifestAccess) AddLayer

func (m *ManifestAccess) AddLayer(blob cpi.BlobAccess, d *artdesc.Descriptor) (int, error)

func (*ManifestAccess) Artifact

func (m *ManifestAccess) Artifact() *artdesc.Artifact

func (*ManifestAccess) Blob

func (a *ManifestAccess) Blob() (cpi.BlobAccess, error)

func (*ManifestAccess) Digest

func (a *ManifestAccess) Digest() digest.Digest

func (*ManifestAccess) GetBlob

func (m *ManifestAccess) GetBlob(digest digest.Digest) (cpi.BlobAccess, error)

func (*ManifestAccess) GetBlobDescriptor

func (m *ManifestAccess) GetBlobDescriptor(digest digest.Digest) *cpi.Descriptor

func (*ManifestAccess) GetConfigBlob

func (m *ManifestAccess) GetConfigBlob() (cpi.BlobAccess, error)

func (*ManifestAccess) GetDescriptor

func (m *ManifestAccess) GetDescriptor() *artdesc.Manifest

func (*ManifestAccess) Index

func (m *ManifestAccess) Index() (*artdesc.Index, error)

func (*ManifestAccess) IsIndex

func (a *ManifestAccess) IsIndex() bool

func (*ManifestAccess) IsManifest

func (a *ManifestAccess) IsManifest() bool

func (*ManifestAccess) IsReadOnly

func (a *ManifestAccess) IsReadOnly() bool

func (*ManifestAccess) IsValid

func (a *ManifestAccess) IsValid() bool

func (*ManifestAccess) Manifest

func (m *ManifestAccess) Manifest() (*artdesc.Manifest, error)

func (*ManifestAccess) SetConfigBlob

func (m *ManifestAccess) SetConfigBlob(blob cpi.BlobAccess, d *artdesc.Descriptor) error

type NamespaceAccessImpl

type NamespaceAccessImpl interface {
	cpi.NamespaceAccessImpl

	// GetBlobDescriptor(digest digest.Digest) *cpi.Descriptor
	IsReadOnly() bool

	WithContainer(container NamespaceContainer) NamespaceAccessImpl
}

func NewNamespaceAccessImpl

func NewNamespaceAccessImpl(namespace string, c NamespaceContainer, repo cpi.RepositoryViewManager) (NamespaceAccessImpl, error)

type NamespaceContainer

type NamespaceContainer interface {
	SetImplementation(impl NamespaceAccessImpl)

	IsReadOnly() bool

	cpi.BlobSource
	cpi.BlobSink

	Close() error

	GetArtifact(i NamespaceAccessImpl, vers string) (cpi.ArtifactAccess, error)
	NewArtifact(i NamespaceAccessImpl, arts ...cpi.Artifact) (cpi.ArtifactAccess, error)

	AddArtifact(artifact cpi.Artifact, tags ...string) (access blobaccess.BlobAccess, err error)

	AddTags(digest digest.Digest, tags ...string) error
	ListTags() ([]string, error)
	HasArtifact(vers string) (bool, error)
}

NamespaceContainer is the interface used by subsequent access objects to access the base implementation.

func GetArtifactSetContainer

func GetArtifactSetContainer(i cpi.NamespaceAccessImpl) (NamespaceContainer, error)

Jump to

Keyboard shortcuts

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