123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354 |
- package main
- type FrontendConfigYAML struct {
- CommonConfig CommonConfigYAML `yaml:"common"`
- LogConfig LogConfigYAML `yaml:"log"`
- }
- type CommonConfigYAML struct {
- IsDebugModeOn bool `yaml:"debug"`
- RedirectWhen404 bool `yaml:"redirect_when_404"`
- RedirectURL string `yaml:"redirect_url"`
- IsBackendProxyEnable bool `yaml:"backend_proxy_enable"`
- UseGZip bool `yaml:"enable_gzip"`
- VueHistoryMode bool `yaml:"vue_history_mode"`
- }
- type LogConfigYAML struct {
- AccessLogEnable bool `yaml:"access_log_enable"`
- RollingLogConfig RollingLoggerConfigYAML `yaml:"rolling_log_config"`
- AccessLoggerDetailConfig AccessLoggerConfigYAML `yaml:"access_log_config"`
- ErrorLoggerDetailConfig ErrorLoggerConfigYAML `yaml:"error_log_config"`
- }
- type RollingLoggerConfigYAML struct {
- ErrLogCfg LumberjackLoggerYAML `yaml:"error_log"`
- AccessLogCfg LumberjackLoggerYAML `yaml:"access_log"`
- }
- type LumberjackLoggerYAML struct {
- FileName string `yaml:"file"`
- MaxSize int `yaml:"max_size"`
- MaxAge int `yaml:"max_age"`
- MaxBackups int `yaml:"max_backups"`
- UseLocalTime bool `yaml:"use_local_time"`
- Compress bool `yaml:"compress_history"`
- }
- type AccessLoggerConfigYAML struct {
- OutputLevel string `yaml:"output_level"`
- SuccessLevel string `yaml:"success_level"`
- NotFoundLevel string `yaml:"not_found_level"`
- ForbiddenLevel string `yaml:"forbidden_level"`
- GatewayErrorLevel string `yaml:"gateway_error_level"`
- InternalErrorLevel string `yaml:"internal_error_level"`
- OtherStatusLevel string `yaml:"other_status_level"`
- LogFormat string `yaml:"log_format"`
- UseUTC bool `yame:"use_utc"`
- }
- type ErrorLoggerConfigYAML struct {
- OutputLevel string `yaml:"output_level"`
- LogFormat string `yaml:"log_format"`
- UseUTC bool `yame:"use_utc"`
- }
|