diff --git a/changelog/unreleased/webdav-env-doc.md b/changelog/unreleased/webdav-env-doc.md new file mode 100644 index 0000000000..f4ae3b1b9f --- /dev/null +++ b/changelog/unreleased/webdav-env-doc.md @@ -0,0 +1,5 @@ +Enhancement: Add descriptions to webdav configuration + +Added descriptions to webdav config structs to include them in the config documentation. + +https://github.com/owncloud/ocis/pull/3755 diff --git a/extensions/webdav/pkg/config/http.go b/extensions/webdav/pkg/config/http.go index 073294842f..8417b2f3a6 100644 --- a/extensions/webdav/pkg/config/http.go +++ b/extensions/webdav/pkg/config/http.go @@ -10,8 +10,8 @@ type CORS struct { // HTTP defines the available http configuration. type HTTP struct { - Addr string `yaml:"addr" env:"WEBDAV_HTTP_ADDR"` + Addr string `yaml:"addr" env:"WEBDAV_HTTP_ADDR" desc:"The HTTP API address."` Namespace string `yaml:"-"` - Root string `yaml:"root" env:"WEBDAV_HTTP_ROOT"` + Root string `yaml:"root" env:"WEBDAV_HTTP_ROOT" desc:"The HTTP API root path."` CORS CORS `yaml:"cors"` } diff --git a/extensions/webdav/pkg/config/log.go b/extensions/webdav/pkg/config/log.go index 211aad1a4a..26be841ab8 100644 --- a/extensions/webdav/pkg/config/log.go +++ b/extensions/webdav/pkg/config/log.go @@ -2,8 +2,8 @@ package config // Log defines the available log configuration. type Log struct { - Level string `mapstructure:"level" env:"OCIS_LOG_LEVEL;WEBDAV_LOG_LEVEL"` - Pretty bool `mapstructure:"pretty" env:"OCIS_LOG_PRETTY;WEBDAV_LOG_PRETTY"` - Color bool `mapstructure:"color" env:"OCIS_LOG_COLOR;WEBDAV_LOG_COLOR"` - File string `mapstructure:"file" env:"OCIS_LOG_FILE;WEBDAV_LOG_FILE"` + Level string `mapstructure:"level" env:"OCIS_LOG_LEVEL;WEBDAV_LOG_LEVEL" desc:"The log level."` + Pretty bool `mapstructure:"pretty" env:"OCIS_LOG_PRETTY;WEBDAV_LOG_PRETTY" desc:"Enable pretty log output."` + Color bool `mapstructure:"color" env:"OCIS_LOG_COLOR;WEBDAV_LOG_COLOR" desc:"Enable colored log output."` + File string `mapstructure:"file" env:"OCIS_LOG_FILE;WEBDAV_LOG_FILE" desc:"The path to the file if the log should write to file."` } diff --git a/extensions/webdav/pkg/config/tracing.go b/extensions/webdav/pkg/config/tracing.go index 17293d0669..0fe0c7da10 100644 --- a/extensions/webdav/pkg/config/tracing.go +++ b/extensions/webdav/pkg/config/tracing.go @@ -2,8 +2,8 @@ package config // Tracing defines the available tracing configuration. type Tracing struct { - Enabled bool `yaml:"enabled" env:"OCIS_TRACING_ENABLED;WEBDAV_TRACING_ENABLED"` - Type string `yaml:"type" env:"OCIS_TRACING_TYPE;WEBDAV_TRACING_TYPE"` - Endpoint string `yaml:"endpoint" env:"OCIS_TRACING_ENDPOINT;WEBDAV_TRACING_ENDPOINT"` - Collector string `yaml:"collector" env:"OCIS_TRACING_COLLECTOR;WEBDAV_TRACING_COLLECTOR"` + Enabled bool `yaml:"enabled" env:"OCIS_TRACING_ENABLED;WEBDAV_TRACING_ENABLED" desc:"Enable tracing."` + Type string `yaml:"type" env:"OCIS_TRACING_TYPE;WEBDAV_TRACING_TYPE" desc:"The tracing type."` + Endpoint string `yaml:"endpoint" env:"OCIS_TRACING_ENDPOINT;WEBDAV_TRACING_ENDPOINT" desc:"The tracing service endpoint."` + Collector string `yaml:"collector" env:"OCIS_TRACING_COLLECTOR;WEBDAV_TRACING_COLLECTOR" desc:"The tracing collector."` }