github.com/lovung/GoCleanArchitecture@v0.0.0-20210302152432-50d91fd29f9f/app/internal/transaction/transaction.go (about) 1 package transaction 2 3 import ( 4 "context" 5 ) 6 7 // Manager represents operations needed for transaction support. 8 // It only needs to be implemented once for each database 9 type Manager interface { 10 TxnBegin(ctx context.Context) context.Context 11 TxnCommit(ctx context.Context) error 12 TxnRollback(ctx context.Context) error 13 GetTxn(ctx context.Context) interface{} 14 }