Documentation ¶
Index ¶
- Variables
- func ConvertAllLayerMediaTypes(ctx context.Context, oci bool, descs ...ocispecs.Descriptor) []ocispecs.Descriptor
- func DetectLayerMediaType(ctx context.Context, cs content.Store, id digest.Digest, oci bool) (string, error)
- func IsMediaType(ct Type, mt string) bool
- type Compressor
- type Config
- type Decompressor
- type Finalizer
- type Type
Constants ¶
This section is empty.
Variables ¶
View Source
var ( // Uncompressed indicates no compression. Uncompressed = uncompressedType{} // Gzip is used for blob data. Gzip = gzipType{} // EStargz is used for estargz data. EStargz = estargzType{} // Zstd is used for Zstandard data. Zstd = zstdType{} )
View Source
var Default = Gzip
View Source
var EStargzAnnotations = []string{estargz.TOCJSONDigestAnnotation, estargz.StoreUncompressedSizeAnnotation}
Functions ¶
func ConvertAllLayerMediaTypes ¶
func ConvertAllLayerMediaTypes(ctx context.Context, oci bool, descs ...ocispecs.Descriptor) []ocispecs.Descriptor
func DetectLayerMediaType ¶
func DetectLayerMediaType(ctx context.Context, cs content.Store, id digest.Digest, oci bool) (string, error)
DetectLayerMediaType returns media type from existing blob data.
func IsMediaType ¶ added in v0.11.0
Types ¶
type Compressor ¶ added in v0.11.0
type Config ¶ added in v0.10.0
func ParseAttributes ¶ added in v0.12.0
type Decompressor ¶ added in v0.11.0
type Decompressor func(ctx context.Context, cs content.Store, desc ocispecs.Descriptor) (io.ReadCloser, error)
type Type ¶
type Type interface { Compress(ctx context.Context, comp Config) (compressorFunc Compressor, finalize Finalizer) Decompress(ctx context.Context, cs content.Store, desc ocispecs.Descriptor) (io.ReadCloser, error) NeedsConversion(ctx context.Context, cs content.Store, desc ocispecs.Descriptor) (bool, error) NeedsComputeDiffBySelf(comp Config) bool OnlySupportOCITypes() bool MediaType() string String() string }
Type represents compression type for blob data, which needs to be implemented for each compression type.
func FromMediaType ¶ added in v0.10.0
Click to show internal directories.
Click to hide internal directories.