Versions in this module Expand all Collapse all v1 v1.0.0 Jul 5, 2026 Changes in this version + func SourceNames() []string + type City = model.City + type Configuration struct + AirNowAPIKey string + GoogleGeocodingAPIKey string + MOENVAPIKey string + func LoadConfiguration(ctx context.Context) (Configuration, error) + type GeocodeCache interface + GetAddress func(ctx context.Context, lat float64, lng float64) (string, bool, error) + GetLocation func(ctx context.Context, address string) (Location, bool, error) + SetAddress func(ctx context.Context, lat float64, lng float64, address string) error + SetLocation func(ctx context.Context, address string, location Location) error + type Geocoder = model.Geocoder + type GoogleGeocoder struct + func NewGoogleGeocoder(apiKey string, client *http.Client) *GoogleGeocoder + func NewGoogleGeocoderWithCache(apiKey string, client *http.Client, cache GeocodeCache) *GoogleGeocoder + func (g *GoogleGeocoder) Address(ctx context.Context, lat float64, lng float64) (string, error) + func (g *GoogleGeocoder) LatLng(ctx context.Context, address string) (Location, error) + type JSONFileGeocodeCache struct + func NewJSONFileGeocodeCache(path string) (*JSONFileGeocodeCache, error) + func (c *JSONFileGeocodeCache) GetAddress(ctx context.Context, lat float64, lng float64) (string, bool, error) + func (c *JSONFileGeocodeCache) GetLocation(ctx context.Context, address string) (Location, bool, error) + func (c *JSONFileGeocodeCache) SetAddress(ctx context.Context, lat float64, lng float64, address string) error + func (c *JSONFileGeocodeCache) SetLocation(ctx context.Context, address string, location Location) error + type Location = model.Location + type MemoryGeocodeCache struct + func NewMemoryGeocodeCache() *MemoryGeocodeCache + func (c *MemoryGeocodeCache) GetAddress(ctx context.Context, lat float64, lng float64) (string, bool, error) + func (c *MemoryGeocodeCache) GetLocation(ctx context.Context, address string) (Location, bool, error) + func (c *MemoryGeocodeCache) SetAddress(ctx context.Context, lat float64, lng float64, address string) error + func (c *MemoryGeocodeCache) SetLocation(ctx context.Context, address string, location Location) error + type Options struct + Configuration Configuration + GeocodeCache GeocodeCache + Geocoder Geocoder + HTTPClient *http.Client + Logger *log.Logger + type Runner struct + func New(opts Options) *Runner + func (r *Runner) Scrape(ctx context.Context) ([]City, error) + func (r *Runner) ScrapeSource(ctx context.Context, name string) ([]City, error) + func (r *Runner) ScrapeSources(ctx context.Context, names []string) []SourceResult + type SourceResult struct + Cities []City + Err error + Name string