22 lines
751 B
Go
22 lines
751 B
Go
package common
|
|
|
|
const (
|
|
AppEnv = "dev"
|
|
EnvConfig = "config.json"
|
|
)
|
|
|
|
type Config struct {
|
|
Debug bool `mapstructure:"debug" json:"debug" yaml:"debug"`
|
|
TargetURL string `mapstructure:"target_url" json:"target_url" yaml:"target_url"`
|
|
Nodes []Node `mapstructure:"nodes" json:"nodes" yaml:"nodes"`
|
|
}
|
|
|
|
type Node struct {
|
|
Protocol string `mapstructure:"protocol" yaml:"protocol" json:"protocol"`
|
|
Username string `mapstructure:"username" yaml:"username" json:"username"`
|
|
Password string `mapstructure:"password" yaml:"password" json:"password"`
|
|
Addr string `mapstructure:"addr" yaml:"addr" json:"addr"`
|
|
Port int `mapstructure:"port" yaml:"port" json:"port"`
|
|
Ports []int `mapstructure:"ports" yaml:"ports" json:"ports"`
|
|
}
|