Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Config ¶
type Config struct { Debug bool `toml:"debug"` LogPath string `toml:"log_path"` HTTP *HTTP `toml:"http"` Server []*EtcdServer `toml:"server"` Users []*User `toml:"user"` }
Config 配置
func (*Config) GetUserByUsername ¶
GetUserByUsername 根据用户名获取用户信息
type EtcdServer ¶
type EtcdServer struct { Title string `toml:"title"` Name string `toml:"name"` Address []string `toml:"address"` Username string `toml:"username"` Password string `toml:"password"` KeyPrefix string `toml:"key_prefix"` Desc string `toml:"desc"` TLSEnable bool `toml:"tls_enable"` // 是否启用tls连接 TLSConfig *EtcdTLSConfig `toml:"tls_config"` // 启用tls时必须配置此内容 Roles []string `toml:"roles"` // 可访问此etcd服务的角色列表 }
EtcdServer etcd 服务
type EtcdTLSConfig ¶
type EtcdTLSConfig struct { CertFile string `toml:"cert_file"` KeyFile string `toml:"key_file"` CAFile string `toml:"ca_file"` }
EtcdTLSConfig etcd tls配置
type HTTP ¶
type HTTP struct { Address string `toml:"address"` Port int `toml:"port"` TLSEnable bool `toml:"tls_enable"` // 是否启用tls连接 TLSConfig *HTTPTls `toml:"tls_config"` // 启用tls时必须配置此内容 TLSEncryptEnable bool `toml:"tls_encrypt_enable"` // 是否启用 Let's Encrypt tls TLSEncryptDomainNames []string `toml:"tls_encrypt_domain_names"` // 启用 Let's Encrypt 时的域名列表 }
HTTP http 件套配置
Click to show internal directories.
Click to hide internal directories.