Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func ResetInstance ¶ added in v0.7.0
ResetInstance attempts to reset the cluster to a clean state. It deletes all cluster level objects, i.e., roles, which are not deleted by dropping database(s). This can be useful for re-using a cluster for multiple tests.
Types ¶
type ConnectionOption ¶
type ConnectionOption string
const (
ConnectionOptionDatabase ConnectionOption = "dbname"
)
type ConnectionOptions ¶
type ConnectionOptions map[ConnectionOption]string
func (ConnectionOptions) ToDSN ¶
func (c ConnectionOptions) ToDSN() string
func (ConnectionOptions) With ¶
func (c ConnectionOptions) With(option ConnectionOption, value string) ConnectionOptions
type DB ¶
type DB struct {
// contains filtered or unexported fields
}
func (*DB) GetConnOpts ¶
func (d *DB) GetConnOpts() ConnectionOptions
type Engine ¶
type Engine struct {
// contains filtered or unexported fields
}
func StartEngine ¶
StartEngine starts a postgres instance. This is useful for testing, where Postgres databases need to be spun up. "postgres" must be on the system's PATH, and the binary must be located in a directory containing "initdb"
func StartEngineUsingPgDir ¶
func (*Engine) CreateDatabase ¶
func (*Engine) CreateDatabaseWithName ¶
func (*Engine) GetPostgresDatabaseConnOpts ¶
func (e *Engine) GetPostgresDatabaseConnOpts() ConnectionOptions
func (*Engine) GetPostgresDatabaseDSN ¶
Click to show internal directories.
Click to hide internal directories.