env

package
v1.1.2 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Oct 26, 2024 License: GPL-3.0 Imports: 5 Imported by: 0

Documentation

Index

Constants

View Source
const (
	ModeDevelopment = "development"
	ModeProduction  = "production"

	LogTypeAll    = "all"
	LogTypeDisk   = "disk"
	LogTypeStderr = "stderr"
	LogTypeNone   = "none"
)

Variables

View Source
var (
	Debug      = func() bool { return truthy(env["LIGHTHOUSE_DEBUG"]) }
	Production = func() bool { return env["MODE"] == ModeProduction }

	Host = func() string { return env["HOST"] }
	Port = func() string { return env["PORT"] }

	LogType = func() string { return env["LOG_TYPE"] }
	LogPath = func() string { return env["LOG_PATH"] }

	DatabaseName     = func() string { return env["DB_NAME"] }
	DatabaseUsername = func() string { return env["DB_USERNAME"] }
	DatabasePassword = func() string { return env["DB_PASSWORD"] }
	DatabaseProtocol = func() string { return env["DB_PROTOCOL"] }
	DatabaseAddress  = func() string { return env["DB_ADDRESS"] }
	DatabaseCharset  = func() string { return env["DB_CHARSET"] }
	DatabaseTimezone = func() string { return env["DB_TIMEZONE"] }

	DefaultRootPass = func() string { return or("DEFAULT_ROOT_PASS", "root") }
	DefaultAnonPass = func() string { return or("DEFAULT_ANON_PASS", "anon") }

	LiveReload      = func() bool { return truthy(env["LIVE_RELOAD"]) }
	DisableAuth     = func() bool { return truthy(env["DISABLE_AUTH"]) }
	DisableServices = func() bool { return truthy(env["DISABLE_SERVICES"]) }

	TrustedProxies = func() string { return env["TRUSTED_PROXIES"] }
)

Functions

func Init

func Init()

func InitFrom

func InitFrom(path string) error

func Validate

func Validate() error

Types

This section is empty.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL