This commit is contained in:
2025-10-16 18:35:18 +08:00
parent a49d58365e
commit 5a6e95906c
18 changed files with 990 additions and 31 deletions

View File

@@ -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域名