Documentation ¶
Index ¶
- Variables
- type Database
- func (db *Database) AddOrIgnoreSighting(name string, ip net.IP, serverID int64)
- func (db *Database) FindServerByDescription(desc string) []Server
- func (db *Database) GetServerID(ip string, port int, description, mod string) (serverID int64)
- func (db *Database) Lookup(nameOrIP string, sorting Sorting, last90DaysOnly bool, directLookupForced bool) FinishedLookup
- func (db *Database) Status() (status Status)
- func (db *Database) UpdateServerLastSeen(serverID int64)
- type FinishedLookup
- type Server
- type Sighting
- type Sorting
- type Status
Constants ¶
This section is empty.
Variables ¶
View Source
var ( ByLastSeen = Sorting{ Identifier: "last_seen", DisplayName: "last seen", // contains filtered or unexported fields } ByNameFrequency = Sorting{ Identifier: "name_frequency", DisplayName: "name frequency", // contains filtered or unexported fields } )
Functions ¶
This section is empty.
Types ¶
type Database ¶
func (*Database) AddOrIgnoreSighting ¶
Adds an entry in the sightings table or does nothing if adding fails due to database constraints.
func (*Database) FindServerByDescription ¶
func (*Database) GetServerID ¶
Returns the ID of the server specified by IP and port. In case no such server exists, it is inserted and the rowid of the new entry is returned. If a server with that IP and port already exists but the description or mod changed, the entry is updated in the database.
func (*Database) Lookup ¶
func (db *Database) Lookup(nameOrIP string, sorting Sorting, last90DaysOnly bool, directLookupForced bool) FinishedLookup
Looks up a name or an IP or IP range (IPs are assumed to be short forms of ranges).
func (*Database) UpdateServerLastSeen ¶
Updates the 'last seen' timestamp of a server.
type FinishedLookup ¶
Source Files ¶
Click to show internal directories.
Click to hide internal directories.