Files
ipinfo/internal/db/types.go
T
2026-02-03 02:23:23 +01:00

25 lines
633 B
Go

package db
import "errors"
// Constants for database names and paths
const (
CityDBName = "dbip-city-lite"
ASNDBName = "dbip-asn-lite"
DBExtension = ".mmdb"
CityDBPath = CityDBName + DBExtension
ASNDBPath = ASNDBName + DBExtension
)
// Error messages
var (
ErrDatabaseOpen = errors.New("failed to open database")
ErrDownloadFailed = errors.New("failed to download database")
)
// ASNRecord represents a record in the ASN database
type ASNRecord struct {
AutonomousSystemNumber uint `maxminddb:"autonomous_system_number"`
AutonomousSystemOrganization string `maxminddb:"autonomous_system_organization"`
}