From aa8156badc73720b534f273246fe721a1e3485e2 Mon Sep 17 00:00:00 2001 From: Daniel Date: Mon, 8 Nov 2021 11:19:01 +0100 Subject: [PATCH] Add coordinates to intel.Entity --- intel/entity.go | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/intel/entity.go b/intel/entity.go index 2e93597b..3c01bf46 100644 --- a/intel/entity.go +++ b/intel/entity.go @@ -65,6 +65,9 @@ type Entity struct { // located in. Country string + // Coordinates holds the approximate coordinates of the IP address. + Coordinates *geoip.Coordinates + // ASN holds the autonomous system number of the IP. ASN uint @@ -247,6 +250,7 @@ func (e *Entity) getLocation(ctx context.Context) { } e.location = loc e.Country = loc.Country.ISOCode + e.Coordinates = &loc.Coordinates e.ASN = loc.AutonomousSystemNumber e.ASOrg = loc.AutonomousSystemOrganization })