Documentation
¶
Index ¶
Constants ¶
View Source
const ( PostgreSQL = "postgresql" Oracle = "oracle" )
Database type constants
Variables ¶
This section is empty.
Functions ¶
Types ¶
type Config ¶
type Config struct {
App AppConfig `koanf:"app"`
Server ServerConfig `koanf:"server"`
Database DatabaseConfig `koanf:"database"`
Log LogConfig `koanf:"log"`
Messaging MessagingConfig `koanf:"messaging"`
}
type DatabaseConfig ¶
type DatabaseConfig struct {
Type string `koanf:"type"` // "postgresql" or "oracle"
Host string `koanf:"host"`
Port int `koanf:"port"`
Database string `koanf:"database"`
Username string `koanf:"username"`
Password string `koanf:"password"`
SSLMode string `koanf:"ssl_mode"`
MaxConns int32 `koanf:"max_conns"`
MaxIdleConns int32 `koanf:"max_idle_conns"`
ConnMaxLifetime time.Duration `koanf:"conn_max_lifetime"`
ConnMaxIdleTime time.Duration `koanf:"conn_max_idle_time"`
// Oracle-specific settings
ServiceName string `koanf:"service_name"` // Oracle service name
SID string `koanf:"sid"` // Oracle SID
// Connection string override (if needed)
ConnectionString string `koanf:"connection_string"`
}
type MessagingConfig ¶
type ServerConfig ¶
Click to show internal directories.
Click to hide internal directories.