Documentation ¶
Index ¶
- Constants
- func ArchiveBlobTypes() []string
- func ArtifactMimeType(cur, def string, legacy bool) string
- func ContentTypes() []string
- func DescriptorTypes() []string
- func Encode(d *Artifact) ([]byte, error)
- func EncodeIndex(d *Index) ([]byte, error)
- func EncodeManifest(d *Manifest) ([]byte, error)
- func IsDigest(version string) (bool, digest.Digest)
- func IsOCIMediaType(media string) bool
- func MapArtifactBlobMimeType(blob blobaccess.BlobAccess, legacy bool) blobaccess.BlobAccess
- func MapArtifactMimeType(mime string, legacy bool) string
- func ToArchiveMediaTypes(media string) []string
- func ToContentMediaType(media string) string
- func ToDescriptorMediaType(media string) string
- type Artifact
- func (d *Artifact) Artifact() *Artifact
- func (d *Artifact) Blob() (blobaccess.BlobAccess, error)
- func (d *Artifact) DeleteAnnotation(name string) error
- func (d *Artifact) Digest() digest.Digest
- func (d *Artifact) GetAnnotation(name string) string
- func (d *Artifact) GetBlobDescriptor(digest digest.Digest) *Descriptor
- func (d *Artifact) Index() (*Index, error)
- func (d *Artifact) IsIndex() bool
- func (d *Artifact) IsManifest() bool
- func (d *Artifact) IsValid() bool
- func (d *Artifact) Manifest() (*Manifest, error)
- func (d Artifact) MarshalJSON() ([]byte, error)
- func (d *Artifact) MimeType() string
- func (d *Artifact) SetAnnotation(name, value string) error
- func (d *Artifact) SetIndex(i *Index) error
- func (d *Artifact) SetManifest(m *Manifest) error
- func (d *Artifact) ToBlobAccess() (blobaccess.BlobAccess, error)
- func (d *Artifact) UnmarshalJSON(data []byte) error
- type ArtifactDescriptor
- type BlobDescriptorSource
- type Descriptor
- type ImageConfig
- type Index
- func (i *Index) AddManifest(d *Descriptor)
- func (i *Index) Artifact() *Artifact
- func (i *Index) Blob() (blobaccess.BlobAccess, error)
- func (i *Index) DeleteAnnotation(name string)
- func (i *Index) Digest() digest.Digest
- func (i *Index) GetBlobDescriptor(digest digest.Digest) *Descriptor
- func (i *Index) Index() (*Index, error)
- func (i *Index) IsIndex() bool
- func (i *Index) IsManifest() bool
- func (i *Index) IsValid() bool
- func (i *Index) Manifest() (*Manifest, error)
- func (i *Index) MimeType() string
- func (i *Index) SetAnnotation(name, value string)
- type Manifest
- func (i *Manifest) Artifact() *Artifact
- func (m *Manifest) Blob() (blobaccess.BlobAccess, error)
- func (m *Manifest) DeleteAnnotation(name string)
- func (i *Manifest) Digest() digest.Digest
- func (m *Manifest) GetBlobDescriptor(digest digest.Digest) *Descriptor
- func (i *Manifest) Index() (*Index, error)
- func (i *Manifest) IsIndex() bool
- func (i *Manifest) IsManifest() bool
- func (i *Manifest) IsValid() bool
- func (i *Manifest) Manifest() (*Manifest, error)
- func (m *Manifest) MimeType() string
- func (m *Manifest) SetAnnotation(name, value string)
- type Platform
Constants ¶
View Source
const ( MediaTypeImageManifest = ociv1.MediaTypeImageManifest MediaTypeImageIndex = ociv1.MediaTypeImageIndex MediaTypeImageLayer = ociv1.MediaTypeImageLayer MediaTypeImageLayerGzip = ociv1.MediaTypeImageLayerGzip MediaTypeDockerSchema2Manifest = images.MediaTypeDockerSchema2Manifest MediaTypeDockerSchema2ManifestList = images.MediaTypeDockerSchema2ManifestList MediaTypeImageConfig = ociv1.MediaTypeImageConfig )
View Source
const SchemeVersion = helper.SchemeVersion
Variables ¶
This section is empty.
Functions ¶
func ArchiveBlobTypes ¶
func ArchiveBlobTypes() []string
func ArtifactMimeType ¶
func ContentTypes ¶
func ContentTypes() []string
func DescriptorTypes ¶
func DescriptorTypes() []string
func EncodeIndex ¶
func EncodeManifest ¶
func IsOCIMediaType ¶
func MapArtifactBlobMimeType ¶
func MapArtifactBlobMimeType(blob blobaccess.BlobAccess, legacy bool) blobaccess.BlobAccess
func MapArtifactMimeType ¶
func ToArchiveMediaTypes ¶
func ToContentMediaType ¶
func ToDescriptorMediaType ¶
Types ¶
type Artifact ¶
type Artifact struct {
// contains filtered or unexported fields
}
Artifact is the unified representation of an OCI artifact according to https://github.com/opencontainers/image-spec/blob/main/manifest.md It is either an image manifest or an image index manifest (fat image).
func NewIndexArtifact ¶
func NewIndexArtifact() *Artifact
func NewManifestArtifact ¶
func NewManifestArtifact() *Artifact
func (*Artifact) Blob ¶
func (d *Artifact) Blob() (blobaccess.BlobAccess, error)
func (*Artifact) DeleteAnnotation ¶
func (*Artifact) GetAnnotation ¶
func (*Artifact) GetBlobDescriptor ¶
func (d *Artifact) GetBlobDescriptor(digest digest.Digest) *Descriptor
func (*Artifact) IsManifest ¶
func (Artifact) MarshalJSON ¶
func (*Artifact) SetAnnotation ¶
func (*Artifact) SetManifest ¶
func (*Artifact) ToBlobAccess ¶
func (d *Artifact) ToBlobAccess() (blobaccess.BlobAccess, error)
func (*Artifact) UnmarshalJSON ¶
type ArtifactDescriptor ¶
type BlobDescriptorSource ¶
type BlobDescriptorSource interface { GetBlobDescriptor(digest.Digest) *Descriptor MimeType() string IsValid() bool }
type Descriptor ¶
type Descriptor = ociv1.Descriptor
func DefaultBlobDescriptor ¶
func DefaultBlobDescriptor(blob blobaccess.BlobAccess) *Descriptor
type ImageConfig ¶
func ParseImageConfig ¶
func ParseImageConfig(blob blobaccess.BlobAccess) (*ImageConfig, error)
type Index ¶
func DecodeIndex ¶
func (*Index) AddManifest ¶
func (i *Index) AddManifest(d *Descriptor)
func (*Index) Blob ¶
func (i *Index) Blob() (blobaccess.BlobAccess, error)
func (*Index) DeleteAnnotation ¶
func (*Index) GetBlobDescriptor ¶
func (i *Index) GetBlobDescriptor(digest digest.Digest) *Descriptor
func (*Index) IsManifest ¶
func (*Index) SetAnnotation ¶
type Manifest ¶
func DecodeManifest ¶
func NewManifest ¶
func NewManifest() *Manifest
func (*Manifest) Blob ¶
func (m *Manifest) Blob() (blobaccess.BlobAccess, error)
func (*Manifest) DeleteAnnotation ¶
func (*Manifest) GetBlobDescriptor ¶
func (m *Manifest) GetBlobDescriptor(digest digest.Digest) *Descriptor
func (*Manifest) IsManifest ¶
func (*Manifest) SetAnnotation ¶
Click to show internal directories.
Click to hide internal directories.