persistence

package
v0.1.2 Latest Latest
Warning

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

Go to latest
Published: Jun 14, 2026 License: MIT Imports: 7 Imported by: 0

Documentation

Overview

Package persistence wires the database connector, migrator, and unit of work shared by all Tupic services.

Index

Constants

This section is empty.

Variables

View Source
var Module = fx.Options(
	fx.Provide(connector.New, migrator.New, uow.New),
	fx.Invoke(registerLifecycle),
)

Module provides the connector (with *gorm.DB), migrator, and unit of work. It requires a persistence.Config in the graph, supplied by the service.

Functions

This section is empty.

Types

type Config

type Config = config.Config

Config selects the persistence driver and carries its settings.

type PostgresConfig

type PostgresConfig = config.PostgresConfig

PostgresConfig holds PostgreSQL connection settings.

Directories

Path Synopsis
Package config holds the persistence configuration types in a leaf package so the connector and migrator can import them without cycles.
Package config holds the persistence configuration types in a leaf package so the connector and migrator can import them without cycles.
Package connector opens and supervises the SQL connection pool and its GORM handle.
Package connector opens and supervises the SQL connection pool and its GORM handle.
Package migrator selects the migration driver from configuration.
Package migrator selects the migration driver from configuration.
contract
Package contract defines the migration driver contract.
Package contract defines the migration driver contract.
postgres
Package postgres implements the migration contract with golang-migrate.
Package postgres implements the migration contract with golang-migrate.
Package uow provides the UnitOfWork contract and its GORM transaction implementation, plus the context plumbing repositories use to join an ambient transaction.
Package uow provides the UnitOfWork contract and its GORM transaction implementation, plus the context plumbing repositories use to join an ambient transaction.

Jump to

Keyboard shortcuts

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