niki/domain/payment/config.go

34 lines
1.1 KiB
Go

package paymentapp
type HTTPConfig struct {
Addr string `yaml:"addr" json:"addr"`
Port int
ReadTimeout int `yaml:"read_timeout" json:"read_timeout"`
WriteTimeout int `yaml:"write_timeout" json:"write_timeout"`
IdleTimeout int `yaml:"idle_timeout" json:"idle_timeout"`
AllowOrigins []string
}
type PostgresConfig struct {
Host string `yaml:"host"`
Port int `yaml:"port"`
Driver string `yaml:"driver"`
User string `yaml:"user"`
Password string `yaml:"password"`
DbName string `yaml:"dbName"`
SSLMode string `yaml:"sslMode"`
MaxIdleConns int `yaml:"maxIdleConns"`
MaxOpenConns int `yaml:"maxOpenConns"`
ConnMaxLifetime int `yaml:"connMaxLifetime"`
PathOfMigrations string `yaml:"pathOfMigrations"`
}
type LoggerConfig struct {
Level string `yaml:"level" json:"level"`
}
type Config struct {
HTTP HTTPConfig `yaml:"http" json:"http"`
Postgres PostgresConfig `yaml:"postgres" json:"postgres"`
Logger LoggerConfig `yaml:"logger" json:"logger"`
}