This repository has been archived by the owner on Jan 23, 2022. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 0
/
doc.go
71 lines (67 loc) · 1.58 KB
/
doc.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
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
/*
Package dor is a domain rank data collection library and fast HTTP service
which shows a specified domain's rank from the following providers:
* Alexa
* Majestic
* Umbrella OpenDNS
* Open PageRank
* Tranco
* Quantcast
Can be used as a base for a domain categorization, network filters or
suspicious domain detection. Data is updated automatically by dor-insert once a
day by default.
See service/dor-http/dor.go for an example of the Dor HTTP service and
cmd/dor-insert/dor-insert.go for the data insertion script.
Client request example:
curl 127.0.0.1:8080/rank/github.com
Server response:
{
"data": "github.com",
"ranks": [
{
"domain": "github.com",
"rank": 33,
"date": "2018-01-11T18:01:27.251103268Z",
"source": "majestic",
"raw": "29,23,github.com,com,179825,518189,github.com,com,29,23,179994,518726"
},
{
"domain": "github.com",
"rank": 72,
"date": "2018-01-11T18:04:26.267833256Z",
"source": "alexa",
"raw": ""
},
{
"domain": "github.com",
"rank": 2367,
"last_update": "2018-01-11T18:06:50.866600102Z",
"source": "umbrella",
"raw": ""
},
{
"domain": "github.com",
"rank": 115,
"last_update": "2018-03-27T17:01:13.535Z",
"source": "pagerank",
"raw": ""
},
{
"domain": "github.com",
"rank": 68,
"last_update": "2018-03-27T17:01:13.535Z",
"source": "tranco",
"raw": ""
},
{
"domain": "github.com",
"rank": 114,
"date": "2019-05-04T00:00:00Z",
"source": "quantcast",
"raw": ""
}
],
"timestamp": "2018-01-11T18:07:09.186271429Z"
}
*/
package dor