Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type DatabaseProvider ¶
type DatabaseProvider struct {
// contains filtered or unexported fields
}
DatabaseProvider holds the reference to a postgres instance.
func NewDatabaseProvider ¶
func NewDatabaseProvider(logger io.Writer) (*DatabaseProvider, error)
NewDatabaseProvider creates and starts an ephemeral Postgres instance that can provide databases on demand.
func (*DatabaseProvider) Cleanup ¶
func (d *DatabaseProvider) Cleanup() error
Cleanup closes the primary connection and stops the postgres server.
func (*DatabaseProvider) CreateDatabase ¶
func (d *DatabaseProvider) CreateDatabase() (*sql.DB, error)
CreateDatabase creates a new empty database.
Click to show internal directories.
Click to hide internal directories.