Versions in this module Expand all Collapse all v0 v0.0.3 Aug 22, 2025 v0.0.2 Aug 22, 2025 v0.0.1 Aug 21, 2025 Changes in this version + type Config struct + Database string + Host string + Password string + Port int + SSLMode string + Username string + func (c *Config) DSN() string + func (c *Config) Validate() error + type ConnectionPool struct + Config *Config + ConnMaxLifetime time.Duration + DB *gorm.DB + MaxIdleConns int + MaxOpenConns int + func NewConnectionPool(config *Config) *ConnectionPool + func (p *ConnectionPool) Close() error + func (p *ConnectionPool) Connect() error + type HealthCheck struct + Pool *ConnectionPool + Timeout time.Duration + func NewHealthCheck(pool *ConnectionPool) *HealthCheck + func (h *HealthCheck) Check(ctx context.Context) *core.HealthStatus + type Repository struct + DB *gorm.DB + func NewRepository(db *gorm.DB) *Repository + func (r *Repository) Migrate(models ...interface{}) error + func (r *Repository) Transaction(fn func(*gorm.DB) error) error