diff options
| author | 2025-08-24 21:03:10 +0700 | |
|---|---|---|
| committer | 2025-08-24 21:03:10 +0700 | |
| commit | 8e8b3cc5238693151978f5eefa2b6fac63adc50a (patch) | |
| tree | 29bbadcee4b66e8dfa60bab3fe02b3ddf689ae2a /config | |
| parent | 262a46dc6a0497bf9eea0513345db835c49b06e0 (diff) | |
| download | thumbnail-generator-8e8b3cc5238693151978f5eefa2b6fac63adc50a.tar.gz thumbnail-generator-8e8b3cc5238693151978f5eefa2b6fac63adc50a.zip | |
feat: add local cache
Diffstat (limited to 'config')
| -rw-r--r-- | config/config-b2.sample.json | 4 | ||||
| -rw-r--r-- | config/config.go | 8 |
2 files changed, 8 insertions, 4 deletions
diff --git a/config/config-b2.sample.json b/config/config-b2.sample.json index 043c1a6..372972e 100644 --- a/config/config-b2.sample.json +++ b/config/config-b2.sample.json @@ -18,7 +18,9 @@ "jpg", "jpeg", "png" - ] + ], + "CacheProcessed": true, + "CacheProcessedCsvPath": "cache.csv" }, "Converters": [ { diff --git a/config/config.go b/config/config.go index ab051b2..1620d75 100644 --- a/config/config.go +++ b/config/config.go @@ -19,8 +19,10 @@ type Config struct { } type InputConfig struct { - Storage InputStorageConfig `json:"Storage" validate:"required"` - KnownExtensions []string `json:"KnownExtensions" validate:"required,min=0,dive,min=1"` + Storage InputStorageConfig `json:"Storage" validate:"required"` + KnownExtensions []string `json:"KnownExtensions" validate:"required,min=0,dive,min=1"` + CacheProcessed bool `json:"CacheProcessed"` + CacheProcessedCsvPath string `json:"CacheProcessedCsvPath" validate:"filepath"` } type InputStorageConfig struct { @@ -159,7 +161,7 @@ type OutputConfig struct { } type OutputLocalUnixConfig struct { - Path string `json:"Path" validate:"required,min=1"` + Path string `json:"Path" validate:"required,min=1,dirpath"` DirPermissionMode string `json:"DirPermissionMode" validate:"required,min=3"` FilePermissionMode string `json:"FilePermissionMode" validate:"required,min=3"` AttributesImplementation string `json:"AttributesImplementation" validate:"required,oneof=xattr none"` |