Versions in this module Expand all Collapse all v3 v3.5.5 Feb 14, 2020 Changes in this version + const ChangeAdd + const ChangeDelete + const ChangeModify + const WhiteoutLinkDir + const WhiteoutMetaPrefix + const WhiteoutOpaqueDir + const WhiteoutPrefix + var ErrCannotCopyDir = errors.New("cannot copy directory") + var ErrDirNotExists = errors.New("no such directory") + var ErrInvalidCopySource = errors.New("invalid copy source content") + var ErrNotDirectory = errors.New("not a directory") + func ApplyLayer(dest string, layer io.Reader) (int64, error) + func ApplyUncompressedLayer(dest string, layer io.Reader, options *TarOptions) (int64, error) + func CanonicalTarNameForPath(p string) (string, error) + func ChangesSize(newDir string, changes []Change) int64 + func CompressStream(dest io.Writer, compression Compression) (io.WriteCloser, error) + func CopyResource(srcPath, dstPath string, followLink bool) error + func CopyTo(content io.Reader, srcInfo CopyInfo, dstPath string) error + func DecompressStream(archive io.Reader) (io.ReadCloser, error) + func ExportChanges(dir string, changes []Change, uidMaps, gidMaps []idtools.IDMap) (io.ReadCloser, error) + func FileInfoHeader(name string, fi os.FileInfo, link string) (*tar.Header, error) + func Generate(input ...string) (io.Reader, error) + func GetRebaseName(path, resolvedPath string) (string, string) + func IsArchivePath(path string) bool + func PrepareArchiveCopy(srcContent io.Reader, srcInfo, dstInfo CopyInfo) (dstDir string, content io.ReadCloser, err error) + func PreserveTrailingDotOrSeparator(cleanedPath string, originalPath string, sep byte) string + func ReadSecurityXattrToTarHeader(path string, hdr *tar.Header) error + func RebaseArchiveEntries(srcContent io.Reader, oldBase, newBase string) io.ReadCloser + func ReplaceFileTarWrapper(inputTarStream io.ReadCloser, mods map[string]TarModifierFunc) io.ReadCloser + func ResolveHostSourcePath(path string, followLink bool) (resolvedPath, rebaseName string, err error) + func SplitPathDirEntry(path string) (dir, base string) + func Tar(path string, compression Compression) (io.ReadCloser, error) + func TarResource(sourceInfo CopyInfo) (content io.ReadCloser, err error) + func TarResourceRebase(sourcePath, rebaseName string) (content io.ReadCloser, err error) + func TarWithOptions(srcPath string, options *TarOptions) (io.ReadCloser, error) + func Unpack(decompressedArchive io.Reader, dest string, options *TarOptions) error + func UnpackLayer(dest string, layer io.Reader, options *TarOptions) (size int64, err error) + func Untar(tarArchive io.Reader, dest string, options *TarOptions) error + func UntarUncompressed(tarArchive io.Reader, dest string, options *TarOptions) error + type Archiver struct + IDMappingsVar *idtools.IDMappings + Untar func(io.Reader, string, *TarOptions) error + func NewDefaultArchiver() *Archiver + func (archiver *Archiver) CopyFileWithTar(src, dst string) (err error) + func (archiver *Archiver) CopyWithTar(src, dst string) error + func (archiver *Archiver) IDMappings() *idtools.IDMappings + func (archiver *Archiver) TarUntar(src, dst string) error + func (archiver *Archiver) UntarPath(src, dst string) error + type Change struct + Kind ChangeType + Path string + func Changes(layers []string, rw string) ([]Change, error) + func ChangesDirs(newDir, oldDir string) ([]Change, error) + func OverlayChanges(layers []string, rw string) ([]Change, error) + func (change *Change) String() string + type ChangeType int + func (c ChangeType) String() string + type Compression int + const Bzip2 + const Gzip + const Uncompressed + const Xz + func DetectCompression(source []byte) Compression + func (compression *Compression) Extension() string + type CopyInfo struct + Exists bool + IsDir bool + Path string + RebaseName string + func CopyInfoDestinationPath(path string) (info CopyInfo, err error) + func CopyInfoSourcePath(path string, followLink bool) (CopyInfo, error) + type FileInfo struct + func (info *FileInfo) Changes(oldInfo *FileInfo) []Change + func (info *FileInfo) LookUp(path string) *FileInfo + type TarModifierFunc func(path string, header *tar.Header, content io.Reader) (*tar.Header, []byte, error) + type TarOptions struct + ChownOpts *idtools.IDPair + Compression Compression + ExcludePatterns []string + GIDMaps []idtools.IDMap + InUserNS bool + IncludeFiles []string + IncludeSourceDir bool + NoLchown bool + NoOverwriteDirNonDir bool + RebaseNames map[string]string + UIDMaps []idtools.IDMap + WhiteoutFormat WhiteoutFormat + func TarResourceRebaseOpts(sourceBase string, rebaseName string) *TarOptions + type TempArchive struct + Size int64 + func NewTempArchive(src io.Reader, dir string) (*TempArchive, error) + func (archive *TempArchive) Close() error + func (archive *TempArchive) Read(data []byte) (int, error) + type WhiteoutFormat int + const AUFSWhiteoutFormat + const OverlayWhiteoutFormat Other modules containing this package github.com/figuerascarlos/dockertest