database

package
v0.9.4-RC03 Latest Latest
Warning

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

Go to latest
Published: Sep 9, 2025 License: MIT Imports: 6 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type DB

type DB struct{}

type DBClient

type DBClient interface {
	Close() error
	EnsureSchemaMigrationsReady(ctx context.Context) error
}

type MySQLClient

type MySQLClient struct {
	DB *sql.DB
}

func NewMysqlClient

func NewMysqlClient(dsn string, maxLifetime int, maxOpenConns int, maxIdleConns int) (*MySQLClient, error)

func (*MySQLClient) Close

func (c *MySQLClient) Close() error

type PostgresClient

type PostgresClient struct {
	DB *pgxpool.Pool
}

func NewPostgresClient

func NewPostgresClient(ctx context.Context, dbConf config.PostgresDB) (*PostgresClient, error)

func (*PostgresClient) Close

func (c *PostgresClient) Close() error

func (*PostgresClient) EnsureSchemaMigrationsReady

func (c *PostgresClient) EnsureSchemaMigrationsReady(ctx context.Context) error

Jump to

Keyboard shortcuts

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