Documentation ¶
Index ¶
- Constants
- func ReplaceGlobals(cfg *CurveAdmConfig)
- type CurveAdm
- type CurveAdmConfig
- func (cfg *CurveAdmConfig) GetAutoUpgrade() bool
- func (cfg *CurveAdmConfig) GetDBPath() string
- func (cfg *CurveAdmConfig) GetDBUrl() string
- func (cfg *CurveAdmConfig) GetEngine() string
- func (cfg *CurveAdmConfig) GetLogLevel() string
- func (cfg *CurveAdmConfig) GetSSHRetries() int
- func (cfg *CurveAdmConfig) GetSSHTimeout() int
- func (cfg *CurveAdmConfig) GetSudoAlias() string
- func (cfg *CurveAdmConfig) GetTimeout() int
Constants ¶
View Source
const ( KEY_LOG_LEVEL = "log_level" KEY_SUDO_ALIAS = "sudo_alias" KEY_ENGINE = "engine" KEY_TIMEOUT = "timeout" KEY_AUTO_UPGRADE = "auto_upgrade" KEY_SSH_RETRIES = "retries" KEY_SSH_TIMEOUT = "timeout" KEY_DB_URL = "url" // rqlite://127.0.0.1:4000 // sqlite:///home/curve/.curveadm/data/curveadm.db REGEX_DB_URL = "^(sqlite|rqlite)://(.+)$" DB_SQLITE = "sqlite" DB_RQLITE = "rqlite" WITHOUT_SUDO = " " )
* [defaults] * log_level = error * sudo_alias = "sudo" * timeout = 180 * * [ssh_connections] * retries = 3 * timeout = 10 * * [database] * url = "sqlite:///home/curve/.curveadm/data/curveadm.db"
Variables ¶
This section is empty.
Functions ¶
func ReplaceGlobals ¶ added in v0.1.0
func ReplaceGlobals(cfg *CurveAdmConfig)
Types ¶
type CurveAdmConfig ¶
type CurveAdmConfig struct { LogLevel string SudoAlias string Engine string Timeout int AutoUpgrade bool SSHRetries int SSHTimeout int DBUrl string }
func ParseCurveAdmConfig ¶
func ParseCurveAdmConfig(filename string) (*CurveAdmConfig, error)
func (*CurveAdmConfig) GetAutoUpgrade ¶ added in v0.2.0
func (cfg *CurveAdmConfig) GetAutoUpgrade() bool
func (*CurveAdmConfig) GetDBPath ¶ added in v0.3.0
func (cfg *CurveAdmConfig) GetDBPath() string
func (*CurveAdmConfig) GetDBUrl ¶ added in v0.3.0
func (cfg *CurveAdmConfig) GetDBUrl() string
func (*CurveAdmConfig) GetEngine ¶ added in v0.3.0
func (cfg *CurveAdmConfig) GetEngine() string
func (*CurveAdmConfig) GetLogLevel ¶ added in v0.1.0
func (cfg *CurveAdmConfig) GetLogLevel() string
func (*CurveAdmConfig) GetSSHRetries ¶ added in v0.1.0
func (cfg *CurveAdmConfig) GetSSHRetries() int
func (*CurveAdmConfig) GetSSHTimeout ¶
func (cfg *CurveAdmConfig) GetSSHTimeout() int
func (*CurveAdmConfig) GetSudoAlias ¶
func (cfg *CurveAdmConfig) GetSudoAlias() string
func (*CurveAdmConfig) GetTimeout ¶ added in v0.1.0
func (cfg *CurveAdmConfig) GetTimeout() int
Click to show internal directories.
Click to hide internal directories.