Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
Types ¶
type MSSqlSettings ¶
MSSqlSettings is the settings for a ms sql database
func (*MSSqlSettings) GetDB ¶
func (ds *MSSqlSettings) GetDB() (*sql.DB, error)
GetDB will return a database instance from the settings
func (*MSSqlSettings) WaitForDatabaseToBeOnline ¶
func (ds *MSSqlSettings) WaitForDatabaseToBeOnline(secondsToWait int) error
WaitForDatabaseToBeOnline will wait for the database server to be online for the given seconds.
type PostgresDatabaseSettings ¶
type PostgresDatabaseSettings struct { Host string Port int User string Password string Name string }
PostgresDatabaseSettings are the settings for a postgres database
func (*PostgresDatabaseSettings) EnsureDatabaseExistsAndGetConnection ¶
func (ds *PostgresDatabaseSettings) EnsureDatabaseExistsAndGetConnection() (*sql.DB, error)
EnsureDatabaseExistsAndGetConnection will create the database if it doesn't exist and return a connection.
func (*PostgresDatabaseSettings) MigrateUpWithStatik ¶
func (ds *PostgresDatabaseSettings) MigrateUpWithStatik(subdirectory string) error
MigrateUpWithStatik migrates the database using statik
func (*PostgresDatabaseSettings) WaitForDatabaseToBeOnline ¶
func (ds *PostgresDatabaseSettings) WaitForDatabaseToBeOnline(secondsToWait int) error
WaitForDatabaseToBeOnline will wait for the database server to be online for the given seconds.
Click to show internal directories.
Click to hide internal directories.