Documentation
¶
Overview ¶
Package nativeconverter provides containerd-native converter that does not depend on github.com/google/go-containerregistry. Most codes except nativeconverter/estargz will be moved to the containerd main repo later.
Index ¶
- Constants
- func ClearGCLabels(labels map[string]string, dgst digest.Digest)
- func ConvertDockerMediaTypeToOCI(mt string) string
- func GetDiffID(ctx context.Context, cs content.Store, desc ocispec.Descriptor) (digest.Digest, error)
- func IsConfigType(mt string) bool
- func IsDockerType(mt string) bool
- func IsIndexType(mt string) bool
- func IsManifestType(mt string) bool
- type ConvertFunc
- type ConvertOpt
- type Converter
- type DualConfig
- type DualIndex
- type DualManifest
- type ObjectWithMediaType
Constants ¶
const LabelUncompressed = "containerd.io/uncompressed"
Variables ¶
This section is empty.
Functions ¶
func ClearGCLabels ¶
func GetDiffID ¶
func GetDiffID(ctx context.Context, cs content.Store, desc ocispec.Descriptor) (digest.Digest, error)
GetDiffID gets the diff ID of the layer blob descriptor.
func IsConfigType ¶
func IsDockerType ¶
func IsIndexType ¶
func IsManifestType ¶
Types ¶
type ConvertFunc ¶
type ConvertFunc func(ctx context.Context, cs content.Store, desc ocispec.Descriptor) (*ocispec.Descriptor, error)
ConvertFunc returns a converted content descriptor. When the content was not converted, ConvertContentFunc returns nil.
func DefaultIndexConvertFunc ¶
func DefaultIndexConvertFunc(layerConvertFunc ConvertFunc, docker2oci bool, platformMC platforms.MatchComparer) ConvertFunc
DefaultIndexConvertFunc is the default convert func.
type ConvertOpt ¶
type ConvertOpt func(*convertOpts) error
ConvertOpt is an option for Convert()
func WithDockerToOCI ¶
func WithDockerToOCI(v bool) ConvertOpt
WithDockerToOCI converts Docker media types into OCI ones.
func WithIndexConvertFunc ¶
func WithIndexConvertFunc(fn ConvertFunc) ConvertOpt
WithIndexConvertFunc specifies the function that converts manifests and index (manifest lists). Defaults to DefaultIndexConvertFunc.
func WithLayerConvertFunc ¶
func WithLayerConvertFunc(fn ConvertFunc) ConvertOpt
WithLayerConvertFunc specifies the function that converts layers.
func WithPlatform ¶
func WithPlatform(p platforms.MatchComparer) ConvertOpt
WithPlatform specifies the platform. Defaults to all platforms.
type Converter ¶
type Converter struct {
// contains filtered or unexported fields
}
Converter provides converter.
type DualConfig ¶
type DualConfig map[string]*json.RawMessage
DualConfig covers Docker config (v1.0, v1.1, v1.2) and OCI config. Unmarshalled as map[string]*json.RawMessage to retain unknown fields on remarshalling.
type DualIndex ¶
type DualIndex struct { ocispec.Index ObjectWithMediaType }
DualIndex covers Docker manifest list and OCI index
type DualManifest ¶
type DualManifest struct { ocispec.Manifest ObjectWithMediaType }
DualManifest covers Docker manifest and OCI manifest
type ObjectWithMediaType ¶
type ObjectWithMediaType struct { // MediaType appears on Docker manifests and manifest lists. // MediaType does not apper on OCI manifests and index MediaType string `json:"mediaType,omitempty"` }