Diffstat (limited to 'config/config.go')
| -rw-r--r-- | config/config.go | 18 |
1 files changed, 4 insertions, 14 deletions
diff --git a/config/config.go b/config/config.go index 9185e6a..0b1570a 100644 --- a/config/config.go +++ b/config/config.go @@ -20,9 +20,9 @@ type Config struct { Auth AuthConfig `json:"Auth" yaml:"auth" validate:"required"` Mail MailConfig `json:"Mail" yaml:"mail" validate:"required"` CanonicalEndpoint string `json:"CanonicalEndpoint" yaml:"canonicalEndpoint" validate:"required"` - Meta []MetaConfig `json:"Meta" yaml:"meta"` + Meta MetaConfig `json:"Meta" yaml:"meta"` PhotoStorage PhotoStorageConfig `json:"PhotoStorage" yaml:"photoStorage"` - StaticStorage StaticStorageConfig `json:"StaticStorage" yaml:"staticStorage" validate:"required"` + StaticStorage PhotoTypeConfig `json:"StaticStorage" yaml:"staticStorage"` AllowOrigins []string `json:"AllowOrigins" yaml:"allowOrigins"` } @@ -237,8 +237,8 @@ type TriggerConfig struct { } type MetaConfig struct { - Name string `json:"Name" yaml:"name"` - Value string `json:"Value" yaml:"value"` + GoogleSiteVerification string `json:"GoogleSiteVerification" yaml:"googleSiteVerification"` + YandexVerification string `json:"YandexVerification" yaml:"yandexVerification"` } type PhotoStorageConfig struct { @@ -261,16 +261,6 @@ type HomePageGifsConfig struct { Indexes []string `json:"Indexes" yaml:"indexes"` } -type StaticStorageConfig struct { - BaseUrl string `json:"BaseUrl" yaml:"baseUrl" validate:"url,required"` - Map MapStorageConfig `json:"Map" yaml:"map" validate:"required"` -} - -type MapStorageConfig struct { - BaseUrl string `json:"BaseUrl" yaml:"baseUrl" validate:"url,required"` - PMTiles string `json:"PMTiles" yaml:"pmTiles" validate:"required"` -} - func LoadConfig(path string, config *Config) error { fileBytes, err := os.ReadFile(path) if err != nil { |