Update vendor containers/(common,storage,buildah,image)

Signed-off-by: Daniel J Walsh <dwalsh@redhat.com>
This commit is contained in:
Daniel J Walsh
2022-10-27 16:26:57 -04:00
parent 26e5661c27
commit 6fe64591d6
283 changed files with 32861 additions and 4204 deletions

View File

@ -6,6 +6,7 @@ package docker
import (
"bytes"
"context"
"encoding/base64"
"encoding/json"
"errors"
@ -262,11 +263,21 @@ type AuthStatus struct {
//
// See https://goo.gl/6nsZkH for more details.
func (c *Client) AuthCheck(conf *AuthConfiguration) (AuthStatus, error) {
return c.AuthCheckWithContext(conf, context.TODO())
}
// AuthCheckWithContext validates the given credentials. It returns nil if successful. The context object
// can be used to cancel the request.
//
// For Docker API versions >= 1.23, the AuthStatus struct will be populated, otherwise it will be empty.
//
// See https://goo.gl/6nsZkH for more details.
func (c *Client) AuthCheckWithContext(conf *AuthConfiguration, ctx context.Context) (AuthStatus, error) {
var authStatus AuthStatus
if conf == nil {
return authStatus, errors.New("conf is nil")
}
resp, err := c.do(http.MethodPost, "/auth", doOptions{data: conf})
resp, err := c.do(http.MethodPost, "/auth", doOptions{data: conf, context: ctx})
if err != nil {
return authStatus, err
}

View File

@ -3,7 +3,6 @@
// license that can be found in the LICENSE file.
//go:build !windows
// +build !windows
package docker