mirror of
https://github.com/moby/moby.git
synced 2022-11-09 12:21:53 -05:00
registry: Fixed unexported field
Docker-DCO-1.1-Signed-off-by: Sam Alba <sam.alba@gmail.com> (github: samalba)
This commit is contained in:
parent
522c0765f1
commit
a0251223cd
2 changed files with 3 additions and 3 deletions
|
@ -389,7 +389,7 @@ func (r *Registry) PushImageChecksumRegistry(imgData *ImgData, registry string,
|
||||||
}
|
}
|
||||||
setTokenAuth(req, token)
|
setTokenAuth(req, token)
|
||||||
req.Header.Set("X-Docker-Checksum", imgData.Checksum)
|
req.Header.Set("X-Docker-Checksum", imgData.Checksum)
|
||||||
req.Header.Set("X-Docker-Checksum-Payload", imgData.checksumPayload)
|
req.Header.Set("X-Docker-Checksum-Payload", imgData.ChecksumPayload)
|
||||||
|
|
||||||
res, err := doWithCookies(r.client, req)
|
res, err := doWithCookies(r.client, req)
|
||||||
if err != nil {
|
if err != nil {
|
||||||
|
@ -679,8 +679,8 @@ type RepositoryData struct {
|
||||||
type ImgData struct {
|
type ImgData struct {
|
||||||
ID string `json:"id"`
|
ID string `json:"id"`
|
||||||
Checksum string `json:"checksum,omitempty"`
|
Checksum string `json:"checksum,omitempty"`
|
||||||
|
ChecksumPayload string `json:"-"`
|
||||||
Tag string `json:",omitempty"`
|
Tag string `json:",omitempty"`
|
||||||
checksumPayload string
|
|
||||||
}
|
}
|
||||||
|
|
||||||
type Registry struct {
|
type Registry struct {
|
||||||
|
|
|
@ -1509,7 +1509,7 @@ func (srv *Server) pushImage(r *registry.Registry, out io.Writer, remote, imgID,
|
||||||
return "", err
|
return "", err
|
||||||
}
|
}
|
||||||
imgData.Checksum = checksum
|
imgData.Checksum = checksum
|
||||||
imgData.checksumPayload = checksumPayload
|
imgData.ChecksumPayload = checksumPayload
|
||||||
// Send the checksum
|
// Send the checksum
|
||||||
if err := r.PushImageChecksumRegistry(imgData, ep, token); err != nil {
|
if err := r.PushImageChecksumRegistry(imgData, ep, token); err != nil {
|
||||||
return "", err
|
return "", err
|
||||||
|
|
Loading…
Add table
Reference in a new issue