embedded

package
v0.0.0-...-c36a285 Latest Latest
Warning

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

Go to latest
Published: Feb 25, 2026 License: Apache-2.0 Imports: 12 Imported by: 0

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.

Jump to

Keyboard shortcuts

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