config

package
v0.0.0-...-18aef32 Latest Latest
Warning

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

Go to latest
Published: Sep 3, 2020 License: MIT Imports: 5 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 {
	DB struct {
		Host      string `envconfig:"DB_HOST"`
		Port      int    `envconfig:"DB_PORT"`
		User      string `envconfig:"DB_USER"`
		Pass      string `envconfig:"DB_PASS"`
		Name      string `envconfig:"DB_NAME"`
		ConnLimit int    `envconfig:"DB_CONN_LIMIT"`
	}
	Server struct {
		Port           int           `envconfig:"SERVER_PORT" default:"8080"`
		ShutdownPeriod time.Duration `envconfig:"SERVER_SHUTDOWN_PERIOD" default:"5s"`
	}
}

Config is the configuration struct

func Get

func Get() *Config

Get returns the singleton config instance.

Jump to

Keyboard shortcuts

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