mysql

package module
v0.0.0-...-5e8a398 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Mar 13, 2026 License: MIT Imports: 6 Imported by: 0

README

MySQL GoDoc Build Status Go Report Card

TMis package provides a mysql Box using Conex.

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	// Image to use for the box.
	Image = "mysql:8"
	// Port used for connect to MySQL.
	Port = "3306"

	// MySQLUpWaitTime dictates how long we should wait for MySQL to accept connections on {{Port}}.
	MySQLUpWaitTime = 30 * time.Second
)

Functions

func Box

func Box(t testing.TB, config *Config) (*sql.DB, conex.Container)

Box returns a MySQL client and the container running the MySQL server. It will call t.Fatal on errors.

Types

type Config

type Config struct {
	User     string // leave blank for root, otherwise provide a password
	Password string // can be blank for root user
	Database string // defaults to `test`
	// contains filtered or unexported fields
}

Config used to connect to the database.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL