mirror of
https://github.com/yusing/godoxy.git
synced 2025-05-20 04:42:33 +02:00

- refactored code - moved api/v1/auth to auth/ - security enhancement - env example update - default jwt ttl changed to 24 hours
48 lines
1.1 KiB
Go
48 lines
1.1 KiB
Go
package common
|
|
|
|
import (
|
|
"time"
|
|
)
|
|
|
|
// file, folder structure
|
|
|
|
const (
|
|
DotEnvPath = ".env"
|
|
DotEnvExamplePath = ".env.example"
|
|
|
|
ConfigBasePath = "config"
|
|
ConfigFileName = "config.yml"
|
|
ConfigExampleFileName = "config.example.yml"
|
|
ConfigPath = ConfigBasePath + "/" + ConfigFileName
|
|
HomepageJSONConfigPath = ConfigBasePath + "/.homepage.json"
|
|
IconListCachePath = ConfigBasePath + "/.icon_list_cache.json"
|
|
IconCachePath = ConfigBasePath + "/.icon_cache.json"
|
|
|
|
MiddlewareComposeBasePath = ConfigBasePath + "/middlewares"
|
|
|
|
ComposeFileName = "compose.yml"
|
|
ComposeExampleFileName = "compose.example.yml"
|
|
|
|
DataDir = "data"
|
|
|
|
ErrorPagesBasePath = "error_pages"
|
|
|
|
AgentCertsBasePath = "certs"
|
|
)
|
|
|
|
var RequiredDirectories = []string{
|
|
ConfigBasePath,
|
|
ErrorPagesBasePath,
|
|
MiddlewareComposeBasePath,
|
|
}
|
|
|
|
const DockerHostFromEnv = "$DOCKER_HOST"
|
|
|
|
const (
|
|
HealthCheckIntervalDefault = 5 * time.Second
|
|
HealthCheckTimeoutDefault = 5 * time.Second
|
|
|
|
WakeTimeoutDefault = "30s"
|
|
StopTimeoutDefault = "30s"
|
|
StopMethodDefault = "stop"
|
|
)
|