config

package
v0.0.0-...-1f78cfd Latest Latest
Warning

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

Go to latest
Published: Nov 30, 2023 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 AppCfg

type AppCfg struct {
	Host string `env:"APP_HOST" env-default:"localhost"`
	Port string `env:"APP_PORT" env-default:"9090"`
}

type Config

type Config struct {
	App      AppCfg
	Postgres PostgresCfg
}

func ParseConfigValues

func ParseConfigValues() (Config, error)

type PostgresCfg

type PostgresCfg struct {
	Username     string `env:"POSTGRES_USER" env-default:"postgres"`
	Password     string `env:"POSTGRES_PASSWORD" env-default:"postgres"`
	Port         string `env:"PG_PORT" env-default:"5432"`
	Host         string `env:"POSTGRES_HOST" env-default:"localhost"`
	NameDB       string `env:"POSTGRES_DB" env-default:"postgres"`
	InitFilePath string `env:"PG_INIT_SQL_PATH" env-default:"./internal/sql/task.sql"`
}

Jump to

Keyboard shortcuts

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