refactor(config): restructured with better concurrency and error handling, reduced cross referencing

This commit is contained in:
yusing
2025-10-09 01:02:24 +08:00
parent d08be872a0
commit cab68807ee
25 changed files with 720 additions and 623 deletions

View File

@@ -0,0 +1,16 @@
package entrypoint
import (
"github.com/yusing/godoxy/internal/logging/accesslog"
"github.com/yusing/godoxy/internal/route/rules"
)
type Config struct {
SupportProxyProtocol bool `json:"support_proxy_protocol"`
Rules struct {
CatchAll rules.Rules `json:"catch_all"`
NotFound rules.Rules `json:"not_found"`
} `json:"rules"`
Middlewares []map[string]any `json:"middlewares"`
AccessLog *accesslog.RequestLoggerConfig `json:"access_log" validate:"omitempty"`
}