Documentation ¶
Overview ¶
Package mmdbinspect peeks at the contents of .mmdb files
Index ¶
- func AggregatedRecords(networks, databases []string, includeAliasedNetworks bool) (any, error)
- func OpenDB(path string) (*maxminddb.Reader, error)
- func RecordToString(record any) (string, error)
- func RecordsForNetwork(reader maxminddb.Reader, includeAliasedNetworks bool, maybeNetwork string) (any, error)
- type RecordForNetwork
- type RecordSet
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func AggregatedRecords ¶
AggregatedRecords returns the aggregated records for the networks and databases provided.
func RecordToString ¶
RecordToString converts an mmdb record into a JSON-formatted string.
func RecordsForNetwork ¶
func RecordsForNetwork(reader maxminddb.Reader, includeAliasedNetworks bool, maybeNetwork string) (any, error)
RecordsForNetwork fetches mmdb records inside a given network. If an address is provided without a netmask a /32 will be inferred for v4 addresses and a /128 will be inferred for v6 addresses.
Types ¶
type RecordForNetwork ¶
RecordForNetwork holds a network and the corresponding record.
Click to show internal directories.
Click to hide internal directories.