summaryrefslogtreecommitdiff
path: root/vendor/github.com/fsouza/go-dockerclient/internal
diff options
context:
space:
mode:
Diffstat (limited to 'vendor/github.com/fsouza/go-dockerclient/internal')
-rw-r--r--vendor/github.com/fsouza/go-dockerclient/internal/archive/archive.go26
-rw-r--r--vendor/github.com/fsouza/go-dockerclient/internal/archive/archive_unix.go6
-rw-r--r--vendor/github.com/fsouza/go-dockerclient/internal/archive/archive_windows.go4
3 files changed, 18 insertions, 18 deletions
diff --git a/vendor/github.com/fsouza/go-dockerclient/internal/archive/archive.go b/vendor/github.com/fsouza/go-dockerclient/internal/archive/archive.go
index a13ee7cca..7d7cf496a 100644
--- a/vendor/github.com/fsouza/go-dockerclient/internal/archive/archive.go
+++ b/vendor/github.com/fsouza/go-dockerclient/internal/archive/archive.go
@@ -71,7 +71,7 @@ type TarOptions struct {
NoLchown bool
UIDMaps []idtools.IDMap
GIDMaps []idtools.IDMap
- ChownOpts *idtools.IDPair
+ ChownOpts *idtools.Identity
IncludeSourceDir bool
// WhiteoutFormat is the expected on disk format for whiteout files.
// This format will be converted to the standard format on pack
@@ -292,9 +292,9 @@ type tarAppender struct {
Buffer *bufio.Writer
// for hardlink mapping
- SeenFiles map[uint64]string
- IDMappings *idtools.IDMappings
- ChownOpts *idtools.IDPair
+ SeenFiles map[uint64]string
+ IdentityMapping *idtools.IdentityMapping
+ ChownOpts *idtools.Identity
// For packing and unpacking whiteout files in the
// non standard format. The whiteout files defined
@@ -303,13 +303,13 @@ type tarAppender struct {
WhiteoutConverter tarWhiteoutConverter
}
-func newTarAppender(idMapping *idtools.IDMappings, writer io.Writer, chownOpts *idtools.IDPair) *tarAppender {
+func newTarAppender(idMapping *idtools.IdentityMapping, writer io.Writer, chownOpts *idtools.Identity) *tarAppender {
return &tarAppender{
- SeenFiles: make(map[uint64]string),
- TarWriter: tar.NewWriter(writer),
- Buffer: pools.BufioWriter32KPool.Get(nil),
- IDMappings: idMapping,
- ChownOpts: chownOpts,
+ SeenFiles: make(map[uint64]string),
+ TarWriter: tar.NewWriter(writer),
+ Buffer: pools.BufioWriter32KPool.Get(nil),
+ IdentityMapping: idMapping,
+ ChownOpts: chownOpts,
}
}
@@ -364,12 +364,12 @@ func (ta *tarAppender) addTarFile(path, name string) error {
//by the kernel and already have proper ownership relative to the host
if !isOverlayWhiteout &&
!strings.HasPrefix(filepath.Base(hdr.Name), WhiteoutPrefix) &&
- !ta.IDMappings.Empty() {
- fileIDPair, err := getFileUIDGID(fi.Sys())
+ !ta.IdentityMapping.Empty() {
+ fileIdentity, err := getFileIdentity(fi.Sys())
if err != nil {
return err
}
- hdr.Uid, hdr.Gid, err = ta.IDMappings.ToContainer(fileIDPair)
+ hdr.Uid, hdr.Gid, err = ta.IdentityMapping.ToContainer(fileIdentity)
if err != nil {
return err
}
diff --git a/vendor/github.com/fsouza/go-dockerclient/internal/archive/archive_unix.go b/vendor/github.com/fsouza/go-dockerclient/internal/archive/archive_unix.go
index 2633f5020..80199d513 100644
--- a/vendor/github.com/fsouza/go-dockerclient/internal/archive/archive_unix.go
+++ b/vendor/github.com/fsouza/go-dockerclient/internal/archive/archive_unix.go
@@ -48,13 +48,13 @@ func getInodeFromStat(stat interface{}) (inode uint64, err error) {
return
}
-func getFileUIDGID(stat interface{}) (idtools.IDPair, error) {
+func getFileIdentity(stat interface{}) (idtools.Identity, error) {
s, ok := stat.(*syscall.Stat_t)
if !ok {
- return idtools.IDPair{}, errors.New("cannot convert stat value to syscall.Stat_t")
+ return idtools.Identity{}, errors.New("cannot convert stat value to syscall.Stat_t")
}
- return idtools.IDPair{UID: int(s.Uid), GID: int(s.Gid)}, nil
+ return idtools.Identity{UID: int(s.Uid), GID: int(s.Gid)}, nil
}
func chmodTarEntry(perm os.FileMode) os.FileMode {
diff --git a/vendor/github.com/fsouza/go-dockerclient/internal/archive/archive_windows.go b/vendor/github.com/fsouza/go-dockerclient/internal/archive/archive_windows.go
index c14875cd7..c47768e68 100644
--- a/vendor/github.com/fsouza/go-dockerclient/internal/archive/archive_windows.go
+++ b/vendor/github.com/fsouza/go-dockerclient/internal/archive/archive_windows.go
@@ -47,9 +47,9 @@ func getInodeFromStat(stat interface{}) (inode uint64, err error) {
return
}
-func getFileUIDGID(stat interface{}) (idtools.IDPair, error) {
+func getFileIdentity(stat interface{}) (idtools.Identity, error) {
// no notion of file ownership mapping yet on Windows
- return idtools.IDPair{0, 0}, nil
+ return idtools.Identity{}, nil
}
// chmodTarEntry is used to adjust the file permissions used in tar header based