initial commit 2
This commit is contained in:
28
application/third/npd/npd.go
Normal file
28
application/third/npd/npd.go
Normal file
@@ -0,0 +1,28 @@
|
||||
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
|
||||
}
|
||||
Reference in New Issue
Block a user