uow

package
v2.3.2 Latest Latest
Warning

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

Go to latest
Published: May 25, 2022 License: MIT Imports: 4 Imported by: 0

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).

Jump to

Keyboard shortcuts

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