config

package
v0.0.0-...-5dd97c0 Latest Latest
Warning

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

Go to latest
Published: Apr 11, 2021 License: MIT Imports: 2 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:"ENV_MODE" default:"development" required:"true"`
	Port              string        `envconfig:"PORT" default:"8000" required:"true"`
	ReadTimeOut       time.Duration `envconfig:"READ_TIMEOUT" default:"5s" required:"true"`
	ReadHeaderTimeOut time.Duration `envconfig:"READ_HEADER_TIMEOUT" default:"5s" required:"true"`
	WriteTimeOut      time.Duration `envconfig:"WRITE_TIMEOUT" default:"5s" required:"true"`
	IdleTimeOut       time.Duration `envconfig:"IDLE_TIMEOUT" default:"60s" required:"true"`
}

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

func Load

func Load() *Config

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