-
Notifications
You must be signed in to change notification settings - Fork 0
/
main.go
33 lines (28 loc) · 791 Bytes
/
main.go
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
package main
import (
"github.com/edwinavalos/common/logger"
"github.com/edwinavalos/dns-verifier/config"
"github.com/edwinavalos/dns-verifier/server"
"github.com/edwinavalos/dns-verifier/service/cert_service"
"github.com/edwinavalos/dns-verifier/service/domain_service"
"github.com/edwinavalos/dns-verifier/storage"
"math/rand"
"time"
)
func main() {
logger.New()
rand.Seed(time.Now().Unix())
cfg := config.NewConfig()
datastore, err := storage.NewDataStore(cfg)
if err != nil {
panic(err)
}
filestore, err := storage.NewFileStore(cfg)
if err != nil {
panic(err)
}
domainService := domain_service.New(cfg, datastore)
certService := cert_service.New(cfg, filestore, domainService)
srv := server.NewServer(cfg, domainService, certService)
srv.ListenAndServe()
}