postgresql & migrations
This commit is contained in:
parent
ae096d4820
commit
7f6cd8e557
15 changed files with 254 additions and 27 deletions
|
|
@ -8,8 +8,9 @@ import (
|
|||
)
|
||||
|
||||
type Config struct {
|
||||
Logger Logger `yaml:"logger"`
|
||||
Providers struct {
|
||||
Logger Logger `yaml:"logger"`
|
||||
Postgresql Postgresql `yaml:"postgresql"`
|
||||
Providers struct {
|
||||
Bybit Bybit `yaml:"bybit"`
|
||||
} `yaml:"providers"`
|
||||
}
|
||||
|
|
@ -24,6 +25,13 @@ type Bybit struct {
|
|||
BaseURL string `yaml:"base_url" env-default:"https://api.bybit.com"` // bybit api url
|
||||
}
|
||||
|
||||
type Postgresql struct {
|
||||
Address string `yaml:"address" env-required:"true"`
|
||||
User string `yaml:"user" env-required:"true"`
|
||||
Password string `yaml:"password" env-required:"true"`
|
||||
DBName string `yaml:"db_name" env-required:"true"`
|
||||
}
|
||||
|
||||
// MustLoad returns config or panic.
|
||||
func MustLoad() *Config {
|
||||
configPath := os.Getenv("CONFIG_PATH")
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue