postgres

package
v0.0.0-...-778c6ac Latest Latest
Warning

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

Go to latest
Published: Sep 17, 2024 License: MIT Imports: 17 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func GetMigrations

func GetMigrations() ([]string, error)

func GetPostgresConn

func GetPostgresConn(setLimits bool) (*sql.DB, error)

func GetPostgresTestContainer

func GetPostgresTestContainer(
	ctx context.Context,
	migrations []string,
	db, user, password string,
) (*postgres.PostgresContainer, error)

Types

type ContainerLogger

type ContainerLogger struct {
	// contains filtered or unexported fields
}

func (ContainerLogger) Printf

func (l ContainerLogger) Printf(format string, v ...interface{})

type Service

type Service interface {
	// Health returns a map of health status information.
	// The keys and values in the map are service-specific.
	Health() map[string]string

	// Close terminates the database connection.
	// It returns an error if the connection cannot be closed.
	Close() error
}

Service represents a service that interacts with a database.

func New

func New() Service

Jump to

Keyboard shortcuts

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