Documentation ¶
Overview ¶
See https://github.com/containers/image/blob/master/docs/policy.json.md
Index ¶
- Constants
- func IsMtreeNotExist(err error) bool
- type BlobStore
- type BlobStoreOci
- func (s *BlobStoreOci) ImageConfig(configDigest digest.Digest) (r ispecs.Image, err error)
- func (s *BlobStoreOci) ImageManifest(manifestDigest digest.Digest) (r ispecs.Manifest, err error)
- func (s *BlobStoreOci) NewLayerSource(rootfs string, files []string, deltafs bool) (src *LayerSource, err error)
- func (s *BlobStoreOci) PutImageConfig(cfg ispecs.Image, parentManifest *digest.Digest, m modifier) (d ispecs.Descriptor, manifest ispecs.Manifest, err error)
- func (s *BlobStoreOci) PutImageLayer(src *LayerSource, parentManifestDigest *digest.Digest, ...) (r *CommitResult, err error)
- func (s *BlobStoreOci) UnpackLayers(manifestDigest digest.Digest, rootfs string) (err error)
- type CommitResult
- type ImageFSROCache
- type ImageID
- type ImageIdStore
- func (s *ImageIdStore) Add(imageID, manifestDigest digest.Digest) (err error)
- func (s *ImageIdStore) Del(imageID digest.Digest) (err error)
- func (s *ImageIdStore) ImageID(imageID digest.Digest) (r ImageID, err error)
- func (s *ImageIdStore) ImageIDs() (r []ImageID, err error)
- func (s *ImageIdStore) MarkUsed(id digest.Digest) (err error)
- 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.Image, err error)
- func (s *ImageStoreRO) UnpackImageLayers(imageId digest.Digest, rootfs string) (err error)
- func (s *ImageStoreRO) WithNonAtomicAccess() *ImageStoreRO
- type ImageStoreRW
- func (s *ImageStoreRW) AddImageConfig(conf ispecs.Image, parentImageId *digest.Digest) (img image.Image, err error)
- func (s *ImageStoreRW) AddImageLayer(src image.LayerSource, parentImageId *digest.Digest, author, comment string) (r image.Image, err error)
- func (s *ImageStoreRW) Close() (err error)
- func (s *ImageStoreRW) ImportImage(src string) (img image.Image, err error)
- func (s *ImageStoreRW) MarkUsedImage(id digest.Digest) error
- func (s *ImageStoreRW) NewLayerSource(rootfs string) (r image.LayerSource, err error)
- func (s *ImageStoreRW) NewLayerSourceFromImage(rootfs string, img image.Image, filePattern []string, dest string, ...) (r image.LayerSource, err error)
- func (s *ImageStoreRW) NewLayerSourceOverlayed(rootfs, srcDir string, srcPattern []string, dest string, usr *idutils.UserIds) (r image.LayerSource, err error)
- func (s *ImageStoreRW) TagImage(imageId digest.Digest, tag string) (img image.Image, err error)
- func (s *ImageStoreRW) UntagImage(tag string) (err error)
- type LayerSource
- type MtreeStore
- func (s *MtreeStore) Create(rootfs string) (dh *mtree.DirectoryHierarchy, err error)
- func (s *MtreeStore) Diff(from, to *mtree.DirectoryHierarchy) (diffs []mtree.InodeDelta, err error)
- func (s *MtreeStore) Exists(manifestDigest digest.Digest) (bool, error)
- func (s *MtreeStore) Get(manifestDigest digest.Digest) (spec *mtree.DirectoryHierarchy, err error)
- func (s *MtreeStore) Put(manifestDigest digest.Digest, spec *mtree.DirectoryHierarchy) (err error)
- type TrustPolicyContext
Constants ¶
View Source
const (
AnnotationImported = "com.github.mgoltzsche.cntnr.image.imported"
)
View Source
const AnnotationParentImage = "com.github.mgoltzsche.cntnr.image.parent"
Variables ¶
This section is empty.
Functions ¶
func IsMtreeNotExist ¶
Types ¶
type BlobStore ¶
type BlobStore struct {
// contains filtered or unexported fields
}
func (*BlobStore) BlobFileInfo ¶
type BlobStoreOci ¶
type BlobStoreOci struct { *BlobStore // contains filtered or unexported fields }
func NewBlobStoreExt ¶
func NewBlobStoreExt(blobStore *BlobStore, mtreeStore *MtreeStore, rootless bool, debug log.Logger) BlobStoreOci
func (*BlobStoreOci) ImageConfig ¶
func (*BlobStoreOci) ImageManifest ¶
func (*BlobStoreOci) NewLayerSource ¶
func (s *BlobStoreOci) NewLayerSource(rootfs string, files []string, deltafs bool) (src *LayerSource, err error)
func (*BlobStoreOci) PutImageConfig ¶
func (s *BlobStoreOci) PutImageConfig(cfg ispecs.Image, parentManifest *digest.Digest, m modifier) (d ispecs.Descriptor, manifest ispecs.Manifest, err error)
func (*BlobStoreOci) PutImageLayer ¶
func (s *BlobStoreOci) PutImageLayer(src *LayerSource, parentManifestDigest *digest.Digest, author, createdBy string) (r *CommitResult, err error)
Writes the diff of rootfs to its parent as new layer into the store
func (*BlobStoreOci) UnpackLayers ¶
func (s *BlobStoreOci) UnpackLayers(manifestDigest digest.Digest, rootfs string) (err error)
Unpacks all layers contained in the referenced manifest into rootfs
type CommitResult ¶
type ImageFSROCache ¶
type ImageFSROCache struct {
// contains filtered or unexported fields
}
func NewImageFSROCache ¶
func NewImageFSROCache(dir string) *ImageFSROCache
type ImageIdStore ¶
type ImageIdStore struct {
// contains filtered or unexported fields
}
func NewImageIdStore ¶
func NewImageIdStore(dir string) (r ImageIdStore)
func (*ImageIdStore) Add ¶
func (s *ImageIdStore) Add(imageID, manifestDigest digest.Digest) (err error)
func (*ImageIdStore) ImageID ¶
func (s *ImageIdStore) ImageID(imageID digest.Digest) (r ImageID, err error)
func (*ImageIdStore) ImageIDs ¶
func (s *ImageIdStore) ImageIDs() (r []ImageID, err error)
type ImageRepo ¶
type ImageRepo struct {
// contains filtered or unexported fields
}
func OpenImageRepo ¶
func (*ImageRepo) AddRef ¶
func (r *ImageRepo) AddRef(descriptor ispecs.Descriptor)
type ImageStore ¶
type ImageStore struct { *ImageStoreRO // contains filtered or unexported fields }
func NewImageStore ¶
func NewImageStore(store *ImageStoreRO, fsCache *ImageFSROCache, temp string, systemContext *types.SystemContext, trustPolicy TrustPolicyContext, rootless bool, loggers log.Loggers) (*ImageStore, 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 *BlobStoreOci, 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) UnpackImageLayers ¶
func (s *ImageStoreRO) UnpackImageLayers(imageId digest.Digest, rootfs string) (err error)
func (*ImageStoreRO) WithNonAtomicAccess ¶
func (s *ImageStoreRO) WithNonAtomicAccess() *ImageStoreRO
type ImageStoreRW ¶
type ImageStoreRW struct { *ImageStoreRO // contains filtered or unexported fields }
func NewImageStoreRW ¶
func NewImageStoreRW(locker lock.Locker, roStore *ImageStoreRO, fsCache *ImageFSROCache, tmpDir string, systemContext *types.SystemContext, trustPolicy TrustPolicyContext, rootless bool, loggers log.Loggers) (r *ImageStoreRW, err error)
func (*ImageStoreRW) AddImageConfig ¶
func (*ImageStoreRW) AddImageLayer ¶
func (s *ImageStoreRW) AddImageLayer(src image.LayerSource, parentImageId *digest.Digest, author, comment string) (r image.Image, err error)
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) MarkUsedImage ¶
func (s *ImageStoreRW) MarkUsedImage(id digest.Digest) error
func (*ImageStoreRW) NewLayerSource ¶
func (s *ImageStoreRW) NewLayerSource(rootfs string) (r image.LayerSource, err error)
func (*ImageStoreRW) NewLayerSourceFromImage ¶
func (*ImageStoreRW) NewLayerSourceOverlayed ¶
func (s *ImageStoreRW) NewLayerSourceOverlayed(rootfs, srcDir string, srcPattern []string, dest string, usr *idutils.UserIds) (r image.LayerSource, err error)
func (*ImageStoreRW) UntagImage ¶
func (s *ImageStoreRW) UntagImage(tag string) (err error)
type LayerSource ¶
type LayerSource struct {
// contains filtered or unexported fields
}
func (*LayerSource) Close ¶
func (s *LayerSource) Close() (err error)
type MtreeStore ¶
type MtreeStore struct {
// contains filtered or unexported fields
}
TODO: RetainAll(manifestDigests)
func NewMtreeStore ¶
func NewMtreeStore(dir string, fsEval mtree.FsEval, debug log.Logger) MtreeStore
func (*MtreeStore) Create ¶
func (s *MtreeStore) Create(rootfs string) (dh *mtree.DirectoryHierarchy, err error)
func (*MtreeStore) Diff ¶
func (s *MtreeStore) Diff(from, to *mtree.DirectoryHierarchy) (diffs []mtree.InodeDelta, err error)
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.