Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type BlockMessage ¶
type Blocker ¶
type Blocker interface { BlockASN(msg BlockMessage) error BlockIP(msg IPBlockMessage) error BlockNetwork(msg NetworkBlockMessage) error BlockedNetworks() []NetworkBlockMessage BlockedASNs() []BlockMessage BlockedIPs() []IPBlockMessage IPNamespace(ip []byte) []byte ASNNamespace(asn int) []byte CIDRNamespace(cidr string) []byte IsBlocked(ip net.IP, asn *asndb.ASN) bool IsBlockedByASN(asn *asndb.ASN) (blocked bool, reason string) CheckBlocked() }
type IPBlockMessage ¶
type IPBlockMessage struct { BlockMessage //`json:"blockmessage"` IP net.IP `json:"ip"` Hostname string `json:"hostname"` }
type NetworkBlockMessage ¶
type NetworkBlockMessage struct { BlockMessage //`json:"blockmessage"` Network *net.IPNet `json:"network"` }
type NetworkStats ¶
type Request ¶
type Request struct { URL string `json:"url"` Host string `json:"host"` UserAgent string `json:"useragent"` Source string `json:"source"` Method string `json:"method"` Seq int `json:"seq"` Timestamp int64 `json:"timestamp"` Time time.Time `json:"time"` ASN *asndb.ASN `json:"asn"` IsApp bool `json:"is_app"` }
Request represents an HTTP request
Click to show internal directories.
Click to hide internal directories.