clioptions

package
v0.0.0-...-4f9d474 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: May 29, 2023 License: MIT Imports: 10 Imported by: 0

Documentation

Index

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 IOStreams

type IOStreams struct {
	In     io.Reader
	Out    io.Writer
	ErrOut io.Writer
}

type RESTClientGetter

type RESTClientGetter interface {
	ToRESTConfig() (*rest.Config, error)
	ToRawSKTConfigLoader() client.ClientConfig
}

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL