api/server: StatPath, ArchivePath, ExtractToDir

Adds http handlers for new API endpoints:

GET ContainersArchivePath
  Return a Tar Archive of the contents at the specified location in a
  container. Deprecates POST ContainersCopy. Use a HEAD request to stat
  the resource.

PUT ContainersExtractToDir
  Extract the Tar Archive from the request body to the directory at the
  specified location inside a container.

Docker-DCO-1.1-Signed-off-by: Josh Hawn <josh.hawn@docker.com> (github: jlhawn)
This commit is contained in:
Josh Hawn
2015-07-21 15:19:52 -07:00
parent c32dde5baa
commit db9cc91a9e
2 changed files with 110 additions and 2 deletions
+4 -2
View File
@@ -128,8 +128,10 @@ type CopyConfig struct {
Resource string
}
// ContainerPathStat is used to encode the response from
// GET /containers/{name:.*}/stat-path
// ContainerPathStat is used to encode the header from
// GET /containers/{name:.*}/archive
// "name" is the file or directory name.
// "path" is the absolute path to the resource in the container.
type ContainerPathStat struct {
Name string `json:"name"`
Path string `json:"path"`