Documentation ¶
Index ¶
- Constants
- func ArchiveBlobTypes() []string
- func ArtefactMimeType(cur, def string, legacy bool) string
- func ContentTypes() []string
- func DescriptorTypes() []string
- func Encode(d *Artefact) ([]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 MapArtefactBlobMimeType(blob accessio.BlobAccess, legacy bool) accessio.BlobAccess
- func MapArtefactMimeType(mime string, legacy bool) string
- func ToContentMediaType(media string) string
- func ToDescriptorMediaType(media string) string
- type Artefact
- func (d *Artefact) GetBlobDescriptor(digest digest.Digest) *Descriptor
- func (d *Artefact) Index() *Index
- func (d *Artefact) IsIndex() bool
- func (d *Artefact) IsManifest() bool
- func (d *Artefact) IsValid() bool
- func (d *Artefact) Manifest() *Manifest
- func (d Artefact) MarshalJSON() ([]byte, error)
- func (d *Artefact) MimeType() string
- func (d *Artefact) SetIndex(i *Index) error
- func (d *Artefact) SetManifest(m *Manifest) error
- func (d *Artefact) ToBlobAccess() (accessio.BlobAccess, error)
- func (d *Artefact) UnmarshalJSON(data []byte) error
- type BlobDescriptorSource
- type Descriptor
- type ImageConfig
- type Index
- type Manifest
- type Platform
Constants ¶
View Source
const ( MediaTypeImageManifest = ociv1.MediaTypeImageManifest MediaTypeImageIndex = ociv1.MediaTypeImageIndex MediaTypeImageLayer = ociv1.MediaTypeImageLayer MediaTypeImageLayerGzip = ociv1.MediaTypeImageLayerGzip MediaTypeDockerSchema2Manifest = images.MediaTypeDockerSchema2Manifest MediaTypeDockerSchema2ManifestList = images.MediaTypeDockerSchema2ManifestList )
View Source
const SchemeVersion = helper.SchemeVersion
Variables ¶
This section is empty.
Functions ¶
func ArchiveBlobTypes ¶
func ArchiveBlobTypes() []string
func ArtefactMimeType ¶
func ContentTypes ¶
func ContentTypes() []string
func DescriptorTypes ¶
func DescriptorTypes() []string
func EncodeIndex ¶
func EncodeManifest ¶
func IsOCIMediaType ¶
func MapArtefactBlobMimeType ¶
func MapArtefactBlobMimeType(blob accessio.BlobAccess, legacy bool) accessio.BlobAccess
func MapArtefactMimeType ¶
func ToContentMediaType ¶
func ToDescriptorMediaType ¶
Types ¶
type Artefact ¶
type Artefact struct {
// contains filtered or unexported fields
}
Artefact is the unified representation of an OCI artefact 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 NewIndexArtefact ¶
func NewIndexArtefact() *Artefact
func NewManifestArtefact ¶
func NewManifestArtefact() *Artefact
func (*Artefact) GetBlobDescriptor ¶
func (d *Artefact) GetBlobDescriptor(digest digest.Digest) *Descriptor
func (*Artefact) IsManifest ¶
func (Artefact) MarshalJSON ¶
func (*Artefact) SetManifest ¶
func (*Artefact) ToBlobAccess ¶
func (d *Artefact) ToBlobAccess() (accessio.BlobAccess, error)
func (*Artefact) UnmarshalJSON ¶
type BlobDescriptorSource ¶
type BlobDescriptorSource interface { GetBlobDescriptor(digest.Digest) *Descriptor MimeType() string IsValid() bool }
type Descriptor ¶
type Descriptor = ociv1.Descriptor
func DefaultBlobDescriptor ¶
func DefaultBlobDescriptor(blob accessio.BlobAccess) *Descriptor
type ImageConfig ¶
func ParseImageConfig ¶
func ParseImageConfig(blob accessio.BlobAccess) (*ImageConfig, error)
type Index ¶
func DecodeIndex ¶
func (*Index) AddManifest ¶
func (i *Index) AddManifest(d *Descriptor)
func (*Index) GetBlobDescriptor ¶
func (i *Index) GetBlobDescriptor(digest digest.Digest) *Descriptor
func (*Index) ToBlobAccess ¶
func (i *Index) ToBlobAccess() (accessio.BlobAccess, error)
type Manifest ¶
func DecodeManifest ¶
func NewManifest ¶
func NewManifest() *Manifest
func (*Manifest) GetBlobDescriptor ¶
func (m *Manifest) GetBlobDescriptor(digest digest.Digest) *Descriptor
func (*Manifest) ToBlobAccess ¶
func (m *Manifest) ToBlobAccess() (accessio.BlobAccess, error)
Click to show internal directories.
Click to hide internal directories.