Skip to content

Commit

Permalink
Added geoloc
Browse files Browse the repository at this point in the history
  • Loading branch information
gboddin committed Apr 19, 2021
1 parent a96fe4c commit 62b8e3f
Show file tree
Hide file tree
Showing 2 changed files with 42 additions and 1 deletion.
24 changes: 24 additions & 0 deletions l9event.go
Original file line number Diff line number Diff line change
Expand Up @@ -30,6 +30,8 @@ type L9Event struct {
Service L9ServiceEvent `json:"service"`
Leak L9LeakEvent `json:"leak"`
Tags []string `json:"tags"`
GeoIp GeoLocation `json:"geoip"`
Network Network `json:"network"`
}

type L9HttpEvent struct {
Expand Down Expand Up @@ -112,3 +114,25 @@ type Certificate struct {
NotAfter time.Time `json:"not_after"`
Valid bool `json:"valid"`
}


type GeoLocation struct {
ContinentName string `json:"continent_name"`
RegionISOCode string `json:"region_iso_code"`
CityName string `json:"city_name"`
CountryISOCode string `json:"country_iso_code"`
CountryName string `json:"country_name"`
RegionName string `json:"region_name"`
GeoPoint GeoPoint `json:"location"`
}

type GeoPoint struct {
Latitude float64 `json:"lat"`
Longitude float64 `json:"lon"`
}

type Network struct {
OrganisationName string `json:"organization_name"`
ASN int `json:"asn"`
NetworkCIDR string `json:"network"`
}
19 changes: 18 additions & 1 deletion l9event.json
Original file line number Diff line number Diff line change
Expand Up @@ -100,5 +100,22 @@
},
"tags": [
"plc"
]
],
"geoip": {
"continent_name": "",
"region_iso_code": "",
"city_name": "",
"country_iso_code": "",
"country_name": "",
"region_name": "",
"location": {
"lat": 0,
"lon": 0
}
},
"network": {
"organization_name": "",
"asn": 0,
"network": ""
}
}

0 comments on commit 62b8e3f

Please sign in to comment.