28 lines
603 B
Go
28 lines
603 B
Go
package config
|
|
|
|
import "log/slog"
|
|
|
|
type Config struct {
|
|
Log LogConfig `toml:"log"`
|
|
Gateway GatewayConfig `toml:"gateway"`
|
|
Database DatabaseConfig `toml:"database"`
|
|
}
|
|
|
|
type GatewayConfig struct {
|
|
HttpPort string `toml:"http_port"`
|
|
Websocket string `toml:"websocket"`
|
|
}
|
|
|
|
type LogConfig struct {
|
|
Level slog.Level `toml:"level"`
|
|
Directory string `toml:"directory"`
|
|
Rotation int `toml:"rotation"`
|
|
}
|
|
|
|
type DatabaseConfig struct {
|
|
HostDSN string `toml:"host_dsn"`
|
|
Username string `toml:"username"`
|
|
Password string `toml:"password"`
|
|
Database string `toml:"database"`
|
|
}
|