Documentation ¶
Index ¶
- func CheckAuthorization(ctx context.Context, cs content.Store, desc ocispec.Descriptor, ...) error
- func DecryptImage(ctx context.Context, cs content.Store, desc ocispec.Descriptor, ...) (ocispec.Descriptor, bool, error)
- func EncryptImage(ctx context.Context, cs content.Store, desc ocispec.Descriptor, ...) (ocispec.Descriptor, bool, error)
- func HasEncryptedLayer(ctx context.Context, layerInfos []ocispec.Descriptor) bool
- func IsEncryptedDiff(ctx context.Context, mediaType string) bool
- type LayerFilter
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func CheckAuthorization ¶
func CheckAuthorization(ctx context.Context, cs content.Store, desc ocispec.Descriptor, dc *encconfig.DecryptConfig) error
CheckAuthorization checks whether a user has the right keys to be allowed to access an image (every layer) It takes decrypting of the layers only as far as decrypting the asymmetrically encrypted data The decryption is only done for the current platform
func DecryptImage ¶
func DecryptImage(ctx context.Context, cs content.Store, desc ocispec.Descriptor, cc *encconfig.CryptoConfig, lf LayerFilter) (ocispec.Descriptor, bool, error)
DecryptImage decrypts an image; it accepts either an OCI descriptor representing a manifest list or a single manifest
func EncryptImage ¶
func EncryptImage(ctx context.Context, cs content.Store, desc ocispec.Descriptor, cc *encconfig.CryptoConfig, lf LayerFilter) (ocispec.Descriptor, bool, error)
EncryptImage encrypts an image; it accepts either an OCI descriptor representing a manifest list or a single manifest
func HasEncryptedLayer ¶
func HasEncryptedLayer(ctx context.Context, layerInfos []ocispec.Descriptor) bool
HasEncryptedLayer returns true if any LayerInfo indicates that the layer is encrypted
Types ¶
type LayerFilter ¶
type LayerFilter func(desc ocispec.Descriptor) bool
LayerFilter allows to select Layers by certain criteria
Click to show internal directories.
Click to hide internal directories.