config

package
v1.1.4-beta Latest Latest
Warning

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

Go to latest
Published: Jul 31, 2025 License: GPL-3.0 Imports: 6 Imported by: 0

Documentation

Overview

Package config provides database configuration helpers for PostgreSQL connections for the example: Book circulation in a public library

This package contains factory functions for creating database connections using different PostgreSQL drivers (pgx.Pool, sql.DB, sqlx.DB) with pre-configured test and benchmark database DSNs.

This package is part of the shell (infrastructure) layer, providing database connection configuration for the event sourcing system.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func PostgresBenchmarkDSN

func PostgresBenchmarkDSN() string

PostgresBenchmarkDSN returns the DSN for the benchmark database

func PostgresPGXPoolBenchmarkConfig

func PostgresPGXPoolBenchmarkConfig() *pgxpool.Config

PostgresPGXPoolBenchmarkConfig creates a pgxpool.Config for the benchmark database

func PostgresPGXPoolTestConfig

func PostgresPGXPoolTestConfig() *pgxpool.Config

PostgresPGXPoolTestConfig creates a pgxpool.Config for the test database

func PostgresSQLDBBenchmarkConfig

func PostgresSQLDBBenchmarkConfig() *sql.DB

PostgresSQLDBBenchmarkConfig creates a configured *sql.DB for the benchmark database

func PostgresSQLDBTestConfig

func PostgresSQLDBTestConfig() *sql.DB

PostgresSQLDBTestConfig creates a configured *sql.DB for the test database

func PostgresSQLXBenchmarkConfig

func PostgresSQLXBenchmarkConfig() *sqlx.DB

PostgresSQLXBenchmarkConfig creates a configured *sqlx.DB for the benchmark database

func PostgresSQLXTestConfig

func PostgresSQLXTestConfig() *sqlx.DB

PostgresSQLXTestConfig creates a configured *sqlx.DB for the test database

func PostgresTestDSN

func PostgresTestDSN() string

PostgresTestDSN returns the DSN for the test database

Types

This section is empty.

Jump to

Keyboard shortcuts

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