Documentation ¶
Index ¶
- func CheckAuthFile(authfile string) error
- func GetDefaultAuthFile() string
- func GetLoginFlags(flags *LoginOptions) *pflag.FlagSet
- func GetLoginFlagsCompletions() completion.FlagCompletions
- func GetLogoutFlags(flags *LogoutOptions) *pflag.FlagSet
- func GetLogoutFlagsCompletions() completion.FlagCompletions
- func Login(ctx context.Context, systemContext *types.SystemContext, opts *LoginOptions, ...) error
- func Logout(systemContext *types.SystemContext, opts *LogoutOptions, args []string) error
- type LoginOptions
- type LogoutOptions
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func CheckAuthFile ¶
CheckAuthFile validates filepath given by --authfile used by command has --authfile flag
func GetDefaultAuthFile ¶
func GetDefaultAuthFile() string
GetDefaultAuthFile returns env value REGISTRY_AUTH_FILE as default --authfile path used in multiple --authfile flag definitions Will fail over to DOCKER_CONFIG if REGISTRY_AUTH_FILE environment is not set
func GetLoginFlags ¶
func GetLoginFlags(flags *LoginOptions) *pflag.FlagSet
GetLoginFlags defines and returns login flags for containers tools
func GetLoginFlagsCompletions ¶ added in v0.23.0
func GetLoginFlagsCompletions() completion.FlagCompletions
GetLoginFlagsCompletions returns the FlagCompletions for the login flags
func GetLogoutFlags ¶
func GetLogoutFlags(flags *LogoutOptions) *pflag.FlagSet
GetLogoutFlags defines and returns logout flags for containers tools
func GetLogoutFlagsCompletions ¶ added in v0.23.0
func GetLogoutFlagsCompletions() completion.FlagCompletions
GetLogoutFlagsCompletions returns the FlagCompletions for the logout flags
func Login ¶
func Login(ctx context.Context, systemContext *types.SystemContext, opts *LoginOptions, args []string) error
Login implements a “log in” command with the provided opts and args reading the password from opts.Stdin or the options in opts.
func Logout ¶
func Logout(systemContext *types.SystemContext, opts *LogoutOptions, args []string) error
Logout implements a “log out” command with the provided opts and args
Types ¶
type LoginOptions ¶
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 // Options caller can set Stdin io.Reader // set to os.Stdin Stdout io.Writer // set to os.Stdout AcceptUnspecifiedRegistry bool // set to true if allows login with unspecified registry }
LoginOptions represents common flags in login In addition, the caller should probably provide a --tls-verify flag (that affects the provided *types.SystemContest)
type LogoutOptions ¶
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 // Options caller can set Stdout io.Writer // set to os.Stdout AcceptUnspecifiedRegistry bool // set to true if allows logout with unspecified registry }
LogoutOptions represents the results for flags in logout