config

package
v0.0.0-...-e972d78 Latest Latest
Warning

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

Go to latest
Published: Jun 20, 2024 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"`
	BaseURL   string `env:"BASE_URL" env-default:"localhost:9090"`
	LoggerLVL string `env:"APP_LOG_LVL" env-default:"debug"`
}

type CronCfg

type CronCfg struct {
	Schedule  string `env:"CRON_SCHEDULE" env-default:"0 0 * * *"`
	LoggerLVL string `env:"CRON_LOG_LVL" env-default:"debug"`
	Postgres  PostgresCfg
}

func NewCron

func NewCron() (CronCfg, 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"`
	Migrations string `env:"DB_MIGRATION_PATH" env-default:"./migrations"`
}

type ShortenerCfg

type ShortenerCfg struct {
	App      AppCfg
	Postgres PostgresCfg
}

func NewShortener

func NewShortener() (ShortenerCfg, error)

Jump to

Keyboard shortcuts

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