Upstream sync

This commit is contained in:
Senad Uka
2018-05-25 09:12:42 +02:00
parent 6e903b4d57
commit 94229831e0
38 changed files with 1281 additions and 156 deletions

View File

@@ -16,7 +16,8 @@ type transaction struct {
notification *notificationRepo
profile *profileRepo
organization *organizationRepo
zipcodes *zipcodeRepo
zipcodes *zipcodeRepo
plan *planRepo
}
func newTransaction(tx *sql.Tx) *transaction {
@@ -28,6 +29,11 @@ func newTransaction(tx *sql.Tx) *transaction {
t.rides = newRideRepo(tx)
t.visits = newVisitRepo(tx)
t.provider = newProviderRepo(tx)
t.notification = newNotificationRepo(tx)
t.profile = newProfileRepo(tx)
t.organization = newOrganizationRepo(tx)
t.zipcodes = newZipcodeRepo(tx)
t.plan = newPlanRepo(tx)
return t
}
@@ -67,10 +73,14 @@ func (t transaction) Organization() contract.OrganizationRepo {
return t.organization
}
func (t transaction) Zipcodes() contract.ZipcodeRepo{
func (t transaction) Zipcodes() contract.ZipcodeRepo {
return t.zipcodes
}
func (t transaction) Plans() contract.PlanRepo {
return t.plan
}
func (t *transaction) Commit() error {
err := t.tx.Commit()