Discover Packages
github.com/agdaha/sf_final_project/comments_service
internal
config
package
Version:
v0.0.0-...-7a5cd37
Opens a new window with list of versions in this module.
Published: May 7, 2024
License: MIT
Opens a new window with license information.
Imports: 5
Opens a new window with list of imports.
Imported by: 0
Opens a new window with list of known importers.
Documentation
Documentation
¶
type Config struct {
Env string `yaml:"env" env-default:"devel"`
LogLevel string `yaml:"log_level" env:"LOG_LEVEL" env-default:"INFO"`
HTTPServer `yaml:"http_server"`
DB DB
}
type DB struct {
Host string `yaml:"db_host" env:"DB_HOST"`
Port int `yaml:"db_port" env:"DB_PORT"`
Name string `yaml:"db_name" env:"DB_NAME"`
User string `yaml:"db_user" env:"DB_USER"`
Pass string `yaml:"db_pass" env:"DB_PASSWORD"`
}
type HTTPServer struct {
Address string `yaml:"address" env:"API_ADDRESS" env-default:"localhost:8082"`
Timeout time .Duration `yaml:"timeout" env-default:"4s"`
IdleTimeout time .Duration `yaml:"idle_timeout" env-default:"30s"`
}
Source Files
¶
Click to show internal directories.
Click to hide internal directories.