config

package
v0.0.0-...-2b31a26 Latest Latest
Warning

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

Go to latest
Published: Jun 17, 2019 License: GPL-3.0 Imports: 1 Imported by: 0

Documentation

Overview

Package config provides data structs and methods to store the application's configuration details

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Config

type Config struct {
	Port        uint   `env:"PORT" envDefault:"8000"`
	PostgresURL string `env:"POSTGRES_URL" envDefault:"postgres://user:pass@127.0.0.1/simple-service"`
}

Config is responsible for holding the application configuration variables. Each configuration point is also exported as an environment variable.

func NewConfig

func NewConfig() Config

NewConfig returns a config.Config object filled with the environment variables values.

Jump to

Keyboard shortcuts

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