Versions in this module Expand all Collapse all v0 v0.5.4 May 10, 2015 Changes in this version + const DEFAULT_MYSQL_OPEN_STR + const DEFAULT_PGSQL_OPEN_STR + const DEFAULT_TEST_OPEN_STR + const EARTH_RADIUS + var GoogleAPIKey = "" + var MapquestAPIKey = "" + var OpenCageAPIKey = "" + func SetGoogleAPIKey(newAPIKey string) + func SetGoogleGeocodeURL(newGeocodeURL string) + func SetMapquestAPIKey(newAPIKey string) + func SetMapquestGeocodeURL(newGeocodeURL string) + func SetOpenCageAPIKey(newAPIKey string) + func SetOpenCageGeocodeURL(newGeocodeURL string) + type Geocoder interface + Geocode func(query string) (*Point, error) + ReverseGeocode func(p *Point) (string, error) + type GoogleGeocoder struct + HttpClient *http.Client + func (g *GoogleGeocoder) Geocode(address string) (*Point, error) + func (g *GoogleGeocoder) Request(params string) ([]byte, error) + func (g *GoogleGeocoder) ReverseGeocode(p *Point) (string, error) + type MapQuestGeocoder struct + func (g *MapQuestGeocoder) Geocode(address string) (*Point, error) + func (g *MapQuestGeocoder) Request(url string) ([]byte, error) + func (g *MapQuestGeocoder) ReverseGeocode(p *Point) (string, error) + type Mapper interface + PointsWithinRadius func(p *Point, radius int) bool + type OpenCageGeocoder struct + func (g *OpenCageGeocoder) Geocode(address string) (*Point, error) + func (g *OpenCageGeocoder) Request(url string) ([]byte, error) + func (g *OpenCageGeocoder) ReverseGeocode(p *Point) (string, error) + type Point struct + func NewPoint(lat float64, lng float64) *Point + func (p *Point) BearingTo(p2 *Point) float64 + func (p *Point) GreatCircleDistance(p2 *Point) float64 + func (p *Point) Lat() float64 + func (p *Point) Lng() float64 + func (p *Point) MarshalJSON() ([]byte, error) + func (p *Point) PointAtDistanceAndBearing(dist float64, bearing float64) *Point + func (p *Point) UnmarshalJSON(data []byte) error + type Polygon struct + func NewPolygon(points []*Point) *Polygon + func (p *Polygon) Add(point *Point) + func (p *Polygon) Contains(point *Point) bool + func (p *Polygon) IsClosed() bool + func (p *Polygon) Points() []*Point + type SQLConf struct + func GetSQLConf() (*SQLConf, error) + func GetSQLConfFromFile(filename string) (*SQLConf, error) + type SQLMapper struct + func HandleWithSQL() (*SQLMapper, error) + func NewSQLMapper(filename string, conn *sql.DB) (*SQLMapper, error) + func (s *SQLMapper) PointsWithinRadius(p *Point, radius float64) (*sql.Rows, error) + func (s *SQLMapper) SqlDbConn() *sql.DB