Documentation
¶
Index ¶
- Constants
- Variables
- type DBHelper
- type MariaDBHelper
- func (m MariaDBHelper) IsDatabaseReachable() bool
- func (m MariaDBHelper) IsProcessRunning() bool
- func (m MariaDBHelper) RunPostStartSQL() error
- func (m MariaDBHelper) Seed() error
- func (m MariaDBHelper) StartMysqldInBootstrap() (*exec.Cmd, error)
- func (m MariaDBHelper) StartMysqldInJoin() (*exec.Cmd, error)
- func (m MariaDBHelper) StartMysqldInStandAlone()
- func (m MariaDBHelper) StopMysqld()
- func (m MariaDBHelper) TestDatabaseCleanup() error
- func (m MariaDBHelper) Upgrade() (output string, err error)
Constants ¶
View Source
const ( StopCommand = "stop" StatusCommand = "status" )
Variables ¶
View Source
var BuildSeeder = func(db *sql.DB, config config.PreseededDatabase, logger lager.Logger) s.Seeder { return s.NewSeeder(db, config, logger) }
View Source
var CloseDBConnection = func(db *sql.DB) error {
return db.Close()
}
View Source
var OpenDBConnection = func(config *config.DBHelper) (*sql.DB, error) { c := mysql.Config{ User: config.User, Passwd: config.Password, Net: "unix", Addr: config.Socket, } db, err := sql.Open("mysql", c.FormatDSN()) if err != nil { return nil, err } return db, nil }
Overridable methods to allow mocking DB connections in tests
Functions ¶
This section is empty.
Types ¶
type DBHelper ¶
type DBHelper interface { StartMysqldInStandAlone() StartMysqldInJoin() (*exec.Cmd, error) StartMysqldInBootstrap() (*exec.Cmd, error) StopMysqld() Upgrade() (output string, err error) IsDatabaseReachable() bool IsProcessRunning() bool Seed() error RunPostStartSQL() error TestDatabaseCleanup() error }
type MariaDBHelper ¶
type MariaDBHelper struct {
// contains filtered or unexported fields
}
func NewMariaDBHelper ¶
func (MariaDBHelper) IsDatabaseReachable ¶
func (m MariaDBHelper) IsDatabaseReachable() bool
func (MariaDBHelper) IsProcessRunning ¶
func (m MariaDBHelper) IsProcessRunning() bool
func (MariaDBHelper) RunPostStartSQL ¶
func (m MariaDBHelper) RunPostStartSQL() error
func (MariaDBHelper) Seed ¶
func (m MariaDBHelper) Seed() error
func (MariaDBHelper) StartMysqldInBootstrap ¶
func (m MariaDBHelper) StartMysqldInBootstrap() (*exec.Cmd, error)
func (MariaDBHelper) StartMysqldInJoin ¶
func (m MariaDBHelper) StartMysqldInJoin() (*exec.Cmd, error)
func (MariaDBHelper) StartMysqldInStandAlone ¶
func (m MariaDBHelper) StartMysqldInStandAlone()
func (MariaDBHelper) StopMysqld ¶
func (m MariaDBHelper) StopMysqld()
func (MariaDBHelper) TestDatabaseCleanup ¶
func (m MariaDBHelper) TestDatabaseCleanup() error
func (MariaDBHelper) Upgrade ¶
func (m MariaDBHelper) Upgrade() (output string, err error)
Directories
¶
Path | Synopsis |
---|---|
Code generated by counterfeiter.
|
Code generated by counterfeiter. |
seederfakes
Code generated by counterfeiter.
|
Code generated by counterfeiter. |
Click to show internal directories.
Click to hide internal directories.