config

package
v0.0.0-...-71cacd3 Latest Latest
Warning

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

Go to latest
Published: Mar 28, 2022 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 {
	ServerConfig `mapstructure:",squash"`
	Postegres    `mapstructure:",squash"`
}

func LoadConfig

func LoadConfig(path string, filename string, configtype string) (*Config, error)

LoadConfig maps all enviornment variable to Config Struct Using gomapstructure https://github.com/mitchellh/mapstructure

type Postegres

type Postegres struct {
	DB_HOST string `mapstructure:"DB_HOST"`
	DB_PORT string `mapstructure:"DB_PORT"`
	DB_NAME string `mapstructure:"DB_NAME"`
	DB_USER string `mapstructure:"DB_USER"`
	DB_PASS string `mapstructure:"DB_PASS"`
}

type ServerConfig

type ServerConfig struct {
	App     string `mapstructure:"APP"`
	Version string `mapstructure:"VERSION"`
	Status  string `mapstructure:"STATUS"`
	Port    string `mapstructure:"PORT"`
}

Jump to

Keyboard shortcuts

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