new
This commit is contained in:
@@ -33,6 +33,7 @@ type Config struct {
|
||||
Yushan YushanConfig `mapstructure:"yushan"`
|
||||
TianYanCha TianYanChaConfig `mapstructure:"tianyancha"`
|
||||
Alicloud AlicloudConfig `mapstructure:"alicloud"`
|
||||
Xingwei XingweiConfig `mapstructure:"xingwei"`
|
||||
}
|
||||
|
||||
// ServerConfig HTTP服务器配置
|
||||
@@ -438,6 +439,33 @@ type AlicloudConfig struct {
|
||||
AppCode string `mapstructure:"app_code"`
|
||||
}
|
||||
|
||||
// XingweiConfig 行为数据配置
|
||||
type XingweiConfig struct {
|
||||
URL string `mapstructure:"url"`
|
||||
ApiID string `mapstructure:"api_id"`
|
||||
ApiKey string `mapstructure:"api_key"`
|
||||
|
||||
// 行为数据日志配置
|
||||
Logging XingweiLoggingConfig `mapstructure:"logging"`
|
||||
}
|
||||
|
||||
// XingweiLoggingConfig 行为数据日志配置
|
||||
type XingweiLoggingConfig struct {
|
||||
Enabled bool `mapstructure:"enabled"`
|
||||
LogDir string `mapstructure:"log_dir"`
|
||||
UseDaily bool `mapstructure:"use_daily"`
|
||||
EnableLevelSeparation bool `mapstructure:"enable_level_separation"`
|
||||
LevelConfigs map[string]XingweiLevelFileConfig `mapstructure:"level_configs"`
|
||||
}
|
||||
|
||||
// XingweiLevelFileConfig 行为数据级别文件配置
|
||||
type XingweiLevelFileConfig struct {
|
||||
MaxSize int `mapstructure:"max_size"`
|
||||
MaxBackups int `mapstructure:"max_backups"`
|
||||
MaxAge int `mapstructure:"max_age"`
|
||||
Compress bool `mapstructure:"compress"`
|
||||
}
|
||||
|
||||
// DomainConfig 域名配置
|
||||
type DomainConfig struct {
|
||||
API string `mapstructure:"api"` // API域名
|
||||
|
||||
Reference in New Issue
Block a user