-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathmodels.go
49 lines (43 loc) · 1.18 KB
/
models.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
package gocrawlhq
import (
"net"
"net/http"
"net/url"
)
type Client struct {
Key string
Secret string
Project string
HQAddress string
Identifier string
URLsEndpoint *url.URL
SeencheckEndpoint *url.URL
ResetEndpoint *url.URL
ProjectEndpoint *url.URL
HTTPClient *http.Client
WebsocketConn *net.Conn
}
type URL struct {
ID string `json:"id" db:"id"`
Value string `json:"value" db:"value"`
Via string `json:"via,omitempty" db:"via"`
Host string `json:"host,omitempty" db:"host"`
Path string `json:"path,omitempty" db:"path"`
Type string `json:"type,omitempty" db:"type"`
Crawler string `json:"crawler,omitempty" db:"crawler"`
Status string `json:"status" db:"status"`
LiftOff int64 `json:"lift_off" db:"lift_off"`
Timestamp int64 `json:"timestamp" db:"timestamp"`
}
type GetResponse struct {
Project string `json:"project"`
URLs []URL `json:"urls"`
}
type AddPayload struct {
URLs []URL `json:"urls"`
BypassSeencheck bool `json:"bypassSeencheck"`
}
type DeletePayload struct {
LocalCrawls int `json:"localCrawls"`
URLs []URL `json:"urls"`
}