29 lines
426 B
Go
29 lines
426 B
Go
package npd
|
|
|
|
import (
|
|
"sync"
|
|
|
|
"bitbucket.org/nemt/nemt-portal-api/infra/config"
|
|
)
|
|
|
|
var (
|
|
instance *Service
|
|
once sync.Once
|
|
)
|
|
|
|
// Service holds the domain service repositories
|
|
type Service struct {
|
|
Provider *providerService
|
|
}
|
|
|
|
// New returns a new domain Service instance
|
|
func New(cfg *config.Config) *Service {
|
|
once.Do(func() {
|
|
instance = &Service{
|
|
Provider: newProviderService(cfg),
|
|
}
|
|
})
|
|
|
|
return instance
|
|
}
|