Documentation
¶
Index ¶
- type Config
- func (c *Config) Add(name, host, ip, port, user, password, key string) error
- func (c *Config) ConsoleAdd() error
- func (c *Config) Dump(f string) error
- func (c *Config) LoadConfig(f string) error
- func (c *Config) LoadEndpointsConfig() error
- func (c *Config) LoadRootConfig() error
- func (c *Config) LoadUserConfig() error
- func (c *Config) UseGlobalValues()
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Config ¶
type Config struct {
Debug bool `json:"debug" yaml:"debug"` // 是否进入调试模式
Remote bool `json:"remote" yaml:"remote"` // 是否开启远程接口获取IP信息
Shell bool `json:"shell" yaml:"shell"` // 是否支持本地SHELL模式
Backup string `json:"backup" yaml:"backup"` // 是否支持审计模式
Script string `json:"script" yaml:"script"` // 自动更新主机列表脚本, 只有Remote为false时生效
Global *ssh.Endpoint `json:"global" yaml:"global"` // global config
endpoint.Endpoints `json:"endpoints" yaml:"endpoints"`
}
Config config
func (*Config) LoadConfig ¶
LoadConfig loadconfig form a file
func (*Config) LoadEndpointsConfig ¶
LoadEndpointsConfig load endpoints config
func (*Config) LoadRootConfig ¶
LoadRootConfig load rot config
func (*Config) LoadUserConfig ¶
LoadUserConfig load user config
Click to show internal directories.
Click to hide internal directories.