-
Notifications
You must be signed in to change notification settings - Fork 0
/
repository.go
56 lines (51 loc) · 1.47 KB
/
repository.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
package blacklist
// Repository for blacklist results in host collection
type Repository interface {
Upsert()
}
//update ....
type update struct {
selector interface{}
query interface{}
}
//uconnRes
type uconnRes struct {
Host string `bson:"_id"`
Connections int `bson:"bl_conn_count"`
UniqueConnections int `bson:"bl_in_count"`
TotalBytes int `bson:"bl_total_bytes"`
}
type hostRes struct {
IP string `bson:"ip"`
// blacklisted bool `bson:"blacklisted"`
// CID int `bson:"cid"`
// dat []interface{} `bson:"dat"`Host string `bson:"host"`
}
//IP ....
// type IP struct {
// Host string
// IsLocal bool
// CountSrc int
// CountDst int
// ConnectionCount int64
// TotalBytes int64
// MaxDuration float64
// TotalDuration float64
// TXTQueryCount int64
// UntrustedAppConnCount int64
// MaxTS int64
// MinTS int64
// ConnectedSrcHosts []string
// ConnectedDstHosts []string
// IP4 bool
// IP4Bin int64
// }
//
// //AnalysisView for blacklisted ips (for reporting)
// type AnalysisView struct {
// Host string `bson:"host"`
// Connections int `bson:"conn_count"`
// UniqueConnections int `bson:"uconn_count"`
// TotalBytes int `bson:"total_bytes"`
// ConnectedHosts []string `bson:"ips,omitempty"`
// }