Versions in this module Expand all Collapse all v1 v1.0.1 May 2, 2021 Changes in this version + type Database struct + func New(opts *Opts) (*Database, error) + func (d *Database) AutoMigrate() error + func (d *Database) Close() error + func (d *Database) DB() *gorm.DB + func (d *Database) Migrator() gorm.Migrator + type Date time.Time + func (date *Date) Scan(value interface{}) (err error) + func (date Date) GormDataType() string + func (date Date) Value() (driver.Value, error) + type Opts struct + DBName string + DBPath string + Host string + Password string + Port string + SSLModeDisable bool + Type string + User string + func OptsFromConfig(cfg config.Database) *Opts + func (db *Opts) DSN() string + func (db *Opts) Open() (gorm.Dialector, error)