cosmetical touches

Signed-off-by: jkoberg <jkoberg@owncloud.com>
This commit is contained in:
jkoberg
2022-12-08 11:06:36 +01:00
parent a004095a6c
commit 1b032c7617
3 changed files with 8 additions and 12 deletions
@@ -24,7 +24,6 @@ type Config struct {
type Postprocessing struct {
Events Events `yaml:"events"`
Virusscan bool `yaml:"virusscan" env:"POSTPROCESSING_VIRUSSCAN" desc:"should the system do a virusscan? Needs antivirus service"`
FTSIndex bool `yaml:"fulltextsearch" env:"POSTPROCESSING_FTS" desc:"should the system index files for fts? Needs search service"`
Delayprocessing time.Duration `yaml:"delayprocessing" env:"POSTPROCESSING_DELAY" desc:"the sytem sleeps for this time while postprocessing"`
}
@@ -4,6 +4,7 @@ import (
"github.com/owncloud/ocis/v2/services/postprocessing/pkg/config"
)
// FullDefaultConfig returns a full sanitized config
func FullDefaultConfig() *config.Config {
cfg := DefaultConfig()
EnsureDefaults(cfg)
@@ -11,6 +12,7 @@ func FullDefaultConfig() *config.Config {
return cfg
}
// DefaultConfig is the default configuration
func DefaultConfig() *config.Config {
return &config.Config{
Service: config.Service{
@@ -21,12 +23,11 @@ func DefaultConfig() *config.Config {
Endpoint: "127.0.0.1:9233",
Cluster: "ocis-cluster",
},
// Virusscan: true,
// FTSIndex: true,
},
}
}
// EnsureDefaults ensures defaults on a config
func EnsureDefaults(cfg *config.Config) {
// provide with defaults for shared logging, since we need a valid destination address for BindEnv.
if cfg.Log == nil && cfg.Commons != nil && cfg.Commons.Log != nil {
@@ -41,6 +42,6 @@ func EnsureDefaults(cfg *config.Config) {
}
}
// Sanitize does nothing atm
func Sanitize(cfg *config.Config) {
// nothing to sanitize here atm
}