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

@@ -28,7 +28,8 @@ type Conn struct {
notification *notificationRepo
profile *profileRepo
organization *organizationRepo
zipcodes *zipcodeRepo
zipcodes *zipcodeRepo
plan *planRepo
}
// Begin starts a transaction
@@ -81,10 +82,14 @@ func (c *Conn) Organization() contract.OrganizationRepo {
return c.organization
}
func (c *Conn) Zipcodes() contract.ZipcodeRepo{
func (c *Conn) Zipcodes() contract.ZipcodeRepo {
return c.zipcodes
}
func (c *Conn) Plans() contract.PlanRepo {
return c.plan
}
// Instance returns an instance of a DataManager
func Instance(cfg *config.Config) (contract.DataManager, error) {
once.Do(func() {
@@ -117,6 +122,7 @@ func Instance(cfg *config.Config) (contract.DataManager, error) {
instance.profile = newProfileRepo(db)
instance.organization = newOrganizationRepo(db)
instance.zipcodes = newZipcodeRepo(db)
instance.plan = newPlanRepo(db)
})
return instance, connErr