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
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. |
Click to show internal directories.
Click to hide internal directories.