persistence

package
v0.2.0 Latest Latest
Warning

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

Go to latest
Published: May 19, 2026 License: MIT Imports: 1 Imported by: 0

Documentation

Overview

Package persistence holds the database-agnostic primitives — Transactioner for atomic write paths, repository interfaces, and shared error mapping — that the concrete adapters (gormdb, sqldb, redisdb) implement.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Transactioner

type Transactioner interface {
	// Exec executes a function within a transaction
	// If the function returns an error, the transaction is rolled back
	// Otherwise, the transaction is committed
	// Supports nested transactions by reusing existing transaction in context
	Exec(ctx context.Context, fn TxFunc) error
}

Transactioner is an interface for managing transactions

type TxFunc

type TxFunc func(ctx context.Context) error

TxFunc is a function that runs within a transaction

Directories

Path Synopsis
Package gormdb provides the database-agnostic core for GORM integration.
Package gormdb provides the database-agnostic core for GORM integration.
gormpg
Package gormpg provides the PostgreSQL-specific implementation for the gormdb client.
Package gormpg provides the PostgreSQL-specific implementation for the gormdb client.
Package postgres holds Postgres-specific error translation + small connection helpers (SQLSTATE → apierrors, advisory-lock primitives) shared by the gormdb and sqldb adapters.
Package postgres holds Postgres-specific error translation + small connection helpers (SQLSTATE → apierrors, advisory-lock primitives) shared by the gormdb and sqldb adapters.
Package redisdb provides a Redis client wrapper with connection pooling, configuration management, and FX integration.
Package redisdb provides a Redis client wrapper with connection pooling, configuration management, and FX integration.
redistest
Package redistest contains helpers for the tests
Package redistest contains helpers for the tests
Package sqldb provides the core foundation for SQL database interactions within the mmo-game architecture.
Package sqldb provides the core foundation for SQL database interactions within the mmo-game architecture.

Jump to

Keyboard shortcuts

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