package
1.9.0
Repository: https://github.com/m-lab/etl.git
Documentation: pkg.go.dev

# Functions

AddGeoAnnotations takes a slice of string ip addresses, a timestamp, and a slice of pointers to corresponding GeolocationIP structs.
BatchQueryAnnotationService takes a url to POST the request to and a slice of RequestDatas to be sent in the body in a JSON format.
FetchAllAnnotations takes a slice of strings containing ip addresses, a timestamp.
GetAndInsertGeolocationIPStruct takes a NON-NIL pointer to a pre-allocated GeolocationIP struct, an IP address, and a timestamp.
GetBatchGeoData combines the functionality of BatchQueryAnnotationService and BatchParseJSONGeoDataResponse to query the annotator service and return the corresponding map of ip-timestamp strings to GeoData structs, or a nil map if it encounters any error and cannot get the data for any reason TODO - dedup common code in GetGeoData Deprecated: Use Annotatable interface and parser.Base instead.
GetGeoData combines the functionality of QueryAnnotationService and ParseJSONGeoDataResponse to query the annotator service and return the corresponding GeoData if it can, or a nil pointer if it encounters any error and cannot get the data for any reason.
ParseJSONGeoDataResponse takes a byte slice containing the test of the JSON from the annotator service and parses it into a GeoData struct, for easy manipulation.
QueryAnnotationService will connect to the annotation service and copy the body of a valid response to a byte slice and return it to a user, returning an error if any occurs.

# Variables

AnnotatorURL holds the https address of the annotator.
BaseURL provides the base URL for single annotation requests.
BatchURL provides the base URL for batch annotation requests.