2023-12-21 16:04:04 +00:00
|
|
|
package server
|
|
|
|
|
|
|
|
const (
|
2024-01-24 22:21:48 +00:00
|
|
|
envDevelopment = "DEVELOPMENT"
|
|
|
|
|
|
|
|
envLoggingLevel = "LOGGING_LEVEL"
|
|
|
|
loggingLevelDefault = "info"
|
|
|
|
envLoggingEncoding = "LOGGING_ENCODING"
|
|
|
|
loggingEncodingDefault = "json"
|
|
|
|
|
2024-01-25 18:57:41 +00:00
|
|
|
envLoggingDirectory = "LOGGING_DIRECTORY"
|
|
|
|
loggingFileNameDefault = "upda.log"
|
|
|
|
|
2024-04-26 12:37:50 +00:00
|
|
|
envSecret = "SECRET"
|
|
|
|
|
2023-12-21 16:04:04 +00:00
|
|
|
envTZ = "TZ"
|
|
|
|
tzDefault = "Europe/Berlin"
|
|
|
|
|
2024-10-24 20:52:41 +00:00
|
|
|
envWebApiUrl = "WEB_API_URL"
|
|
|
|
webApiUrlDefault = "http://localhost"
|
|
|
|
|
|
|
|
envWebTitle = "WEB_TITLE"
|
|
|
|
webTitleDefault = "upda"
|
|
|
|
|
2024-04-26 18:24:47 +00:00
|
|
|
envAuthMode = "AUTH_MODE"
|
|
|
|
authModeDefault = authModeBasicSingle
|
|
|
|
authModeBasicSingle = "basic_single"
|
|
|
|
authModeBasicCredentials = "basic_credentials"
|
|
|
|
envBasicAuthUser = "BASIC_AUTH_USER"
|
|
|
|
envBasicAuthPassword = "BASIC_AUTH_PASSWORD"
|
|
|
|
envBasicAuthCredentials = "BASIC_AUTH_CREDENTIALS"
|
2023-12-21 16:04:04 +00:00
|
|
|
|
|
|
|
envServerPort = "SERVER_PORT"
|
|
|
|
envServerListen = "SERVER_LISTEN"
|
|
|
|
envServerTlsEnabled = "SERVER_TLS_ENABLED"
|
|
|
|
envServerTlsCertPath = "SERVER_TLS_CERT_PATH"
|
|
|
|
envServerTlsKeyPath = "SERVER_TLS_KEY_PATH"
|
|
|
|
envServerTimeout = "SERVER_TIMEOUT"
|
|
|
|
serverListenDefault = ""
|
|
|
|
serverPortDefault = "8080"
|
|
|
|
serverTlsEnabledDefault = "false"
|
|
|
|
serverTimeoutDefault = "1s"
|
|
|
|
|
2024-06-10 18:03:25 +00:00
|
|
|
envCorsAllowOrigins = "CORS_ALLOW_ORIGINS"
|
|
|
|
envCorsAllowMethods = "CORS_ALLOW_METHODS"
|
|
|
|
envCorsAllowHeaders = "CORS_ALLOW_HEADERS"
|
|
|
|
envCorsAllowCredentials = "CORS_ALLOW_CREDENTIALS"
|
|
|
|
envCorsExposeHeaders = "CORS_EXPOSE_HEADERS"
|
|
|
|
corsAllowOriginsDefault = "*"
|
|
|
|
corsAllowMethodsDefault = "HEAD, GET, POST, PUT, PATCH, DELETE, OPTIONS"
|
|
|
|
corsAllowHeadersDefault = "Authorization, Content-Type"
|
|
|
|
corsAllowCredentialsDefault = "true"
|
|
|
|
corsExposeHeadersDefault = "*"
|
2023-12-21 16:04:04 +00:00
|
|
|
|
|
|
|
dbTypeSqlite = "sqlite"
|
|
|
|
dbTypePostgres = "postgres"
|
|
|
|
|
|
|
|
envDbType = "DB_TYPE"
|
|
|
|
envDbSqliteFile = "DB_SQLITE_FILE"
|
|
|
|
envDbPostgresHost = "DB_POSTGRES_HOST"
|
|
|
|
envDbPostgresPort = "DB_POSTGRES_PORT"
|
|
|
|
envDbPostgresName = "DB_POSTGRES_NAME"
|
|
|
|
envDbPostgresTimeZone = "DB_POSTGRES_TZ"
|
|
|
|
envDbPostgresUser = "DB_POSTGRES_USER"
|
|
|
|
envDbPostgresPassword = "DB_POSTGRES_PASSWORD"
|
|
|
|
dbTypeSqliteDbNameDefault = "upda.db"
|
|
|
|
dbTypePostgresHostDefault = "localhost"
|
|
|
|
dbTypePostgresPortDefault = "5432"
|
|
|
|
dbTypePostgresTZDefault = "Europe/Berlin"
|
|
|
|
|
|
|
|
envTaskPrometheusRefreshInterval = "TASK_PROMETHEUS_REFRESH_INTERVAL"
|
|
|
|
taskPrometheusRefreshDefault = "60s"
|
|
|
|
|
|
|
|
envWebhooksTokenLength = "WEBHOOKS_TOKEN_LENGTH"
|
|
|
|
webhooksTokenLengthDefault = "16"
|
|
|
|
|
|
|
|
envPrometheusEnabled = "PROMETHEUS_ENABLED"
|
|
|
|
envPrometheusMetricsPath = "PROMETHEUS_METRICS_PATH"
|
|
|
|
envPrometheusSecureTokenEnabled = "PROMETHEUS_SECURE_TOKEN_ENABLED"
|
|
|
|
envPrometheusSecureToken = "PROMETHEUS_SECURE_TOKEN"
|
|
|
|
prometheusEnabledDefault = "false"
|
|
|
|
prometheusMetricsPathDefault = "/metrics"
|
|
|
|
prometheusSecureTokenEnabledDefault = "true"
|
|
|
|
|
|
|
|
envTaskUpdateCleanStaleEnabled = "TASK_UPDATE_CLEAN_STALE_ENABLED"
|
|
|
|
envTaskUpdateCleanStaleInterval = "TASK_UPDATE_CLEAN_STALE_INTERVAL"
|
|
|
|
envTaskUpdateCleanStaleMaxAge = "TASK_UPDATE_CLEAN_STALE_MAX_AGE"
|
2023-12-22 12:13:44 +00:00
|
|
|
taskUpdateCleanStaleEnabledDefault = "false"
|
2023-12-21 16:04:04 +00:00
|
|
|
taskUpdateCleanStaleIntervalDefault = "1h"
|
2024-04-26 12:37:50 +00:00
|
|
|
taskUpdateCleanStaleMaxAgeDefault = "720h"
|
2023-12-21 16:04:04 +00:00
|
|
|
|
|
|
|
envTaskEventCleanStaleEnabled = "TASK_EVENT_CLEAN_STALE_ENABLED"
|
|
|
|
envTaskEventCleanStaleInterval = "TASK_EVENT_CLEAN_STALE_INTERVAL"
|
|
|
|
envTaskEventCleanStaleMaxAge = "TASK_EVENT_CLEAN_STALE_MAX_AGE"
|
2023-12-22 12:13:44 +00:00
|
|
|
taskEventCleanStaleEnabledDefault = "false"
|
2023-12-21 16:04:04 +00:00
|
|
|
taskEventCleanStaleIntervalDefault = "8h"
|
|
|
|
taskEventCleanStaleMaxAgeDefault = "2190h"
|
|
|
|
|
2024-04-26 12:37:50 +00:00
|
|
|
envTaskActionsEnqueueEnabled = "TASK_ACTIONS_ENQUEUE_ENABLED"
|
|
|
|
envTaskActionsEnqueueInterval = "TASK_ACTIONS_ENQUEUE_INTERVAL"
|
|
|
|
envTaskActionsEnqueueBatchSize = "TASK_ACTIONS_ENQUEUE_BATCH_SIZE"
|
|
|
|
taskActionsEnqueueEnabledDefault = "true"
|
|
|
|
taskActionsEnqueueIntervalDefault = "10s"
|
|
|
|
taskActionsEnqueueBatchSizeDefault = "1"
|
|
|
|
|
|
|
|
envTaskActionsInvokeEnabled = "TASK_ACTIONS_INVOKE_ENABLED"
|
|
|
|
envTaskActionsInvokeInterval = "TASK_ACTIONS_INVOKE_INTERVAL"
|
|
|
|
envTaskActionsInvokeBatchSize = "TASK_ACTIONS_INVOKE_BATCH_SIZE"
|
|
|
|
envTaskActionsInvokeMaxRetries = "TASK_ACTIONS_INVOKE_MAX_RETRIES"
|
|
|
|
taskActionsInvokeEnabledDefault = "true"
|
|
|
|
taskActionsInvokeIntervalDefault = "10s"
|
|
|
|
taskActionsInvokeBatchSizeDefault = "1"
|
|
|
|
taskActionsInvokeMaxRetriesDefault = "3"
|
|
|
|
|
|
|
|
envTaskActionsCleanStaleEnabled = "TASK_ACTIONS_CLEAN_STALE_ENABLED"
|
|
|
|
envTaskActionsCleanStaleInterval = "TASK_ACTIONS_CLEAN_STALE_INTERVAL"
|
|
|
|
envTaskActionsCleanStaleMaxAge = "TASK_ACTIONS_CLEAN_STALE_MAX_AGE"
|
|
|
|
taskActionsCleanStaleEnabledDefault = "true"
|
|
|
|
taskActionsCleanStaleIntervalDefault = "12h"
|
|
|
|
taskActionsCleanStaleMaxAgeDefault = "720h"
|
|
|
|
|
2023-12-22 12:13:44 +00:00
|
|
|
envLockRedisEnabled = "LOCK_REDIS_ENABLED"
|
|
|
|
envLockRedisUrl = "LOCK_REDIS_URL"
|
|
|
|
redisEnabledDefault = "false"
|
2023-12-21 16:04:04 +00:00
|
|
|
)
|