conf

package
v0.0.0-...-8c4cb7d Latest Latest
Warning

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

Go to latest
Published: Mar 17, 2024 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 AppConf

type AppConf struct {
	Http HttpConf `mapstructure:"http"`
	Log  LogConf  `mapstructure:"log"`
	DB   DBConf   `mapstructure:"db"`
	Dst  DstConf  `mapstructure:"dst"`
}

func Load

func Load(file string) (*AppConf, error)

Load tries to load config file and unmarshal it to *AppConf

type DBConf

type DBConf struct {
	Address  string `mapstructure:"address"`
	User     string `mapstructure:"user"`
	Password string `mapstructure:"password"`
	DataBase string `mapstructure:"database"`
	Params   string `mapstructure:"params"`
}

type DstConf

type DstConf struct {
	SteamKey  string `mapstructure:"steamKey"`
	KleiToken string `mapstructure:"kleiToken"`
	ProxyURL  string `mapstructure:"proxyURL"`

	Lobby LobbyConf `mapstructure:"lobby"`
}

type HttpConf

type HttpConf struct {
	Listen       string        `mapstructure:"listen"`
	BasePath     string        `mapstructure:"base"`
	WriteTimeout time.Duration `mapstructure:"writeTimeout"`
	ReadTimeout  time.Duration `mapstructure:"readTimeout"`
	IdleTimeout  time.Duration `mapstructure:"idleTimeout"`
	CertFile     string        `mapstructure:"cert"`
	KeyFile      string        `mapstructure:"key"`
	CacheTTL     time.Duration `mapstructure:"cacheTTL"`
}

type LobbyConf

type LobbyConf struct {
	CollectCron string        `mapstructure:"collect"`
	ClearCron   string        `mapstructure:"clear"`
	TTL         time.Duration `mapstructure:"ttl"`
	Timeout     time.Duration `mapstructure:"timeout"`
}

type LogConf

type LogConf struct {
	File  string `mapstructure:"file"`
	Level string `mapstructure:"level"`
}

Jump to

Keyboard shortcuts

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