Versions in this module Expand all Collapse all v1 v1.0.0 Mar 7, 2026 Changes in this version + func Connect() (*gorm.DB, error) + func ConnectWithConfig(cfg DBConfig) (*gorm.DB, error) + func TransferCredits(db *gorm.DB, fromID, toID uint, amount int) error + func WithTransaction(db *gorm.DB, fn TxFunc) error + type DBConfig struct + ConnMaxIdleTime time.Duration + ConnMaxLifetime time.Duration + Driver string + Host string + MaxIdleConns int + MaxOpenConns int + Name string + Password string + Port string + SSLMode string + User string + func NewDBConfig() DBConfig + func NewReadDBConfig() DBConfig + func (cfg DBConfig) DSN() string + type Resolver struct + func NewResolver(writer, reader *gorm.DB) *Resolver + func (r *Resolver) Reader() *gorm.DB + func (r *Resolver) Writer() *gorm.DB + type TxFunc func(tx *gorm.DB) error Other modules containing this package github.com/RAiWorks/RapidGo/v2