Capabilities handling, database.

This commit is contained in:
2019-09-09 21:52:32 +05:00
parent 4e614c094e
commit 28ddc32368
82 changed files with 12467 additions and 20 deletions

View File

@@ -2,10 +2,24 @@ package configuration
// Represents configuration file structure.
type config struct {
// Database represents database configuration.
Database Database `yaml:"database"`
// Network represents network stack configuration.
Network []Network `yaml:"network"`
}
type Database struct {
// DSN is a connection string in form "proto://user:password@host:port/database".
DSN string `yaml:"dsn"`
// Params is a DSN params that will be added to DSN after
// connection string itself.
Params string `yaml:"params"`
// Timeout is a timeout for connection watcher. Every this
// count of seconds connection watcher will check if database
// connection is alive.
Timeout int64 `yaml:"timeout"`
}
type Network struct {
// Address represents address to bing in form of "ip:port".
Address string `yaml:"address"`