mirror of
https://github.com/containers/skopeo.git
synced 2025-09-23 10:59:25 +00:00
Update c/image and c/common to latest
... to include https://github.com/containers/image/pull/2173 and https://github.com/containers/common/pull/1731 . Signed-off-by: Miloslav Trmač <mitr@redhat.com>
This commit is contained in:
32
vendor/github.com/containers/common/pkg/auth/cli.go
generated
vendored
32
vendor/github.com/containers/common/pkg/auth/cli.go
generated
vendored
@@ -14,14 +14,15 @@ type LoginOptions struct {
|
||||
// CLI flags managed by the FlagSet returned by GetLoginFlags
|
||||
// Callers that use GetLoginFlags should not need to touch these values at all; callers that use
|
||||
// other CLI frameworks should set them based on user input.
|
||||
AuthFile string
|
||||
CertDir string
|
||||
Password string
|
||||
Username string
|
||||
StdinPassword bool
|
||||
GetLoginSet bool
|
||||
Verbose bool // set to true for verbose output
|
||||
AcceptRepositories bool // set to true to allow namespaces or repositories rather than just registries
|
||||
AuthFile string
|
||||
DockerCompatAuthFile string
|
||||
CertDir string
|
||||
Password string
|
||||
Username string
|
||||
StdinPassword bool
|
||||
GetLoginSet bool
|
||||
Verbose bool // set to true for verbose output
|
||||
AcceptRepositories bool // set to true to allow namespaces or repositories rather than just registries
|
||||
// Options caller can set
|
||||
Stdin io.Reader // set to os.Stdin
|
||||
Stdout io.Writer // set to os.Stdout
|
||||
@@ -34,9 +35,10 @@ type LogoutOptions struct {
|
||||
// CLI flags managed by the FlagSet returned by GetLogoutFlags
|
||||
// Callers that use GetLogoutFlags should not need to touch these values at all; callers that use
|
||||
// other CLI frameworks should set them based on user input.
|
||||
AuthFile string
|
||||
All bool
|
||||
AcceptRepositories bool // set to true to allow namespaces or repositories rather than just registries
|
||||
AuthFile string
|
||||
DockerCompatAuthFile string
|
||||
All bool
|
||||
AcceptRepositories bool // set to true to allow namespaces or repositories rather than just registries
|
||||
// Options caller can set
|
||||
Stdout io.Writer // set to os.Stdout
|
||||
AcceptUnspecifiedRegistry bool // set to true if allows logout with unspecified registry
|
||||
@@ -45,7 +47,8 @@ type LogoutOptions struct {
|
||||
// GetLoginFlags defines and returns login flags for containers tools
|
||||
func GetLoginFlags(flags *LoginOptions) *pflag.FlagSet {
|
||||
fs := pflag.FlagSet{}
|
||||
fs.StringVar(&flags.AuthFile, "authfile", GetDefaultAuthFile(), "path of the authentication file. Use REGISTRY_AUTH_FILE environment variable to override")
|
||||
fs.StringVar(&flags.AuthFile, "authfile", "", "path of the authentication file. Use REGISTRY_AUTH_FILE environment variable to override")
|
||||
fs.StringVar(&flags.DockerCompatAuthFile, "compat-auth-file", "", "path of a Docker-compatible config file to update instead")
|
||||
fs.StringVar(&flags.CertDir, "cert-dir", "", "use certificates at the specified path to access the registry")
|
||||
fs.StringVarP(&flags.Password, "password", "p", "", "Password for registry")
|
||||
fs.StringVarP(&flags.Username, "username", "u", "", "Username for registry")
|
||||
@@ -59,6 +62,7 @@ func GetLoginFlags(flags *LoginOptions) *pflag.FlagSet {
|
||||
func GetLoginFlagsCompletions() completion.FlagCompletions {
|
||||
flagCompletion := completion.FlagCompletions{}
|
||||
flagCompletion["authfile"] = completion.AutocompleteDefault
|
||||
flagCompletion["compat-auth-file"] = completion.AutocompleteDefault
|
||||
flagCompletion["cert-dir"] = completion.AutocompleteDefault
|
||||
flagCompletion["password"] = completion.AutocompleteNone
|
||||
flagCompletion["username"] = completion.AutocompleteNone
|
||||
@@ -68,7 +72,8 @@ func GetLoginFlagsCompletions() completion.FlagCompletions {
|
||||
// GetLogoutFlags defines and returns logout flags for containers tools
|
||||
func GetLogoutFlags(flags *LogoutOptions) *pflag.FlagSet {
|
||||
fs := pflag.FlagSet{}
|
||||
fs.StringVar(&flags.AuthFile, "authfile", GetDefaultAuthFile(), "path of the authentication file. Use REGISTRY_AUTH_FILE environment variable to override")
|
||||
fs.StringVar(&flags.AuthFile, "authfile", "", "path of the authentication file. Use REGISTRY_AUTH_FILE environment variable to override")
|
||||
fs.StringVar(&flags.DockerCompatAuthFile, "compat-auth-file", "", "path of a Docker-compatible config file to update instead")
|
||||
fs.BoolVarP(&flags.All, "all", "a", false, "Remove the cached credentials for all registries in the auth file")
|
||||
return &fs
|
||||
}
|
||||
@@ -77,5 +82,6 @@ func GetLogoutFlags(flags *LogoutOptions) *pflag.FlagSet {
|
||||
func GetLogoutFlagsCompletions() completion.FlagCompletions {
|
||||
flagCompletion := completion.FlagCompletions{}
|
||||
flagCompletion["authfile"] = completion.AutocompleteDefault
|
||||
flagCompletion["compat-auth-file"] = completion.AutocompleteDefault
|
||||
return flagCompletion
|
||||
}
|
||||
|
Reference in New Issue
Block a user