Documentation ¶
Index ¶
- Variables
- func AutoMigrate(params CommandMigrateParams) error
- func Migrate(params GooseMigrateParams) error
- func New(params Params) (*gorm.DB, error)
- func NewSQL(config Config) (*sql.DB, error)
- func RegisterGoose(storage GooseStorage)
- func RegisterMigration(migrator Migrator)
- type CommandMigrateParams
- type Config
- type Dialect
- type GooseMigrateParams
- type GooseStorage
- type Migrator
- type Params
Constants ¶
This section is empty.
Variables ¶
View Source
var ConfigDefault = Config{ Dialect: DialectMySQL, Host: "localhost", Port: 3306, User: "root", Password: "", Database: "db", Timezone: "UTC", Debug: false, ConnMaxIdleTime: 3 * time.Minute, ConnMaxLifetime: 30 * time.Minute, MaxOpenConns: runtime.NumCPU() * 4, MaxIdleConns: runtime.NumCPU() * 2, }
Functions ¶
func AutoMigrate ¶
func AutoMigrate(params CommandMigrateParams) error
func Migrate ¶
func Migrate(params GooseMigrateParams) error
func RegisterGoose ¶
func RegisterGoose(storage GooseStorage)
func RegisterMigration ¶
func RegisterMigration(migrator Migrator)
Types ¶
type CommandMigrateParams ¶
type GooseMigrateParams ¶
type GooseStorage ¶
Click to show internal directories.
Click to hide internal directories.