Diffstat (limited to 'config')
| -rw-r--r-- | config/config.go | 19 | ||||
| -rw-r--r-- | config/config.local.yaml | 5 | ||||
| -rw-r--r-- | config/config.prod.yaml | 4 | ||||
| -rw-r--r-- | config/config.stage.yaml | 4 |
4 files changed, 10 insertions, 22 deletions
diff --git a/config/config.go b/config/config.go index 1393dd8..d5dab2d 100644 --- a/config/config.go +++ b/config/config.go @@ -62,18 +62,13 @@ type Sqlite3Config struct { } type MailConfig struct { - ClientHost string `json:"ClientHost" yaml:"clientHost" validate:"required"` - MailHost string `json:"MailHost" yaml:"mailHost" validate:"required"` - PublicName string `json:"PublicName" yaml:"publicName" validate:"required"` - MailAddress string `json:"MailAddress" yaml:"mailAddress" validate:"required"` - Username string `json:"Username" yaml:"username" validate:"required"` - Password string `json:"Password" yaml:"password" validate:"required"` - Salt string `json:"Salt" yaml:"salt" validate:"required"` - Trigger TriggerConfig `json:"Trigger" yaml:"trigger" validate:"required"` -} - -type TriggerConfig struct { - OnNewPost string `json:"OnNewPost" yaml:"onNewPost" validate:"cron,required"` + ClientHost string `json:"ClientHost" yaml:"clientHost" validate:"required"` + MailHost string `json:"MailHost" yaml:"mailHost" validate:"required"` + PublicName string `json:"PublicName" yaml:"publicName" validate:"required"` + MailAddress string `json:"MailAddress" yaml:"mailAddress" validate:"required"` + Username string `json:"Username" yaml:"username" validate:"required"` + Password string `json:"Password" yaml:"password" validate:"required"` + Salt string `json:"Salt" yaml:"salt" validate:"required"` } func LoadConfig(path string, config *Config) error { diff --git a/config/config.local.yaml b/config/config.local.yaml index e23c808..008fa93 100644 --- a/config/config.local.yaml +++ b/config/config.local.yaml @@ -32,8 +32,7 @@ auth: db: type: sqlite3 config: - # dsn: 'file:/tmp/auth.db?cache=shared&mode=rwc&_journal_mode=WAL' - dsn: 'file:/tmp/auth.db?cache=private&mode=rwc&_locking_mode=EXCLUSIVE&_mutex=no&_auto_vacuum=2&_journal_mode=WAL' + dsn: 'file:/tmp/auth.db?cache=shared&mode=rwc' salt: '123' mail: clientHost: '127.0.0.1:3000' @@ -43,5 +42,3 @@ mail: username: '${MAIL_USERNAME}' password: '${MAIL_PASSWORD}' salt: '${MAIL_SALT}' - trigger: - onNewPost: "* * * * *" diff --git a/config/config.prod.yaml b/config/config.prod.yaml index 0bee79d..4c0f425 100644 --- a/config/config.prod.yaml +++ b/config/config.prod.yaml @@ -32,7 +32,7 @@ auth: db: type: sqlite3 config: - dsn: 'file:/data/auth.db?cache=private&mode=rwc&_locking_mode=EXCLUSIVE&_mutex=no&_auto_vacuum=2&_journal_mode=WAL' + dsn: 'file:/data/auth.db?cache=private&mode=rwc&_locking_mode=EXCLUSIVE&_mutex=no&_auto_vacuum=2' salt: '${AUTH_SALT}' mail: clientHost: '${FQDN}' @@ -42,5 +42,3 @@ mail: username: '${MAIL_USERNAME}' password: '${MAIL_PASSWORD}' salt: '${MAIL_SALT}' - trigger: - onNewPost: "0/5 * * * *" diff --git a/config/config.stage.yaml b/config/config.stage.yaml index 1c15dae..003ec05 100644 --- a/config/config.stage.yaml +++ b/config/config.stage.yaml @@ -32,7 +32,7 @@ auth: db: type: sqlite3 config: - dsn: 'file:/data/auth.db?cache=private&mode=rwc&_locking_mode=EXCLUSIVE&_mutex=no&_auto_vacuum=2&_journal_mode=WAL' + dsn: 'file:/data/auth.db?cache=private&mode=rwc&_locking_mode=EXCLUSIVE&_mutex=no&_auto_vacuum=2' salt: '${AUTH_SALT}' mail: clientHost: '${FQDN}' @@ -42,5 +42,3 @@ mail: username: '${MAIL_USERNAME}' password: '${MAIL_PASSWORD}' salt: '${MAIL_SALT}' - trigger: - onNewPost: "0/3 * * * *" |