summaryrefslogtreecommitdiff
path: root/config
diff options
from:
to:
context:
space:
mode:
authorGravatar SayaAndy <montferrat@tuta.io> 2025-07-16 13:36:07 +0700
committerGravatar SayaAndy <montferrat@tuta.io> 2025-07-16 13:36:07 +0700
commit4fa22c837cb00b87cd43c0aceec26729b8c3fa48 (patch)
treebfe67471fce17afbe7213f0c3d5dd4982b2354c4 /config
parent1a4df793e0228d4edbc1a87b1e9f53504a7a1189 (diff)
downloadthumbnail-generator-4fa22c837cb00b87cd43c0aceec26729b8c3fa48.tar.gz
thumbnail-generator-4fa22c837cb00b87cd43c0aceec26729b8c3fa48.zip
format: rename processor to converter
Diffstat (limited to 'config')
-rw-r--r--config/config.go6
-rw-r--r--config/config.json2
2 files changed, 4 insertions, 4 deletions
diff --git a/config/config.go b/config/config.go
index 66533a6..3ca8f84 100644
--- a/config/config.go
+++ b/config/config.go
@@ -11,7 +11,7 @@ import (
type Config struct {
Input InputConfig `json:"Input" validate:"required"`
- Processor ProcessorConfig `json:"Processor" validate:"required"`
+ Converter ConverterConfig `json:"Converter" validate:"required"`
Output OutputConfig `json:"Output" validate:"required"`
MaxConcurrentJobs int `json:"MaxConcurrentJobs" validate:"required,min=1"`
ForceRewrite bool `json:"ForceRewrite" validate:"required"`
@@ -72,12 +72,12 @@ type LocalConfig struct {
Path string `json:"Path" validate:"required,min=1"`
}
-type ProcessorConfig struct {
+type ConverterConfig struct {
Type string `json:"Type" validate:"required,oneof=webp"`
Config any `json:"Config" validate:"required"`
}
-func (pc *ProcessorConfig) UnmarshalJSON(data []byte) error {
+func (pc *ConverterConfig) UnmarshalJSON(data []byte) error {
var tmp struct {
Type string `json:"Type"`
Config json.RawMessage `json:"Config"`
diff --git a/config/config.json b/config/config.json
index acf3e02..db4ddd4 100644
--- a/config/config.json
+++ b/config/config.json
@@ -19,7 +19,7 @@
"png"
]
},
- "Processor": {
+ "Converter": {
"Type": "webp",
"Config": {
"Quality": 80,