commons

package
v0.0.0 Latest Latest
Warning

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

Go to latest
Published: Apr 8, 2025 License: Apache-2.0 Imports: 9 Imported by: 0

Documentation

Index

Constants

View Source
const DbImage = "postgres:17.4-alpine"
View Source
const DbName = "rollups"
View Source
const DbPassword = "password"
View Source
const DbUser = "postgres"
View Source
const DefaultTimeout time.Duration = 5 * time.Minute
View Source
const OpenEpoch = 19
View Source
const Schema = "" /* 143-byte string literal not displayed */
View Source
const TimeoutInSeconds = 10

Variables

This section is empty.

Functions

func ConfigureLog

func ConfigureLog(level slog.Leveler)

func NewTx

func NewTx(ctx context.Context, db *sqlx.DB) (tx *sqlx.Tx, err error)

Types

type DbFactory

type DbFactory struct {
	TempDir string
	Timeout time.Duration
}

func NewDbFactory

func NewDbFactory() *DbFactory

func (*DbFactory) Cleanup

func (d *DbFactory) Cleanup()

func (*DbFactory) CreateDb

func (d *DbFactory) CreateDb(sqliteFileName string) *sqlx.DB

func (*DbFactory) CreateDbCtx

func (d *DbFactory) CreateDbCtx(ctx context.Context, sqliteFileName string) (*sqlx.DB, error)

type StdoutLogConsumer

type StdoutLogConsumer struct{}

StdoutLogConsumer is a LogConsumer that prints the log to stdout

func (*StdoutLogConsumer) Accept

func (lc *StdoutLogConsumer) Accept(l testcontainers.Log)

Accept prints the log to stdout

Jump to

Keyboard shortcuts

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