forked from xray-web/web-check-api
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathchecks.go
38 lines (34 loc) · 855 Bytes
/
checks.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
34
35
36
37
38
package checks
import (
"net/http"
"time"
"github.com/xray-web/web-check-api/checks/clients/ip"
"github.com/xray-web/web-check-api/checks/store/legacyrank"
)
type Checks struct {
BlockList *BlockList
Carbon *Carbon
Headers *Headers
IpAddress *NetIp
LegacyRank *LegacyRank
LinkedPages *LinkedPages
Rank *Rank
SocialTags *SocialTags
Tls *Tls
}
func NewChecks() *Checks {
client := &http.Client{
Timeout: 5 * time.Second,
}
return &Checks{
BlockList: NewBlockList(&ip.NetDNSLookup{}),
Carbon: NewCarbon(client),
Headers: NewHeaders(client),
IpAddress: NewNetIp(&ip.NetLookup{}),
LegacyRank: NewLegacyRank(legacyrank.NewInMemoryStore()),
LinkedPages: NewLinkedPages(client),
Rank: NewRank(client),
SocialTags: NewSocialTags(client),
Tls: NewTls(client),
}
}