dex/repo/repo.go
2016-02-12 13:19:05 -08:00

14 lines
393 B
Go

package repo
// Transaction is an abstraction of transactions typically found in database systems.
// One of Commit() or Rollback() must be called on each transaction.
type Transaction interface {
// Commit will persist the changes in the transaction.
Commit() error
// Rollback undoes the changes in a transaction
Rollback() error
}
type TransactionFactory func() (Transaction, error)