initial commit 2

This commit is contained in:
Senad Uka
2018-04-25 13:16:36 +02:00
parent c1520d169c
commit 99c10b75fb
167 changed files with 25057 additions and 0 deletions

View File

@@ -0,0 +1,31 @@
package notificationservice
import (
"sync"
"bitbucket.org/nemt/nemt-portal-api/application/entitymapping"
"bitbucket.org/nemt/nemt-portal-api/domain/contract"
"bitbucket.org/nemt/nemt-portal-api/domain/service"
"bitbucket.org/nemt/nemt-portal-api/infra/config"
)
var (
instance *Service
once sync.Once
)
// Service holds the domain service repositories
type Service struct {
Twilio *twilioService
}
// New returns a new domain Service instance
func New(svc *service.Service, mapper *entitymapping.Mapper, cfg *config.Config, cache contract.CacheManager) *Service {
once.Do(func() {
instance = &Service{
Twilio: newTwilioService(svc, mapper, cfg, cache),
}
})
return instance
}