Complete API handlers refactoring to eliminate type switching and use repository pattern consistently

This commit is contained in:
2025-10-08 20:36:20 +02:00
parent 01b921bfa3
commit bbf728d110
16 changed files with 268 additions and 2654 deletions

View File

@@ -6,6 +6,7 @@ type Config struct {
CLI CLIConfig `yaml:"cli" mapstructure:"cli"`
Server ServerConfig `yaml:"server" mapstructure:"server"`
Auth AuthConfig `yaml:"auth" mapstructure:"auth"`
Library LibraryConfig `yaml:"library" mapstructure:"library"`
}
type DatabaseConfig struct {
@@ -65,3 +66,11 @@ type DiscoveryConfig struct {
Containers bool `yaml:"containers" mapstructure:"containers"`
Individual bool `yaml:"individual" mapstructure:"individual"`
}
type LibraryConfig struct {
BaseURL string `yaml:"base_url" mapstructure:"base_url"`
UseCDN bool `yaml:"use_cdn" mapstructure:"use_cdn"`
CDNBaseURL string `yaml:"cdn_base_url" mapstructure:"cdn_base_url"`
Minified bool `yaml:"minified" mapstructure:"minified"`
Version string `yaml:"version" mapstructure:"version"`
}