remove all "omitempty" from config structs to bring back full configuration file documentation

This commit is contained in:
Willy Kloucek
2022-04-28 15:08:40 +02:00
parent aba2ee0c39
commit ab254b05d0
31 changed files with 802 additions and 802 deletions
+44 -44
View File
@@ -5,51 +5,51 @@ import "github.com/owncloud/ocis/ocis-pkg/shared"
type Config struct {
*shared.Commons `yaml:"-"`
Service Service `yaml:"-"`
Tracing *Tracing `yaml:"tracing,omitempty"`
Logging *Logging `yaml:"log,omitempty"`
Debug Debug `yaml:"debug,omitempty"`
Tracing *Tracing `yaml:"tracing"`
Logging *Logging `yaml:"log"`
Debug Debug `yaml:"debug"`
Supervised bool `yaml:"-"`
HTTP HTTPConfig `yaml:"http,omitempty"`
HTTP HTTPConfig `yaml:"http"`
// JWTSecret used to verify reva access token
TransferSecret string `yaml:"transfer_secret,omitempty" env:"STORAGE_TRANSFER_SECRET"`
TransferSecret string `yaml:"transfer_secret" env:"STORAGE_TRANSFER_SECRET"`
TokenManager *TokenManager `yaml:"token_manager,omitempty"`
Reva *Reva `yaml:"reva,omitempty"`
TokenManager *TokenManager `yaml:"token_manager"`
Reva *Reva `yaml:"reva"`
SkipUserGroupsInToken bool `yaml:"skip_users_groups_in_token,omitempty"`
SkipUserGroupsInToken bool `yaml:"skip_users_groups_in_token"`
EnableFavorites bool `yaml:"favorites,omitempty"`
EnableProjectSpaces bool `yaml:"enable_project_spaces,omitempty"`
UploadMaxChunkSize int `yaml:"upload_max_chunk_size,omitempty"`
UploadHTTPMethodOverride string `yaml:"upload_http_method_override,omitempty"`
DefaultUploadProtocol string `yaml:"default_upload_protocol,omitempty"`
EnableFavorites bool `yaml:"favorites"`
EnableProjectSpaces bool `yaml:"enable_project_spaces"`
UploadMaxChunkSize int `yaml:"upload_max_chunk_size"`
UploadHTTPMethodOverride string `yaml:"upload_http_method_override"`
DefaultUploadProtocol string `yaml:"default_upload_protocol"`
PublicURL string `yaml:"public_url,omitempty" env:"OCIS_URL;FRONTEND_PUBLIC_URL"`
PublicURL string `yaml:"public_url" env:"OCIS_URL;FRONTEND_PUBLIC_URL"`
Archiver Archiver `yaml:"archiver,omitempty"`
AppProvider AppProvider `yaml:"app_provider,omitempty"`
DataGateway DataGateway `yaml:"data_gateway,omitempty"`
OCS OCS `yaml:"ocs,omitempty"`
AuthMachine AuthMachine `yaml:"auth_machine,omitempty"`
Checksums Checksums `yaml:"checksums,omitempty"`
Archiver Archiver `yaml:"archiver"`
AppProvider AppProvider `yaml:"app_provider"`
DataGateway DataGateway `yaml:"data_gateway"`
OCS OCS `yaml:"ocs"`
AuthMachine AuthMachine `yaml:"auth_machine"`
Checksums Checksums `yaml:"checksums"`
Middleware Middleware `yaml:"middleware,omitempty"`
Middleware Middleware `yaml:"middleware"`
}
type Tracing struct {
Enabled bool `yaml:"enabled,omitempty" env:"OCIS_TRACING_ENABLED;FRONTEND_TRACING_ENABLED" desc:"Activates tracing."`
Type string `yaml:"type,omitempty" env:"OCIS_TRACING_TYPE;FRONTEND_TRACING_TYPE"`
Endpoint string `yaml:"endpoint,omitempty" env:"OCIS_TRACING_ENDPOINT;FRONTEND_TRACING_ENDPOINT" desc:"The endpoint to the tracing collector."`
Collector string `yaml:"collector,omitempty" env:"OCIS_TRACING_COLLECTOR;FRONTEND_TRACING_COLLECTOR"`
Enabled bool `yaml:"enabled" env:"OCIS_TRACING_ENABLED;FRONTEND_TRACING_ENABLED" desc:"Activates tracing."`
Type string `yaml:"type" env:"OCIS_TRACING_TYPE;FRONTEND_TRACING_TYPE"`
Endpoint string `yaml:"endpoint" env:"OCIS_TRACING_ENDPOINT;FRONTEND_TRACING_ENDPOINT" desc:"The endpoint to the tracing collector."`
Collector string `yaml:"collector" env:"OCIS_TRACING_COLLECTOR;FRONTEND_TRACING_COLLECTOR"`
}
type Logging struct {
Level string `yaml:"level,omitempty" env:"OCIS_LOG_LEVEL;FRONTEND_LOG_LEVEL" desc:"The log level."`
Pretty bool `yaml:"pretty,omitempty" env:"OCIS_LOG_PRETTY;FRONTEND_LOG_PRETTY" desc:"Activates pretty log output."`
Color bool `yaml:"color,omitempty" env:"OCIS_LOG_COLOR;FRONTEND_LOG_COLOR" desc:"Activates colorized log output."`
File string `yaml:"file,omitempty" env:"OCIS_LOG_FILE;FRONTEND_LOG_FILE" desc:"The target log file."`
Level string `yaml:"level" env:"OCIS_LOG_LEVEL;FRONTEND_LOG_LEVEL" desc:"The log level."`
Pretty bool `yaml:"pretty" env:"OCIS_LOG_PRETTY;FRONTEND_LOG_PRETTY" desc:"Activates pretty log output."`
Color bool `yaml:"color" env:"OCIS_LOG_COLOR;FRONTEND_LOG_COLOR" desc:"Activates colorized log output."`
File string `yaml:"file" env:"OCIS_LOG_FILE;FRONTEND_LOG_FILE" desc:"The target log file."`
}
type Service struct {
@@ -57,44 +57,44 @@ type Service struct {
}
type Debug struct {
Addr string `yaml:"addr,omitempty" env:"FRONTEND_DEBUG_ADDR"`
Token string `yaml:"token,omitempty" env:"FRONTEND_DEBUG_TOKEN"`
Pprof bool `yaml:"pprof,omitempty" env:"FRONTEND_DEBUG_PPROF"`
Zpages bool `yaml:"zpages,omitempty" env:"FRONTEND_DEBUG_ZPAGES"`
Addr string `yaml:"addr" env:"FRONTEND_DEBUG_ADDR"`
Token string `yaml:"token" env:"FRONTEND_DEBUG_TOKEN"`
Pprof bool `yaml:"pprof" env:"FRONTEND_DEBUG_PPROF"`
Zpages bool `yaml:"zpages" env:"FRONTEND_DEBUG_ZPAGES"`
}
type HTTPConfig struct {
Addr string `yaml:"addr,omitempty" env:"FRONTEND_HTTP_ADDR" desc:"The address of the http service."`
Protocol string `yaml:"protocol,omitempty" env:"FRONTEND_HTTP_PROTOCOL" desc:"The transport protocol of the http service."`
Prefix string `yaml:"prefix,omitempty"`
Addr string `yaml:"addr" env:"FRONTEND_HTTP_ADDR" desc:"The address of the http service."`
Protocol string `yaml:"protocol" env:"FRONTEND_HTTP_PROTOCOL" desc:"The transport protocol of the http service."`
Prefix string `yaml:"prefix"`
}
// Middleware configures reva middlewares.
type Middleware struct {
Auth Auth `yaml:"auth,omitempty"`
Auth Auth `yaml:"auth"`
}
// Auth configures reva http auth middleware.
type Auth struct {
CredentialsByUserAgent map[string]string `yaml:"credentials_by_user_agent,omitempty"`
CredentialsByUserAgent map[string]string `yaml:"credentials_by_user_agent"`
}
type Archiver struct {
MaxNumFiles int64 `yaml:"max_num_files,omitempty"`
MaxSize int64 `yaml:"max_size,omitempty"`
MaxNumFiles int64 `yaml:"max_num_files"`
MaxSize int64 `yaml:"max_size"`
Prefix string `yaml:"-"`
Insecure bool `yaml:"insecure,omitempty" env:"OCIS_INSECURE;FRONTEND_ARCHIVER_INSECURE"`
Insecure bool `yaml:"insecure" env:"OCIS_INSECURE;FRONTEND_ARCHIVER_INSECURE"`
}
type AppProvider struct {
ExternalAddr string `yaml:"external_addr,omitempty"`
Driver string `yaml:"driver,omitempty"`
ExternalAddr string `yaml:"external_addr"`
Driver string `yaml:"driver"`
// WopiDriver WopiDriver `yaml:"wopi_driver"`
AppsURL string `yaml:"-"`
OpenURL string `yaml:"-"`
NewURL string `yaml:"-"`
Prefix string `yaml:"-"`
Insecure bool `yaml:"insecure,omitempty" env:"OCIS_INSECURE;FRONTEND_APPPROVIDER_INSECURE"`
Insecure bool `yaml:"insecure" env:"OCIS_INSECURE;FRONTEND_APPPROVIDER_INSECURE"`
}
type DataGateway struct {