Documentation ¶
Index ¶
- Constants
- type ConfigFlags
- func (f *ConfigFlags) AddFlags(flags *pflag.FlagSet)
- func (f *ConfigFlags) ToRESTConfig() (*rest.Config, error)
- func (f *ConfigFlags) ToRawSKTConfigLoader() client.ClientConfig
- func (f *ConfigFlags) WithDeprecatedPasswordFlag() *ConfigFlags
- func (f *ConfigFlags) WithDeprecatedSecretFlag() *ConfigFlags
- type IOStreams
- type RESTClientGetter
Constants ¶
View Source
const ( FlagSKTConfig = "sktconfig" FlagBearerToken = "user.token" FlagUsername = "user.username" FlagPassword = "user.password" FlagSecretID = "user.secret-id" FlagSecretKey = "user.secret-key" FlagCertFile = "user.client-certificate" FlagKeyFile = "user.client-key" FlagTLSServerName = "server.tls-server-name" FlagInsecure = "server.insecure-skip-tls-verify" FlagCAFile = "server.certificate-authority" FlagAPIServer = "server.address" FlagTimeout = "server.timeout" FlagMaxRetries = "server.max-retries" FlagRetryInterval = "server.retry-interval" )
定义 sktctl 的标志.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type ConfigFlags ¶
type ConfigFlags struct { SKTConfig *string BearerToken *string Username *string Password *string SecretID *string SecretKey *string Insecure *bool TLSServerName *string CertFile *string KeyFile *string CAFile *string APIServer *string Timeout *time.Duration MaxRetries *int RetryInterval *time.Duration // contains filtered or unexported fields }
func NewConfigFlags ¶
func NewConfigFlags(usePersistentConfig bool) *ConfigFlags
NewConfigFlags 返回设置了默认值的 ConfigFlags.
func (*ConfigFlags) AddFlags ¶
func (f *ConfigFlags) AddFlags(flags *pflag.FlagSet)
AddFlags 将客户端配置标志绑定到给定的 FlagSet.
func (*ConfigFlags) ToRESTConfig ¶
func (f *ConfigFlags) ToRESTConfig() (*rest.Config, error)
func (*ConfigFlags) ToRawSKTConfigLoader ¶
func (f *ConfigFlags) ToRawSKTConfigLoader() client.ClientConfig
func (*ConfigFlags) WithDeprecatedPasswordFlag ¶
func (f *ConfigFlags) WithDeprecatedPasswordFlag() *ConfigFlags
WithDeprecatedPasswordFlag 启用 username 和 password 标志.
func (*ConfigFlags) WithDeprecatedSecretFlag ¶
func (f *ConfigFlags) WithDeprecatedSecretFlag() *ConfigFlags
WithDeprecatedSecretFlag 启用 secretID 和 secretKey 标志.
type RESTClientGetter ¶
type RESTClientGetter interface { ToRESTConfig() (*rest.Config, error) ToRawSKTConfigLoader() client.ClientConfig }
Click to show internal directories.
Click to hide internal directories.