Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
View Source
var ( CurrentConfig *AppConfig CurrentBaseDir string )
Functions ¶
func GetAppList ¶
func SetBaseDir ¶
func SetBaseDir(baseDir string)
Types ¶
type AppConfig ¶
type AppConfig struct { XMLName xml.Name `xml:"config"` Log Log `xml:"log"` Apps []AppInfo `xml:"apps>app"` HttpServer *HttpServer `xml:"httpserver"` AllowIps []string `xml:"allowips>ip"` SyncNode *SyncNode `xml:"syncnode"` }
配置信息
type AppInfo ¶
type AppInfo struct { AppID string `xml:"appid,attr"` AppName string `xml:"appname,attr"` //域名 Domain string `xml:"domain,attr"` MessageApi string `xml:"messageapi,attr"` //鉴权Api AuthApi string `xml:"authapi,attr"` TimeOut int64 `xml:"timeout,attr"` }
app配置
func GetAppInfo ¶
type HttpServer ¶
type HttpServer struct { HttpPort int `xml:"httpport,attr"` PProfPort int `xml:"pprofport,attr"` IsTLS bool `xml:"istls,attr"` TLSCertFile string `xml:"tlscertfile,attr"` TLSKeyFile string `xml:"tlskeyfile,attr"` }
全局配置
type InfluxdbInfo ¶
type InfluxdbInfo struct { ID string `xml:"id,attr"` ServerIP string `xml:"serverip,attr"` UserName string `xml:"username,attr"` Password string `xml:"password,attr"` DBName string `xml:"dbname,attr"` }
Influxdb信息
type SyncNode ¶
type SyncNode struct {
InfluxdbInfo *InfluxdbInfo `xml:"influxdb"`
}
Click to show internal directories.
Click to hide internal directories.