config

package
v0.0.0-...-f77fb02 Latest Latest
Warning

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

Go to latest
Published: Nov 30, 2023 License: MIT Imports: 6 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func GetEnvByKey

func GetEnvByKey(key string) string

func InitDatabasePostgres

func InitDatabasePostgres(a *app.App)

Types

type Configuration

type Configuration struct {
	APP struct {
		Name         string `envconfig:"APP_NAME" default:":dk-notification-service"`
		Port         string `envconfig:"APP_PORT" default:"9000"`
		Env          string `envconfig:"APP_ENV" default:"development"`
		RouteService string `envconfig:"APP_ROUTE_SERVICE" default:"/"`
	}
	DB struct {
		Host string `envconfig:"DB_HOST" required:"true" default:"hms.db"`
		Port string `envconfig:"DB_PORT"`
		User string `envconfig:"DB_USER"`
		Pass string `envconfig:"DB_PASS"`
		Name string `envconfig:"DB_NAME"`
	}
}

func LoadConfig

func LoadConfig() (*Configuration, error)

Jump to

Keyboard shortcuts

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