Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func CheckConfigDirPermisson ¶
CheckConfigDirPermisson 检查配置文件目录是否有权限
func WriteConfigToFile ¶
WriteConfigToFile 写入配置文件
Types ¶
type Config ¶
type Config struct { Database `json:"database"` Auth `json:"auth"` Etcd `json:"etcd"` Notification `json:"notification"` }
var Conf *Config
type Database ¶
type Database struct { Host string `json:"host" yaml:"host" validate:"required"` Port int `json:"port" yaml:"port" validate:"required"` Name string `json:"name" yaml:"name" validate:"required"` User string `json:"user" yaml:"user" validate:"required"` Pass string `json:"pass" yaml:"pass" validate:"required"` Char string `json:"char" yaml:"char" validate:"required"` }
type Etcd ¶
type Etcd struct { Killer string `json:"killer" yaml:"killer" validate:"required"` Locker string `json:"locker" yaml:"locker" validate:"required"` Service string `json:"service" yaml:"service" validate:"required"` Pipeline string `json:"pipeline" yaml:"pipeline" validate:"required"` Config string `json:"config" yaml:"config" validate:"required"` EndPoints []string `json:"endpoints" yaml:"endpoints" validate:"required"` Timeout int64 `json:"timeout" yaml:"timeout" validate:"required"` }
type Notification ¶
type Notification struct { Url string `json:"url" yaml:"url" validate:"required"` Host string `json:"host" yaml:"host" validate:"required"` Port int `json:"port" yaml:"port" validate:"numeric"` User string `json:"user" yaml:"user" validate:"required"` Pass string `json:"pass" yaml:"pass" validate:"required"` Name string `json:"name" yaml:"name" validate:"required"` Protocol string `json:"protocol" yaml:"protocol" validate:"required"` Encryption string `json:"encryption" yaml:"encryption" validate:"required"` }
Click to show internal directories.
Click to hide internal directories.