aboutsummaryrefslogtreecommitdiff
path: root/vendor/github.com/containers/common/pkg/auth/cli.go
diff options
context:
space:
mode:
Diffstat (limited to 'vendor/github.com/containers/common/pkg/auth/cli.go')
-rw-r--r--vendor/github.com/containers/common/pkg/auth/cli.go18
1 files changed, 18 insertions, 0 deletions
diff --git a/vendor/github.com/containers/common/pkg/auth/cli.go b/vendor/github.com/containers/common/pkg/auth/cli.go
index ab033681d..1d8eed4ac 100644
--- a/vendor/github.com/containers/common/pkg/auth/cli.go
+++ b/vendor/github.com/containers/common/pkg/auth/cli.go
@@ -3,6 +3,7 @@ package auth
import (
"io"
+ "github.com/containers/common/pkg/completion"
"github.com/spf13/pflag"
)
@@ -49,6 +50,16 @@ func GetLoginFlags(flags *LoginOptions) *pflag.FlagSet {
return &fs
}
+// GetLoginFlagsCompletions returns the FlagCompletions for the login flags
+func GetLoginFlagsCompletions() completion.FlagCompletions {
+ flagCompletion := completion.FlagCompletions{}
+ flagCompletion["authfile"] = completion.AutocompleteDefault
+ flagCompletion["cert-dir"] = completion.AutocompleteDefault
+ flagCompletion["password"] = completion.AutocompleteNone
+ flagCompletion["username"] = completion.AutocompleteNone
+ return flagCompletion
+}
+
// GetLogoutFlags defines and returns logout flags for containers tools
func GetLogoutFlags(flags *LogoutOptions) *pflag.FlagSet {
fs := pflag.FlagSet{}
@@ -56,3 +67,10 @@ func GetLogoutFlags(flags *LogoutOptions) *pflag.FlagSet {
fs.BoolVarP(&flags.All, "all", "a", false, "Remove the cached credentials for all registries in the auth file")
return &fs
}
+
+// GetLogoutFlagsCompletions returns the FlagCompletions for the logout flags
+func GetLogoutFlagsCompletions() completion.FlagCompletions {
+ flagCompletion := completion.FlagCompletions{}
+ flagCompletion["authfile"] = completion.AutocompleteDefault
+ return flagCompletion
+}