nominatim

package
v0.0.7 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Jul 3, 2024 License: MIT Imports: 8 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Client

type Client interface {
	// Search searches for a location with the given query.
	Search(ctx context.Context, query string) ([]*Location, error)
	// Name provides a client name used to report health check issues.
	Name() string
	// Ping checks the client is healthy.
	Ping(ctx context.Context) error
}

Client is a client for the Nominatim API.

func New

func New(httpClient *http.Client) Client

New creates a new Nominatim API client with the given base URL and HTTP client.

type Location

type Location struct {
	// Lat is the latitude of the location.
	Lat string `json:"lat"`
	// Long is the longitude of the location.
	Long string `json:"lon"`
	// DisplayName is the display name of the location.
	DisplayName string `json:"display_name"`
}

Location represents a geographical location.

Directories

Path Synopsis

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL