Versions in this module Expand all Collapse all v0 v0.1.0 Jul 21, 2026 Changes in this version + var ErrEmptyAddress = errors.New("nominatim: empty address") + var ErrInvalidCoordinate = errors.New("nominatim: invalid coordinate") + var ErrInvalidJSON = errors.New("nominatim: invalid JSON response") + var ErrInvalidLimit = errors.New("nominatim: result limit must be greater than zero") + var ErrMissingUserAgent = errors.New("nominatim: user agent is required") + var ErrNoResults = errors.New("nominatim: no results") + type Client struct + func NewClient(options ...Option) *Client + func (c *Client) Geocode(ctx context.Context, address string) (Location, error) + func (c *Client) Search(ctx context.Context, address string, options ...SearchOption) ([]Location, error) + type HTTPError struct + Body string + Status string + StatusCode int + func (e *HTTPError) Error() string + type InvalidCoordinateError struct + Field string + Value string + func (e *InvalidCoordinateError) Error() string + func (e *InvalidCoordinateError) Unwrap() error + type Location struct + DisplayName string + Importance float64 + Latitude float64 + Longitude float64 + Type string + type Option func(*Client) + func WithBaseURL(baseURL string) Option + func WithContactEmail(email string) Option + func WithCountryCodes(countryCodes ...string) Option + func WithHTTPClient(client *http.Client) Option + func WithPreferredLanguage(language string) Option + func WithResultLimit(limit int) Option + func WithUserAgent(userAgent string) Option + type SearchOption func(*searchConfig) + func WithSearchCountryCodes(countryCodes ...string) SearchOption + func WithSearchLimit(limit int) SearchOption + func WithSearchPreferredLanguage(language string) SearchOption