Versions in this module Expand all Collapse all v0 v0.0.1 Jun 30, 2021 Changes in this version + const AnnotationDiskIndexPathPattern + const AnnotationInitrdPath + const AnnotationKernelPath + const AnnotationMediaType + const AnnotationOther + const AnnotationRole + const AnnotationRootPath + const DefaultArch + const DefaultAuthor + const DefaultOS + const MimeTypeDockerImageConfig + const MimeTypeDockerImageIndex + const MimeTypeDockerImageManifest + const MimeTypeDockerLayerTar + const MimeTypeDockerLayerTarGzip + const MimeTypeECIConfig + const MimeTypeECIDiskISO + const MimeTypeECIDiskOva + const MimeTypeECIDiskQcow + const MimeTypeECIDiskQcow2 + const MimeTypeECIDiskRaw + const MimeTypeECIDiskVhd + const MimeTypeECIDiskVhdx + const MimeTypeECIDiskVmdk + const MimeTypeECIInitrd + const MimeTypeECIKernel + const MimeTypeECIOther + const MimeTypeOCIImageConfig + const MimeTypeOCIImageIndex + const MimeTypeOCIImageLayer + const MimeTypeOCIImageLayerGzip + const MimeTypeOCIImageManifest + const RoleAdditionalDisk + const RoleInitrd + const RoleKernel + const RoleRootDisk + var MimeToType = map[string]DiskType + var NameToType = map[string]DiskType + var TypeToMime = map[DiskType]string + func AllMimeTypes() []string + func GetConfigMediaType(actualType string, format Format) string + func GetLayerMediaType(actualType string, format Format) string + func IsConfigType(mediaType string) bool + type Artifact struct + Config Source + Disks []*Disk + Initrd Source + Kernel Source + Other []Source + Root *Disk + func (a Artifact) Manifest(format Format, configOpts ConfigOpts, legacyOpts ...LegacyOpt) (*ocispec.Manifest, ctrcontent.Provider, error) + type ConfigOpts struct + Architecture string + Author string + OS string + type DirTarget struct + Dir string + func (d DirTarget) Ingester() IngesterCloser + func (d DirTarget) MultiWriter() bool + type Disk struct + Source Source + Type DiskType + type DiskType int + const ISO + const Ova + const Qcow + const Qcow2 + const Raw + const Vhd + const Vhdx + const Vmdk + func (d DiskType) String() string + type FileSource struct + Path string + func (f *FileSource) GetContent() []byte + func (f *FileSource) GetDigest() string + func (f *FileSource) GetName() string + func (f *FileSource) GetPath() string + func (f *FileSource) GetSize() int64 + type FilesTarget struct + AcceptHash bool + BlockSize int + Config io.Writer + Disks []io.Writer + Initrd io.Writer + Kernel io.Writer + Other []io.Writer + Root io.Writer + func (f *FilesTarget) Close() error + func (f *FilesTarget) Ingester() IngesterCloser + func (f *FilesTarget) MultiWriter() bool + func (f *FilesTarget) Writer(ctx context.Context, opts ...ctrcontent.WriterOpt) (ctrcontent.Writer, error) + func (f *FilesTarget) Writers(ctx context.Context, opts ...ctrcontent.WriterOpt) (func(name string) (ctrcontent.Writer, error), error) + type Format int + const FormatArtifacts + const FormatLegacy + type HashSource struct + Hash string + Name string + Size int64 + func (h *HashSource) GetContent() []byte + func (h *HashSource) GetDigest() string + func (h *HashSource) GetName() string + func (h *HashSource) GetPath() string + func (h *HashSource) GetSize() int64 + type IngesterCloser interface + type LegacyOpt func(*legacyInfo) + func WithTimestamp(timestamp *time.Time) LegacyOpt + func WithTmpDir(dir string) LegacyOpt + type MemorySource struct + Content []byte + Name string + func (m *MemorySource) GetContent() []byte + func (m *MemorySource) GetDigest() string + func (m *MemorySource) GetName() string + func (m *MemorySource) GetPath() string + func (m *MemorySource) GetSize() int64 + type Puller struct + Image string + Impl func(ctx context.Context, resolver remotes.Resolver, ref string, ...) (ocispec.Descriptor, []ocispec.Descriptor, error) + func (p *Puller) Config(verbose bool, writer io.Writer, resolver ecresolver.ResolverCloser) (*ocispec.Descriptor, *ocispec.Image, error) + func (p *Puller) Pull(target Target, blocksize int, verbose bool, writer io.Writer, ...) (*ocispec.Descriptor, *Artifact, error) + type Pusher struct + Artifact *Artifact + Image string + Impl func(ctx context.Context, resolver remotes.Resolver, ref string, ...) (ocispec.Descriptor, error) + Timestamp *time.Time + func (p Pusher) Push(format Format, verbose bool, writer io.Writer, configOpts ConfigOpts, ...) (string, error) + type Source interface + GetContent func() []byte + GetDigest func() string + GetName func() string + GetPath func() string + GetSize func() int64 + type Target interface + Ingester func() IngesterCloser + MultiWriter func() bool