Documentation ¶
Index ¶
- func EnsureMigrationTableExistsCh(db *sqlx.DB) chan types.Done
- func GetDB() *sqlx.DB
- func GetLiveMigrationInfoCh(db *sqlx.DB, migrationFs embed.FS) chan MigrationState
- func GetMockDB() (*sqlx.DB, sqlmock.Sqlmock)
- func MigrateDownCh(db *sqlx.DB, migrationFs embed.FS) chan types.Done
- func MigrateUpCh(db *sqlx.DB, migrationFs embed.FS) chan types.Done
- func SetupServer(engine *gin.Engine, db *sqlx.DB, templateFS embed.FS, staticFs embed.FS)
- type MigrationState
- type MigrationsTable
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func EnsureMigrationTableExistsCh ¶
EnsureMigrationTableExistsCh checks if the migrations table exists and creates it if it doesn't
func GetLiveMigrationInfoCh ¶
func GetLiveMigrationInfoCh(db *sqlx.DB, migrationFs embed.FS) chan MigrationState
GetLiveMigrationInfoCh returns the latest migration version and the installed migration version
func MigrateDownCh ¶
MigrateDownCh migrates the database down to the previous version
func MigrateUpCh ¶
MigrateUpCh migrates the database up to the latest version
Types ¶
type MigrationState ¶
type MigrationsTable ¶
Click to show internal directories.
Click to hide internal directories.