add config descriptions

Co-Authored-By: Christian Richter <crichter@owncloud.com@>
This commit is contained in:
David Christofas
2022-03-01 16:49:26 +01:00
parent d9bf920307
commit 017de20520
5 changed files with 24 additions and 25 deletions

View File

@@ -33,38 +33,37 @@ type Config struct {
// Asset defines the available asset configuration.
type Asset struct {
Path string `env:"ACCOUNTS_ASSET_PATH"`
Path string `env:"ACCOUNTS_ASSET_PATH" desc:"The path to the ui assets."`
}
// TokenManager is the config for using the reva token manager
type TokenManager struct {
JWTSecret string `env:"OCIS_JWT_SECRET;ACCOUNTS_JWT_SECRET"`
JWTSecret string `env:"OCIS_JWT_SECRET;ACCOUNTS_JWT_SECRET" desc:"The secret to mint jwt tokens."`
}
// Repo defines which storage implementation is to be used.
type Repo struct {
Backend string `env:"ACCOUNTS_STORAGE_BACKEND"`
Backend string `env:"ACCOUNTS_STORAGE_BACKEND" desc:"Defines which storage implementation is to be used"`
Disk Disk
CS3 CS3
}
// Disk is the local disk implementation of the storage.
type Disk struct {
Path string `env:"ACCOUNTS_STORAGE_DISK_PATH"`
Path string `env:"ACCOUNTS_STORAGE_DISK_PATH" desc:"The path where the accounts data is stored."`
}
// CS3 is the cs3 implementation of the storage.
type CS3 struct {
ProviderAddr string `env:"ACCOUNTS_STORAGE_CS3_PROVIDER_ADDR"`
JWTSecret string `env:"ACCOUNTS_STORAGE_CS3_JWT_SECRET"`
ProviderAddr string `env:"ACCOUNTS_STORAGE_CS3_PROVIDER_ADDR" desc:"The address to the storage provider."`
}
// ServiceUser defines the user required for EOS.
type ServiceUser struct {
UUID string `env:"ACCOUNTS_SERVICE_USER_UUID"`
Username string `env:"ACCOUNTS_SERVICE_USER_USERNAME"`
UID int64 `env:"ACCOUNTS_SERVICE_USER_UID"`
GID int64 `env:"ACCOUNTS_SERVICE_USER_GID"`
UUID string `env:"ACCOUNTS_SERVICE_USER_UUID" desc:"The id of the accounts service user."`
Username string `env:"ACCOUNTS_SERVICE_USER_USERNAME" desc:"The username of the accounts service user."`
UID int64 `env:"ACCOUNTS_SERVICE_USER_UID" desc:"The uid of the accounts service user."`
GID int64 `env:"ACCOUNTS_SERVICE_USER_GID" desc:"The gid of the accounts service user."`
}
// Index defines config for indexes.
@@ -75,12 +74,12 @@ type Index struct {
// GIDBound defines a lower and upper bound.
type GIDBound struct {
Lower int64 `env:"ACCOUNTS_GID_INDEX_LOWER_BOUND"`
Upper int64 `env:"ACCOUNTS_GID_INDEX_UPPER_BOUND"`
Lower int64 `env:"ACCOUNTS_GID_INDEX_LOWER_BOUND" desc:"The lowest possible gid value for the indexer."`
Upper int64 `env:"ACCOUNTS_GID_INDEX_UPPER_BOUND" desc:"The highest possible gid value for the indexer."`
}
// UIDBound defines a lower and upper bound.
type UIDBound struct {
Lower int64 `env:"ACCOUNTS_UID_INDEX_LOWER_BOUND"`
Upper int64 `env:"ACCOUNTS_UID_INDEX_UPPER_BOUND"`
Lower int64 `env:"ACCOUNTS_UID_INDEX_LOWER_BOUND" desc:"The lowest possible uid value for the indexer."`
Upper int64 `env:"ACCOUNTS_UID_INDEX_UPPER_BOUND" desc:"The highest possible uid value for the indexer."`
}

View File

@@ -2,6 +2,6 @@ package config
// GRPC defines the available grpc configuration.
type GRPC struct {
Addr string `env:"ACCOUNTS_GRPC_ADDR"`
Addr string `env:"ACCOUNTS_GRPC_ADDR" desc:"The address of the grpc service."`
Namespace string
}

View File

@@ -2,10 +2,10 @@ package config
// HTTP defines the available http configuration.
type HTTP struct {
Addr string `env:"ACCOUNTS_HTTP_ADDR"`
Addr string `env:"ACCOUNTS_HTTP_ADDR" desc:"The address of the http service."`
Namespace string
Root string `env:"ACCOUNTS_HTTP_ROOT"`
CacheTTL int `env:"ACCOUNTS_CACHE_TTL"`
Root string `env:"ACCOUNTS_HTTP_ROOT" desc:"The root path of the http service."`
CacheTTL int `env:"ACCOUNTS_CACHE_TTL" desc:"The cache time for the static assets."`
CORS CORS
}

View File

@@ -2,8 +2,8 @@ package config
// Log defines the available log configuration.
type Log struct {
Level string `env:"OCIS_LOG_LEVEL;ACCOUNTS_LOG_LEVEL"`
Pretty bool `env:"OCIS_LOG_PRETTY;ACCOUNTS_LOG_PRETTY"`
Color bool `env:"OCIS_LOG_COLOR;ACCOUNTS_LOG_COLOR"`
File string `env:"OCIS_LOG_FILE;ACCOUNTS_LOG_FILE"`
Level string `env:"OCIS_LOG_LEVEL;ACCOUNTS_LOG_LEVEL" desc:"The log level."`
Pretty bool `env:"OCIS_LOG_PRETTY;ACCOUNTS_LOG_PRETTY" desc:"Activates pretty log output."`
Color bool `env:"OCIS_LOG_COLOR;ACCOUNTS_LOG_COLOR" desc:"Activates colorized log output."`
File string `env:"OCIS_LOG_FILE;ACCOUNTS_LOG_FILE" desc:"The target log file."`
}

View File

@@ -2,8 +2,8 @@ package config
// Tracing defines the available tracing configuration.
type Tracing struct {
Enabled bool `env:"OCIS_TRACING_ENABLED;ACCOUNTS_TRACING_ENABLED"`
Enabled bool `env:"OCIS_TRACING_ENABLED;ACCOUNTS_TRACING_ENABLED" desc:"Activates tracing."`
Type string `env:"OCIS_TRACING_TYPE;ACCOUNTS_TRACING_TYPE"`
Endpoint string `env:"OCIS_TRACING_ENDPOINT;ACCOUNTS_TRACING_ENDPOINT"`
Collector string `env:"OCIS_TRACING_COLLECTOR;ACCOUNTS_TRACING_COLLECTOR"`
Endpoint string `env:"OCIS_TRACING_ENDPOINT;ACCOUNTS_TRACING_ENDPOINT" desc:"The endpoint to the tracing collector."`
Collector string `env:"OCIS_TRACING_COLLECTOR;ACCOUNTS_TRACING_COLLECTOR" `
}