conf

package
v0.0.0-...-493173e Latest Latest
Warning

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

Go to latest
Published: Oct 17, 2022 License: GPL-3.0 Imports: 3 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 {
	AssetsPath string `env:"ASSETS_PATH" envDefault:"./assets"`

	Telegram Telegram
	VK       VK
	DB       DB
	Mailing  Mailing
}

func Read

func Read() Config

type DB

type DB struct {
	PostgresDSN string `` /* 131-byte string literal not displayed */

	DabataseName  string `env:"DB_NAME,required" envDefault:"bdaytracker"`
	MigrationPath string `env:"DB_MIGRATION_PATH" envDefault:"./migrations"`

	MaxOpenConnections    int           `env:"DB_MAX_OPEN_CONNECTIONS" envDefault:"10"`
	MaxIdleConnections    int           `env:"DB_MAX_IDLE_CONNECTIONS" envDefault:"5"`
	MaxConnectionLifetime time.Duration `env:"DB_MAX_CONNECTION_LIFETIME" envDefault:"5m"`
}

type Mailing

type Mailing struct {
	StartHour             int  `env:"MAILING_START_HOUR" envDefault:"7"`
	EndHour               int  `env:"MAILING_END_HOUR" envDefault:"7"`
	MaxRemindersPerSecond uint `env:"MAILING_MAX_REMINDERS_PER_SECOND" envDefault:"15"`
}

type Telegram

type Telegram struct {
	BotToken string `env:"TELEGRAM_BOT_TOKEN,required"`
}

type VK

type VK struct {
	Token string `env:"VK_TOKEN"`
}

Jump to

Keyboard shortcuts

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