configs

package
v1.2.3 Latest Latest
Warning

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

Go to latest
Published: Sep 15, 2021 License: Apache-2.0 Imports: 9 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (

	//QPS rateLimit qps
	QPS int
)

Functions

This section is empty.

Types

type Configs

type Configs struct {
	FlagConf  *options.ClientOptions
	Conf      *ini.File
	Security  map[string]Security
	ImageList map[string]string
	Secret    map[string]Secret
}

Configs struct save of all config

func GetConfigs

func GetConfigs() *Configs

GetConfigs get config of Configs instance

func InitConfigs

func InitConfigs(opts *options.ClientOptions) (*Configs, error)

InitConfigs InitLogger initializes logger the way we want for tke.

func (*Configs) GetImageList

func (c *Configs) GetImageList() map[string]string

GetImageList get images list of configs instance

func (*Configs) GetSecret

func (c *Configs) GetSecret() (map[string]Secret, error)

GetSecret get secret from secret file

func (*Configs) GetSecurity

func (c *Configs) GetSecurity() (map[string]Security, error)

GetSecurity gets the Security information in Config

func (*Configs) GetSecuritySpecific

func (c *Configs) GetSecuritySpecific(registry string, namespace string) (Security, bool)

GetSecuritySpecific gets the specific authentication information in Config

type Secret

type Secret struct {
	SecretID  string `json:"secretId" yaml:"secretId"`
	SecretKey string `json:"secretKey" yaml:"secretKey"`
}

Secret describes secret info for tencent cloud

type Security

type Security struct {
	Username string `json:"username" yaml:"username"`
	Password string `json:"password" yaml:"password"`
	Insecure bool   `json:"insecure" yaml:"insecure"`
}

Security describes the authentication information of a registry

Jump to

Keyboard shortcuts

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