Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type UnitOfWork ¶
type UnitOfWork interface {
Do(context.Context, UnitOfWorkBlock) error
}
func New ¶
func New(db *bun.DB) UnitOfWork
type UnitOfWorkBlock ¶
type UnitOfWorkBlock func(UnitOfWorkStore) error
type UnitOfWorkStore ¶
type UnitOfWorkStore interface { AuditRecords() datastore.AuditRecord IdempotencyKeys() datastore.IdempotencyKey Rides() datastore.Ride StagedJobs() datastore.StagedJob Users() datastore.User }
UnitOfWorkStore provides access to datastores that can be used inside an Unit-of-Work. All data changes done through them will be executed atomically (inside a DB transaction).
Click to show internal directories.
Click to hide internal directories.