This repository has been archived on 2022-08-17. You can view files and clone it, but cannot push or open issues or pull requests.
dex/repo/repo.go

14 lines
393 B
Go
Raw Normal View History

2015-08-18 05:57:27 +05:30
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)