Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
var ( ErrObjectNil = fmt.Errorf("object is nil") ErrUnsupportedMediaType = fmt.Errorf("unsupported Medatype") )
Some common errors
Functions ¶
This section is empty.
Types ¶
type Config ¶
type Config struct {
Layout *Layout // the layout that references this image config
Ref string // the reference name that references this image config
Manifest *Manifest // the manifest that references this image config
ImageConfig *v1.Image // the actual OCI image config
}
Config carries the layout and ref name, plus the full structure for the OCI image manifest
type DigestRef ¶
DigestRef for name to digest mapping and validating the blob at the address is actually the expected size.
func (DigestRef) Calculate ¶
Calculate the checksum of the backing blob for this digest, with the prescribed hash.
func (DigestRef) HashName ¶
HashName provides just the hash name portion of the digest string (e.g. "sha256:ed2dca..." -> "sha256")
type Layout ¶
Layout is an OCI image layout that includes descriptor refs and the content addressible objects pointed to by the descriptors.
func (*Layout) Blobs ¶
Blobs gives the path to all regular files or symlinks in this layout's "blobs" directory
func (Layout) GetBlob ¶
func (l Layout) GetBlob(digest DigestRef) (io.ReadCloser, error)
GetBlob returns the stream for a blob addressed by it's digest (`sha256:abcde123456...`)
func (Layout) OCIVersion ¶
OCIVersion reads the OCI image layout version for this layout
type Layouts ¶
Layouts is a collections OCI image layouts
func WalkForLayouts ¶
WalkForLayouts looks through rootpath for OCI image-layout directories. Namely a directory that has "refs" and "blobs" directory, and an oci-layout file.
type Manifest ¶
Manifest carries the layout and ref name, plus the full structure for the OCI image manifest
func ManifestFromDescriptor ¶
ManifestFromDescriptor simplifies the reaching of manifest as the descriptors are accessed
func (*Manifest) Config ¶
Config provides the structure for this particular view of this layout reference of the config
func (Manifest) ConfigReader ¶
func (m Manifest) ConfigReader() (io.ReadCloser, error)
ConfigReader gives access to the raw body of the config for this manifest. The caller is responsible to close the io.ReadCloser