Documentation ¶
Overview ¶
See https://github.com/containers/image/blob/master/docs/policy.json.md
Index ¶
- Constants
- type BlobStore
- func (s BlobStore) Delete(key digest.Digest) (err error)
- func (s BlobStore) Exists(key digest.Digest) (r bool, err error)
- func (s BlobStore) Get(key digest.Digest) (f io.ReadCloser, err error)
- func (s BlobStore) Keys() (r []digest.Digest, err error)
- func (s BlobStore) Put(key digest.Digest, content io.Reader) (written int64, err error)
- func (s BlobStore) Retain(keep map[digest.Digest]bool) (err error)
- type CommitResult
- type ContentAddressableStore
- type FsSpecStore
- type ImageID
- type ImageIdStore
- type ImageRepo
- type ImageStore
- type ImageStoreRO
- func (s *ImageStoreRO) Image(id digest.Digest) (r image.Image, err error)
- func (s *ImageStoreRO) ImageByName(nameRef string) (r image.Image, err error)
- func (s *ImageStoreRO) ImageConfig(id digest.Digest) (ispecs.Image, error)
- func (s *ImageStoreRO) Images() (r []*image.ImageInfo, err error)
- func (s *ImageStoreRO) Repos() (r []*ImageRepo, err error)
- func (s *ImageStoreRO) RetainRepo(repoName string, keep map[digest.Digest]bool, maxPerRepo int) (err error)
- func (s *ImageStoreRO) UnpackImageLayers(imageId digest.Digest, rootfs string) (err error)
- type ImageStoreRW
- func (s *ImageStoreRW) AddImageConfig(conf ispecs.Image, parentImageId *digest.Digest) (img image.Image, err error)
- func (s *ImageStoreRW) AddLayer(rootfs fs.FsNode, parentImageId *digest.Digest, author, createdByOp string) (img image.Image, err error)
- func (s *ImageStoreRW) Close() (err error)
- func (s *ImageStoreRW) FS(imageId digest.Digest) (r fs.FsNode, err error)
- func (s *ImageStoreRW) ImportImage(src string) (img image.Image, err error)
- func (s *ImageStoreRW) SupportsTransport(transportName string) bool
- func (s *ImageStoreRW) TagImage(imageId digest.Digest, tagStr string) (img image.ImageInfo, err error)
- func (s *ImageStoreRW) UntagImage(tagStr string) (err error)
- type LockedImageRepo
- type OCIBlobStore
- func (s *OCIBlobStore) AddLayer(rootfs fs.FsNode, parentManifestDigest *digest.Digest, ...) (r *CommitResult, err error)
- func (s *OCIBlobStore) FS(manifestDigest digest.Digest) (r fs.FsNode, err error)
- func (s *OCIBlobStore) FSSpec(manifestDigest digest.Digest) (r fs.FsNode, err error)
- func (s *OCIBlobStore) ImageConfig(configDigest digest.Digest) (r ispecs.Image, err error)
- func (s *OCIBlobStore) ImageManifest(manifestDigest digest.Digest) (r ispecs.Manifest, err error)
- func (s *OCIBlobStore) PutImageConfig(cfg ispecs.Image, parentManifestId *digest.Digest) (d ispecs.Descriptor, manifest ispecs.Manifest, err error)
- func (s *OCIBlobStore) UnpackLayers(manifestDigest digest.Digest, dest string) (err error)
- type TrustPolicyContext
Constants ¶
View Source
const ( AnnotationImported = "com.github.mgoltzsche.ctnr.image.imported" AnnotationParentManifest = "com.github.mgoltzsche.ctnr.image.parent.manifest" )
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type CommitResult ¶
type ContentAddressableStore ¶
type ContentAddressableStore struct {
BlobStore
}
func NewContentAddressableStore ¶
func NewContentAddressableStore(dir string) (r ContentAddressableStore)
type FsSpecStore ¶
type FsSpecStore struct { BlobStore // contains filtered or unexported fields }
func NewFsSpecStore ¶
func NewFsSpecStore(dir string, debug log.Logger) FsSpecStore
type ImageIdStore ¶
type ImageIdStore struct {
BlobStore
}
func NewImageIdStore ¶
func NewImageIdStore(dir string) ImageIdStore
func (*ImageIdStore) Entries ¶
func (s *ImageIdStore) Entries() (r []ImageID, err error)
func (*ImageIdStore) Get ¶
func (s *ImageIdStore) Get(imageID digest.Digest) (r ImageID, err error)
func (*ImageIdStore) Put ¶
func (s *ImageIdStore) Put(imageID, manifestDigest digest.Digest) (err error)
type ImageRepo ¶
type ImageRepo struct { Name string // contains filtered or unexported fields }
Read-only OCI image index representation
func NewImageRepo ¶
type ImageStore ¶
type ImageStore struct { *ImageStoreRO // contains filtered or unexported fields }
func NewImageStore ¶
func NewImageStore(locker lock.ExclusiveLocker, store *ImageStoreRO, temp string, systemContext *types.SystemContext, trustPolicy TrustPolicyContext, rootless bool, loggers log.Loggers) *ImageStore
func (*ImageStore) ImageGC ¶
func (s *ImageStore) ImageGC(ttl, refTTL time.Duration, maxPerRepo int) (err error)
func (*ImageStore) OpenLockedImageStore ¶
func (s *ImageStore) OpenLockedImageStore() (image.ImageStoreRW, error)
type ImageStoreRO ¶
type ImageStoreRO struct {
// contains filtered or unexported fields
}
func NewImageStoreRO ¶
func NewImageStoreRO(dir string, blobStore *OCIBlobStore, imageIds ImageIdStore, warn log.Logger) (r *ImageStoreRO)
func (*ImageStoreRO) ImageByName ¶
func (s *ImageStoreRO) ImageByName(nameRef string) (r image.Image, err error)
func (*ImageStoreRO) ImageConfig ¶
func (*ImageStoreRO) Repos ¶
func (s *ImageStoreRO) Repos() (r []*ImageRepo, err error)
func (*ImageStoreRO) RetainRepo ¶
func (*ImageStoreRO) UnpackImageLayers ¶
func (s *ImageStoreRO) UnpackImageLayers(imageId digest.Digest, rootfs string) (err error)
type ImageStoreRW ¶
type ImageStoreRW struct { *ImageStoreRO // contains filtered or unexported fields }
func NewImageStoreRW ¶
func NewImageStoreRW(locker lock.Locker, roStore *ImageStoreRO, tmpDir string, systemContext *types.SystemContext, trustPolicy TrustPolicyContext, rootless bool, loggers log.Loggers) (r *ImageStoreRW, err error)
func (*ImageStoreRW) AddImageConfig ¶
func (*ImageStoreRW) Close ¶
func (s *ImageStoreRW) Close() (err error)
func (*ImageStoreRW) ImportImage ¶
func (s *ImageStoreRW) ImportImage(src string) (img image.Image, err error)
func (*ImageStoreRW) SupportsTransport ¶
func (s *ImageStoreRW) SupportsTransport(transportName string) bool
func (*ImageStoreRW) TagImage ¶
func (s *ImageStoreRW) TagImage(imageId digest.Digest, tagStr string) (img image.ImageInfo, err error)
Creates a new image ref. Overwrites existing refs.
func (*ImageStoreRW) UntagImage ¶
func (s *ImageStoreRW) UntagImage(tagStr string) (err error)
type LockedImageRepo ¶
type LockedImageRepo struct { *ImageRepo // contains filtered or unexported fields }
Writeable OCI image index representation
func NewLockedImageRepo ¶
func NewLockedImageRepo(name, dir, extBlobDir string) (r *LockedImageRepo, err error)
func (*LockedImageRepo) AddManifest ¶
func (r *LockedImageRepo) AddManifest(descriptor ispecs.Descriptor)
Adds a manifest descriptor
func (*LockedImageRepo) Close ¶
func (r *LockedImageRepo) Close() (err error)
Writes the image index to disk and releases the lock
func (*LockedImageRepo) DelManifest ¶
func (r *LockedImageRepo) DelManifest(ref string)
func (*LockedImageRepo) Limit ¶
func (s *LockedImageRepo) Limit(maxPerRepo int)
func (*LockedImageRepo) Retain ¶
func (s *LockedImageRepo) Retain(keepManifests map[digest.Digest]bool)
type OCIBlobStore ¶
type OCIBlobStore struct { *ContentAddressableStore // contains filtered or unexported fields }
func NewOCIBlobStore ¶
func NewOCIBlobStore(blobStore *ContentAddressableStore, fsSpecStore *FsSpecStore, rootless bool, warn log.Logger, debug log.Logger) OCIBlobStore
func (*OCIBlobStore) AddLayer ¶
func (s *OCIBlobStore) AddLayer(rootfs fs.FsNode, parentManifestDigest *digest.Digest, author, createdBy string) (r *CommitResult, err error)
Creates a new image with a layer containing the provided file system's difference to the parent provided image.
func (*OCIBlobStore) ImageConfig ¶
func (*OCIBlobStore) ImageManifest ¶
func (*OCIBlobStore) PutImageConfig ¶
func (s *OCIBlobStore) PutImageConfig(cfg ispecs.Image, parentManifestId *digest.Digest) (d ispecs.Descriptor, manifest ispecs.Manifest, err error)
func (*OCIBlobStore) UnpackLayers ¶
func (s *OCIBlobStore) UnpackLayers(manifestDigest digest.Digest, dest string) (err error)
Unpacks all layers contained in the referenced manifest into rootfs
type TrustPolicyContext ¶
type TrustPolicyContext interface {
Policy() (*signature.PolicyContext, error)
}
func TrustPolicyDefault ¶
func TrustPolicyDefault(ctx *types.SystemContext) TrustPolicyContext
func TrustPolicyFromFile ¶
func TrustPolicyFromFile(file string) TrustPolicyContext
func TrustPolicyInsecure ¶
func TrustPolicyInsecure() TrustPolicyContext
func TrustPolicyReject ¶
func TrustPolicyReject() TrustPolicyContext
Click to show internal directories.
Click to hide internal directories.