Documentation
¶
Index ¶
- Constants
- type DB
- func (db *DB) GetGeolocation(ip string) (*Geolocation, error)
- func (db *DB) GetReverseLookup(ip string) (*ReverseLookup, error)
- func (db *DB) GetVerdict(ip string) (*Verdict, error)
- func (db *DB) IncAccepts(ip string) error
- func (db *DB) IncRejects(ip string) error
- func (db *DB) SaveGeolocation(ip string, geo *Geolocation) error
- func (db *DB) SaveReverseLookup(ip string, rl *ReverseLookup) error
- type Geolocation
- type ReverseLookup
- type Verdict
Constants ¶
View Source
const ( VerdictPrefix string = "ip-verdict-" VerdictNone = iota VerdictAccept VerdictReject )
View Source
const GeolocationPrefix string = "ip-geo-"
View Source
const ReverseLookupPrefix string = "ip-lookup-"
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type DB ¶
func (*DB) GetGeolocation ¶
func (db *DB) GetGeolocation(ip string) (*Geolocation, error)
func (*DB) GetReverseLookup ¶
func (db *DB) GetReverseLookup(ip string) (*ReverseLookup, error)
func (*DB) IncAccepts ¶
func (*DB) IncRejects ¶
func (*DB) SaveGeolocation ¶
func (db *DB) SaveGeolocation(ip string, geo *Geolocation) error
func (*DB) SaveReverseLookup ¶
func (db *DB) SaveReverseLookup(ip string, rl *ReverseLookup) error
type Geolocation ¶
type ReverseLookup ¶
type ReverseLookup struct {
Domains []string
}
Click to show internal directories.
Click to hide internal directories.