This commit is contained in:
Mrx
2026-05-28 10:55:28 +08:00
parent b04b43cb82
commit 43acbeb8f4
18 changed files with 758 additions and 102 deletions

View File

@@ -45,6 +45,7 @@ type Config struct {
Shujubao ShujubaoConfig `mapstructure:"shujubao"`
PDFGen PDFGenConfig `mapstructure:"pdfgen"`
Huibo HuiboConfig `mapstructure:"huibo"`
Nuoer NuoerConfig `mapstructure:"nuoer"`
}
// ServerConfig HTTP服务器配置
@@ -705,6 +706,34 @@ type HuiboLevelFileConfig struct {
Compress bool `mapstructure:"compress"`
}
// NuoerConfig 诺尔智汇配置
type NuoerConfig struct {
URL string `mapstructure:"url"`
AppID string `mapstructure:"app_id"`
AppSecret string `mapstructure:"app_secret"`
Timeout time.Duration `mapstructure:"timeout"`
Logging NuoerLoggingConfig `mapstructure:"logging"`
}
// NuoerLoggingConfig 诺尔智汇日志配置
type NuoerLoggingConfig struct {
Enabled bool `mapstructure:"enabled"`
LogDir string `mapstructure:"log_dir"`
ServiceName string `mapstructure:"service_name"`
UseDaily bool `mapstructure:"use_daily"`
EnableLevelSeparation bool `mapstructure:"enable_level_separation"`
LevelConfigs map[string]NuoerLevelFileConfig `mapstructure:"level_configs"`
}
// NuoerLevelFileConfig 诺尔智汇级别文件配置
type NuoerLevelFileConfig 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域名