Complete API handlers refactoring to eliminate type switching and use repository pattern consistently
This commit is contained in:
@@ -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"`
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user