storage

package
v0.0.20 Latest Latest
Warning

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

Go to latest
Published: May 12, 2025 License: AGPL-3.0 Imports: 26 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func New

func New(ctx context.Context, dbURL string) (*pgxpool.Pool, error)

func StartPostgresContainer

func StartPostgresContainer(ctx context.Context, c DatabaseConfig) error

StartPostgresContainer starts a PostgreSQL container with persistent storage and checks for readiness with a PING using exponential backoff.

Types

type DatabaseConfig

type DatabaseConfig struct {
	Host       string `split_words:"true" default:"localhost"`
	Port       int    `split_words:"true" default:"5432"`
	User       string `split_words:"true" default:"postgres"`
	Pass       string `split_words:"true" default:"password"`
	Name       string `split_words:"true" default:"ratchet"`
	DisableTLS bool   `split_words:"true" default:"true"`
}

func (DatabaseConfig) URL

func (c DatabaseConfig) URL() string

Directories

Path Synopsis
dto

Jump to

Keyboard shortcuts

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