config

package
v0.0.0-...-ac624b7 Latest Latest
Warning

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

Go to latest
Published: Dec 6, 2018 License: MIT Imports: 4 Imported by: 0

Documentation

Overview

Package config handles all application configuration. It reads settings from the running environment, or for local development it reads the contents of a file named `.env` in the project root

Index

Constants

This section is empty.

Variables

View Source
var (
	// Port is the TCP port on which the server will listen
	Port = getEnvDefault("PORT", "5000")
	// DebugLogging if true, will log extra data
	DebugLogging = mustParseBool(getEnvDefault("DEBUG_LOGGING", "false"))
	// RequestLoggingLevel controls how much info is logged per request, it can be
	// set to 0 (no request logging) 1 (route, method, response) 2 (everything)
	RequestLoggingLevel = mustParseInt(getEnvDefault("REQUEST_LOGGING_LEVEL", "2"))
	// LogglyToken if set will send logs to Loggly
	LogglyToken = getEnvDefault("LOGGLY_TOKEN", "")
	// JWTSalt is the private signing key for server-generated JWTs
	JWTSalt = getEnvDefault("JWT_SALT", "CHANGEME")
	// DBSalt is the private used for salting passwords in postgres
	DBSalt = getEnvDefault("DB_SALT", "CHANGEME")
	// AuthTokenTTL is the time-to-live of a JWT
	AuthTokenTTL = mustParseDuration(getEnvDefault("AUTH_TOKEN_TTL", "24h"))
	// DatabaseURL is the fully qualified user/pass/host/port/db of a postgres
	// instance
	DatabaseURL = getEnvDefault("DATABASE_URL", "")
	// DatabaseTestURL is the fully qualified user/pass/host/port/db of a postgres
	// instance that will be used for unit testing
	DatabaseTestURL = getEnvDefault("DATABASE_TEST_URL", "")
)

Functions

This section is empty.

Types

This section is empty.

Jump to

Keyboard shortcuts

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