config

package
v0.1.0 Latest Latest
Warning

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

Go to latest
Published: Jan 15, 2022 License: MIT Imports: 2 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 {
	ApiDebug    bool   `env:"API_DEBUG"`
	PostgresDSN string `env:"POSTGRES_DSN,required"`
	// debug, info, warn, error, fatal, panic
	LogLever string `env:"LOG_LEVEL" envDefault:"info"`
	// json or console
	LogEncoding string `env:"LOG_ENCODING" envDefault:"json"`
	//Fuck        bool   `env:"FUCK,required"`
	RootCategoryID int64         `env:"ROOT_CATEGORY_ID" envDefault:"83850"`
	Port           string        `env:"PORT" envDefault:"8080"`
	RequestTimeout time.Duration `env:"REQUEST_TIMEOUT" envDefault:"4s"`
	TelegramToken  string        `env:"TELEGRAM_TOKEN"`
	TelegramDebug  bool          `env:"TELEGRAM_DEBUG"`
}

func NewConfig added in v0.1.0

func NewConfig() (*Config, error)

Jump to

Keyboard shortcuts

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