config

package
v1.7.0 Latest Latest
Warning

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

Go to latest
Published: Sep 19, 2019 License: MIT Imports: 1 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Config

type Config struct {
	EnvMode      string `envconfig:"ENVMODE" required:"true" default:"development"`
	ServerPort   string `envconfig:"SERVERPORT" required:"true" default:"8000"`
	DBHost       string `envconfig:"DBHOST" required:"true"`
	DBUser       string `envconfig:"DBUSER" required:"true"`
	DBName       string `envconfig:"DBNAME" required:"true"`
	DBPort       string `envconfig:"DBPORT" required:"true"`
	DBPass       string `envconfig:"DBPASS" required:"true"`
	RedisAddress string `envconfig:"REDISADDR" required:"true"`
	RedisPass    string `envconfig:"REDISPASS" required:"true"`
	NewRelicKey  string `envconfig:"NEWRELICKEY"`
	JWTSecret    string `envconfig:"JWTSECRET" required:"true"`
}

Config is a configuration struct that contains all environment variables of the app.

func Load

func Load() (*Config, error)

Load loads the app the configuration based in the environment variables.

Jump to

Keyboard shortcuts

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