postgres
go
import "github.com/prescriptoo/prescriptoo-api/services/audit/internal/adapters/postgres"Package postgres supplies Audit persistence. It does not own business transactions.
Index
type Reader
Reader loads immutable event snapshots from PostgreSQL within an explicit history scope.
go
type Reader struct{ DB *pgxpool.Pool }func (Reader) GetEvent
go
func (r Reader) GetEvent(ctx context.Context, in p.EventQuery) (*p.Event, error)GetEvent returns an immutable event only within the requested history.
func (Reader) ListEvents
go
func (r Reader) ListEvents(ctx context.Context, in p.ListInput) (*p.Page, error)ListEvents returns scoped event summaries in stable descending order.
type Writer
Writer creates recorders bound to provider-owned PostgreSQL transactions.
go
type Writer struct{}func (Writer) InTransaction
go
func (Writer) InTransaction(tx pgx.Tx) p.RecorderInTransaction binds a recorder to an existing transaction without taking commit ownership.
Generated by gomarkdoc