mirror of
https://github.com/containers/podman.git
synced 2025-08-06 19:44:14 +08:00
vendor in latests containers/(storage, common, build, image)
Signed-off-by: Daniel J Walsh <dwalsh@redhat.com>
This commit is contained in:
14
vendor/github.com/fsouza/go-dockerclient/client.go
generated
vendored
14
vendor/github.com/fsouza/go-dockerclient/client.go
generated
vendored
@ -416,7 +416,7 @@ func (c *Client) getServerAPIVersionString() (version string, err error) {
|
||||
if resp.StatusCode != http.StatusOK {
|
||||
return "", fmt.Errorf("received unexpected status %d while trying to retrieve the server version", resp.StatusCode)
|
||||
}
|
||||
var versionResponse map[string]interface{}
|
||||
var versionResponse map[string]any
|
||||
if err := json.NewDecoder(resp.Body).Decode(&versionResponse); err != nil {
|
||||
return "", err
|
||||
}
|
||||
@ -427,7 +427,7 @@ func (c *Client) getServerAPIVersionString() (version string, err error) {
|
||||
}
|
||||
|
||||
type doOptions struct {
|
||||
data interface{}
|
||||
data any
|
||||
forceJSON bool
|
||||
headers map[string]string
|
||||
context context.Context
|
||||
@ -485,7 +485,7 @@ func (c *Client) do(method, path string, doOptions doOptions) (*http.Response, e
|
||||
|
||||
return nil, chooseError(ctx, err)
|
||||
}
|
||||
if resp.StatusCode < 200 || resp.StatusCode >= 400 {
|
||||
if resp.StatusCode < http.StatusOK || resp.StatusCode >= http.StatusBadRequest {
|
||||
return nil, newError(resp)
|
||||
}
|
||||
return resp, nil
|
||||
@ -710,7 +710,7 @@ type hijackOptions struct {
|
||||
in io.Reader
|
||||
stdout io.Writer
|
||||
stderr io.Writer
|
||||
data interface{}
|
||||
data any
|
||||
}
|
||||
|
||||
// CloseWaiter is an interface with methods for closing the underlying resource
|
||||
@ -873,7 +873,7 @@ func (c *Client) getURL(path string) string {
|
||||
return fmt.Sprintf("%s%s", urlStr, path)
|
||||
}
|
||||
|
||||
func (c *Client) getPath(basepath string, opts interface{}) (string, error) {
|
||||
func (c *Client) getPath(basepath string, opts any) (string, error) {
|
||||
queryStr, requiredAPIVersion := queryStringVersion(opts)
|
||||
return c.pathVersionCheck(basepath, queryStr, requiredAPIVersion)
|
||||
}
|
||||
@ -912,7 +912,7 @@ func (c *Client) getFakeNativeURL(path string) string {
|
||||
return fmt.Sprintf("%s%s", urlStr, path)
|
||||
}
|
||||
|
||||
func queryStringVersion(opts interface{}) (string, APIVersion) {
|
||||
func queryStringVersion(opts any) (string, APIVersion) {
|
||||
if opts == nil {
|
||||
return "", nil
|
||||
}
|
||||
@ -951,7 +951,7 @@ func queryStringVersion(opts interface{}) (string, APIVersion) {
|
||||
return items.Encode(), apiVersion
|
||||
}
|
||||
|
||||
func queryString(opts interface{}) string {
|
||||
func queryString(opts any) string {
|
||||
s, _ := queryStringVersion(opts)
|
||||
return s
|
||||
}
|
||||
|
8
vendor/github.com/fsouza/go-dockerclient/env.go
generated
vendored
8
vendor/github.com/fsouza/go-dockerclient/env.go
generated
vendored
@ -79,7 +79,7 @@ func (env *Env) SetInt64(key string, value int64) {
|
||||
// GetJSON unmarshals the value of the provided key in the provided iface.
|
||||
//
|
||||
// iface is a value that can be provided to the json.Unmarshal function.
|
||||
func (env *Env) GetJSON(key string, iface interface{}) error {
|
||||
func (env *Env) GetJSON(key string, iface any) error {
|
||||
sval := env.Get(key)
|
||||
if sval == "" {
|
||||
return nil
|
||||
@ -89,7 +89,7 @@ func (env *Env) GetJSON(key string, iface interface{}) error {
|
||||
|
||||
// SetJSON marshals the given value to JSON format and stores it using the
|
||||
// provided key.
|
||||
func (env *Env) SetJSON(key string, value interface{}) error {
|
||||
func (env *Env) SetJSON(key string, value any) error {
|
||||
sval, err := json.Marshal(value)
|
||||
if err != nil {
|
||||
return err
|
||||
@ -131,7 +131,7 @@ func (env *Env) Set(key, value string) {
|
||||
//
|
||||
// If `src` cannot be decoded as a json dictionary, an error is returned.
|
||||
func (env *Env) Decode(src io.Reader) error {
|
||||
m := make(map[string]interface{})
|
||||
m := make(map[string]any)
|
||||
if err := json.NewDecoder(src).Decode(&m); err != nil {
|
||||
return err
|
||||
}
|
||||
@ -142,7 +142,7 @@ func (env *Env) Decode(src io.Reader) error {
|
||||
}
|
||||
|
||||
// SetAuto will try to define the Set* method to call based on the given value.
|
||||
func (env *Env) SetAuto(key string, value interface{}) {
|
||||
func (env *Env) SetAuto(key string, value any) {
|
||||
if fval, ok := value.(float64); ok {
|
||||
env.SetInt64(key, int64(fval))
|
||||
} else if sval, ok := value.(string); ok {
|
||||
|
2
vendor/github.com/fsouza/go-dockerclient/image.go
generated
vendored
2
vendor/github.com/fsouza/go-dockerclient/image.go
generated
vendored
@ -328,7 +328,7 @@ func (c *Client) PullImage(opts PullImageOptions, auth AuthConfiguration) error
|
||||
return c.createImage(&opts, headers, nil, opts.OutputStream, opts.RawJSONStream, opts.InactivityTimeout, opts.Context)
|
||||
}
|
||||
|
||||
func (c *Client) createImage(opts interface{}, headers map[string]string, in io.Reader, w io.Writer, rawJSONStream bool, timeout time.Duration, context context.Context) error {
|
||||
func (c *Client) createImage(opts any, headers map[string]string, in io.Reader, w io.Writer, rawJSONStream bool, timeout time.Duration, context context.Context) error {
|
||||
url, err := c.getPath("/images/create", opts)
|
||||
if err != nil {
|
||||
return err
|
||||
|
28
vendor/github.com/fsouza/go-dockerclient/network.go
generated
vendored
28
vendor/github.com/fsouza/go-dockerclient/network.go
generated
vendored
@ -113,20 +113,20 @@ func (c *Client) NetworkInfo(id string) (*Network, error) {
|
||||
//
|
||||
// See https://goo.gl/6GugX3 for more details.
|
||||
type CreateNetworkOptions struct {
|
||||
Name string `json:"Name" yaml:"Name" toml:"Name"`
|
||||
Driver string `json:"Driver" yaml:"Driver" toml:"Driver"`
|
||||
Scope string `json:"Scope" yaml:"Scope" toml:"Scope"`
|
||||
IPAM *IPAMOptions `json:"IPAM,omitempty" yaml:"IPAM" toml:"IPAM"`
|
||||
ConfigFrom *NetworkConfigFrom `json:"ConfigFrom,omitempty" yaml:"ConfigFrom" toml:"ConfigFrom"`
|
||||
Options map[string]interface{} `json:"Options" yaml:"Options" toml:"Options"`
|
||||
Labels map[string]string `json:"Labels" yaml:"Labels" toml:"Labels"`
|
||||
CheckDuplicate bool `json:"CheckDuplicate" yaml:"CheckDuplicate" toml:"CheckDuplicate"`
|
||||
Internal bool `json:"Internal" yaml:"Internal" toml:"Internal"`
|
||||
EnableIPv6 bool `json:"EnableIPv6" yaml:"EnableIPv6" toml:"EnableIPv6"`
|
||||
Attachable bool `json:"Attachable" yaml:"Attachable" toml:"Attachable"`
|
||||
ConfigOnly bool `json:"ConfigOnly" yaml:"ConfigOnly" toml:"ConfigOnly"`
|
||||
Ingress bool `json:"Ingress" yaml:"Ingress" toml:"Ingress"`
|
||||
Context context.Context `json:"-"`
|
||||
Name string `json:"Name" yaml:"Name" toml:"Name"`
|
||||
Driver string `json:"Driver" yaml:"Driver" toml:"Driver"`
|
||||
Scope string `json:"Scope" yaml:"Scope" toml:"Scope"`
|
||||
IPAM *IPAMOptions `json:"IPAM,omitempty" yaml:"IPAM" toml:"IPAM"`
|
||||
ConfigFrom *NetworkConfigFrom `json:"ConfigFrom,omitempty" yaml:"ConfigFrom" toml:"ConfigFrom"`
|
||||
Options map[string]any `json:"Options" yaml:"Options" toml:"Options"`
|
||||
Labels map[string]string `json:"Labels" yaml:"Labels" toml:"Labels"`
|
||||
CheckDuplicate bool `json:"CheckDuplicate" yaml:"CheckDuplicate" toml:"CheckDuplicate"`
|
||||
Internal bool `json:"Internal" yaml:"Internal" toml:"Internal"`
|
||||
EnableIPv6 bool `json:"EnableIPv6" yaml:"EnableIPv6" toml:"EnableIPv6"`
|
||||
Attachable bool `json:"Attachable" yaml:"Attachable" toml:"Attachable"`
|
||||
ConfigOnly bool `json:"ConfigOnly" yaml:"ConfigOnly" toml:"ConfigOnly"`
|
||||
Ingress bool `json:"Ingress" yaml:"Ingress" toml:"Ingress"`
|
||||
Context context.Context `json:"-"`
|
||||
}
|
||||
|
||||
// NetworkConfigFrom is used in network creation for specifying the source of a
|
||||
|
2
vendor/github.com/fsouza/go-dockerclient/volume.go
generated
vendored
2
vendor/github.com/fsouza/go-dockerclient/volume.go
generated
vendored
@ -51,7 +51,7 @@ func (c *Client) ListVolumes(opts ListVolumesOptions) ([]Volume, error) {
|
||||
return nil, err
|
||||
}
|
||||
defer resp.Body.Close()
|
||||
m := make(map[string]interface{})
|
||||
m := make(map[string]any)
|
||||
if err = json.NewDecoder(resp.Body).Decode(&m); err != nil {
|
||||
return nil, err
|
||||
}
|
||||
|
Reference in New Issue
Block a user