summaryrefslogtreecommitdiff
path: root/config
diff options
from:
to:
context:
space:
mode:
Diffstat (limited to 'config')
-rw-r--r--config/config.go14
-rw-r--r--config/config.json8
2 files changed, 18 insertions, 4 deletions
diff --git a/config/config.go b/config/config.go
index 515047e..b41be13 100644
--- a/config/config.go
+++ b/config/config.go
@@ -10,9 +10,17 @@ import (
)
type Config struct {
- LogLevel slog.Level `json:"LogLevel" validate:"required"`
- Storage StorageConfig `json:"Storage" validate:"required"`
- MaxConcurrentJobs int `json:"MaxConcurrentJobs" validate:"required,min=1"`
+ LogLevel slog.Level `json:"LogLevel" validate:"required"`
+ MaxConcurrentJobs int `json:"MaxConcurrentJobs" validate:"required,min=1"`
+ DraftMode DraftModeConfig `json:"DraftMode"`
+ Storage StorageConfig `json:"Storage" validate:"required"`
+}
+
+type DraftModeConfig struct {
+ Enabled bool `json:"Enabled" validate:"required"`
+ DraftSuffix string `json:"DraftSuffix" validate:"required_if=Enabled true"`
+ ProdSuffix string `json:"ProdSuffix" validate:"required_if=Enabled true"`
+ UpdateAlways bool `json:"UpdateAlways"`
}
type StorageConfig struct {
diff --git a/config/config.json b/config/config.json
index a48f0ff..985dd55 100644
--- a/config/config.json
+++ b/config/config.json
@@ -1,6 +1,12 @@
{
"LogLevel": "debug",
- "MaxConcurrentJobs": 8,
+ "MaxConcurrentJobs": 10,
+ "DraftMode": {
+ "Enabled": true,
+ "DraftSuffix": ".draft.md",
+ "ProdSuffix": ".md",
+ "UpdateAlways": false
+ },
"Storage": {
"Type": "b2",
"Config": {