Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
View Source
var (
ErrNotFoundConfig = errors.New("NotFound Config")
)
View Source
var (
YamlConfigPath = configFilePath("config.yml")
)
Functions ¶
func IsFileExist ¶
Types ¶
type Config ¶
type Config struct { Debug bool `json:"debug" yaml:"debug"` LowercaseKeywords bool `json:"lowercaseKeywords" yaml:"lowercaseKeywords"` Connections []*DBConfig `json:"connections" yaml:"connections"` }
func GetDefaultConfig ¶
type DBConfig ¶
type DBConfig struct { Alias string `json:"alias" yaml:"alias"` Driver dialect.DatabaseDriver `json:"driver" yaml:"driver"` DataSourceName string `json:"dataSourceName" yaml:"dataSourceName"` Proto Proto `json:"proto" yaml:"proto"` User string `json:"user" yaml:"user"` Passwd string `json:"passwd" yaml:"passwd"` Host string `json:"host" yaml:"host"` Port int `json:"port" yaml:"port"` Path string `json:"path" yaml:"path"` DBName string `json:"dbName" yaml:"dbName"` Params map[string]string `json:"params" yaml:"params"` SSHCfg *SSHConfig `json:"sshConfig" yaml:"sshConfig"` }
type SSHConfig ¶
type SSHConfig struct { Host string `json:"host" yaml:"host"` Port int `json:"port" yaml:"port"` User string `json:"user" yaml:"user"` PassPhrase string `json:"passPhrase" yaml:"passPhrase"` PrivateKey string `json:"privateKey" yaml:"privateKey"` }
func (*SSHConfig) ClientConfig ¶
func (s *SSHConfig) ClientConfig() (*ssh.ClientConfig, error)
Click to show internal directories.
Click to hide internal directories.