Documentation ¶ Index ¶ Variables func Migrate(db *sql.DB, dbType DBType, dbName string, migrationsDirPath string) error func Rollback(db *sql.DB, dbType DBType, dbName string, migrationsDirPath string) error type DBType func (t DBType) String() string type Migrator Constants ¶ This section is empty. Variables ¶ View Source var ErrUnsupportedDBType = errors.New("unsupported db type") Functions ¶ func Migrate ¶ func Migrate( db *sql.DB, dbType DBType, dbName string, migrationsDirPath string, ) error func Rollback ¶ func Rollback( db *sql.DB, dbType DBType, dbName string, migrationsDirPath string, ) error Types ¶ type DBType ¶ type DBType string const ( DBTypeSqlite3 DBType = "sqlite3" ) func (DBType) String ¶ func (t DBType) String() string type Migrator ¶ type Migrator interface { Up() error Down() error } Source Files ¶ View all Source files errors.go gen.go migrate.go Directories ¶ Show internal Expand all Path Synopsis mocks Code generated by MockGen. Code generated by MockGen. Click to show internal directories. Click to hide internal directories.