config

package
v0.0.0-...-3ca17b7 Latest Latest
Warning

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

Go to latest
Published: Nov 20, 2024 License: MIT Imports: 6 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 {
	EnvMode         env.Mode      `yaml:"env_mode"         env:"ENV_Mode"         env-default:"local"`
	StartTimeout    time.Duration `yaml:"start_timeout"    env:"START_TIMEOUT"    env-default:"10s"`
	ShutdownTimeout time.Duration `yaml:"shutdown_timeout" env:"SHUTDOWN_TIMEOUT" env-default:"10s"`
	Telegram        Telegram      `yaml:"telegram"`
	HTTP            HTTP          `yaml:"http"`
	DatabaseURL     string        `yaml:"database_url"     env:"DATABASE_URL"`
}

func MustLoad

func MustLoad() Config

type HTTP

type HTTP struct {
	Port string `yaml:"port" env:"HTTP_PORT" env-default:"8080"`
}

type Telegram

type Telegram struct {
	EnvMode    env.Mode `yaml:"-"           env:"-"`
	Token      string   `yaml:"token"       env:"TELEGRAM_TOKEN"`
	WebhookURL string   `yaml:"webhook_url" env:"TELEGRAM_WEBHOOK_URL"`
	URL        string   `yaml:"url"         env:"TELEGRAM_URL"`
}

Jump to

Keyboard shortcuts

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