Documentation ¶
Index ¶
- Constants
- type DBConnectionData
- type DBDriver
- type DBRepo
- func (r *DBRepo) CloseDB() error
- func (r *DBRepo) ConnectToDB() error
- func (r DBRepo) CurrentVersion() (string, error)
- func (r DBRepo) MigrateDB(toVersion, migrationDirection string) error
- func (r DBRepo) MigrateData(toVersion, script, migrationDirection string) error
- func (r DBRepo) MigratedVersions() ([]string, error)
- func (r DBRepo) SetupMigrationTable() error
- type MySQLDBDriver
- func (d *MySQLDBDriver) CurrentVersionSQL() string
- func (d *MySQLDBDriver) MigrateDBSQL(migrationDirection string) (string, error)
- func (d *MySQLDBDriver) MigratedVersionsSQL() string
- func (d *MySQLDBDriver) Open(dbConnData DBConnectionData) (*sql.DB, error)
- func (d *MySQLDBDriver) SetupMigrationTableSQL() string
- type PostgresDBDriver
- func (d *PostgresDBDriver) CurrentVersionSQL() string
- func (d *PostgresDBDriver) MigrateDBSQL(migrationDirection string) (string, error)
- func (d *PostgresDBDriver) MigratedVersionsSQL() string
- func (d *PostgresDBDriver) Open(dbConnData DBConnectionData) (*sql.DB, error)
- func (d *PostgresDBDriver) SetupMigrationTableSQL() string
Constants ¶
View Source
const ( DBDRIVER_POSTGRES = "POSTGRES" DBDRIVER_MYSQL = "MYSQL" )
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type DBConnectionData ¶
type DBRepo ¶
type DBRepo struct {
// contains filtered or unexported fields
}
func (*DBRepo) ConnectToDB ¶
func (DBRepo) CurrentVersion ¶
func (DBRepo) MigrateData ¶
func (DBRepo) MigratedVersions ¶
func (DBRepo) SetupMigrationTable ¶
type MySQLDBDriver ¶
type MySQLDBDriver struct { }
func (*MySQLDBDriver) CurrentVersionSQL ¶
func (d *MySQLDBDriver) CurrentVersionSQL() string
func (*MySQLDBDriver) MigrateDBSQL ¶
func (d *MySQLDBDriver) MigrateDBSQL(migrationDirection string) (string, error)
func (*MySQLDBDriver) MigratedVersionsSQL ¶
func (d *MySQLDBDriver) MigratedVersionsSQL() string
func (*MySQLDBDriver) Open ¶
func (d *MySQLDBDriver) Open(dbConnData DBConnectionData) (*sql.DB, error)
func (*MySQLDBDriver) SetupMigrationTableSQL ¶
func (d *MySQLDBDriver) SetupMigrationTableSQL() string
type PostgresDBDriver ¶
type PostgresDBDriver struct { }
func (*PostgresDBDriver) CurrentVersionSQL ¶
func (d *PostgresDBDriver) CurrentVersionSQL() string
func (*PostgresDBDriver) MigrateDBSQL ¶
func (d *PostgresDBDriver) MigrateDBSQL(migrationDirection string) (string, error)
func (*PostgresDBDriver) MigratedVersionsSQL ¶
func (d *PostgresDBDriver) MigratedVersionsSQL() string
func (*PostgresDBDriver) Open ¶
func (d *PostgresDBDriver) Open(dbConnData DBConnectionData) (*sql.DB, error)
func (*PostgresDBDriver) SetupMigrationTableSQL ¶
func (d *PostgresDBDriver) SetupMigrationTableSQL() string
Click to show internal directories.
Click to hide internal directories.