Documentation ¶ Index ¶ Constants func Open(cfg *Config) (*gorm.DB, error) type Config Constants ¶ View Source const ( Sqlite = "sqlite" Postgres = "postgres" ) Variables ¶ This section is empty. Functions ¶ func Open ¶ func Open(cfg *Config) (*gorm.DB, error) Types ¶ type Config ¶ type Config struct { // DSN the Data Source Name. DSN string // DisableAutomaticPing as it is. DisableAutomaticPing bool // Prepared Statement. PreparedStmt bool // Max DB open connections. MaxOpenConns int // Max DB idle connections. MaxIdleConns int } Source Files ¶ View all Source files database.go Click to show internal directories. Click to hide internal directories.