abode: github.com/mattevans/abode Index | Files

package abode

import "github.com/mattevans/abode"

Index

Package Files

abode.go component.go

Constants

const (
    AddressComponentTypeSubPremise      = "subpremise"
    AddressComponentTypePremise         = "premise"
    AddressComponentTypeStreetNumber    = "street_number"
    AddressComponentTypeRoute           = "route"
    AddressComponentTypeStreetAddress   = "street_address"
    AddressComponentTypeSubLocality     = "sublocality"
    AddressComponentTypeLocality        = "locality"
    AddressComponentTypeAdminAreaLevel1 = "administrative_area_level_1"
    AddressComponentTypeAdminAreaLevel2 = "administrative_area_level_2"
    AddressComponentTypeAdminAreaLevel3 = "administrative_area_level_3"
    AddressComponentTypeAdminAreaLevel4 = "administrative_area_level_4"
    AddressComponentTypeAdminAreaLevel5 = "administrative_area_level_5"
    AddressComponentTypeCountry         = "country"
    AddressComponentTypePostalCode      = "postal_code"
)

Define the different address component types.

type Address Uses

type Address struct {
    AddressLine1       *string  `json:"address_line1"`
    AddressLine2       *string  `json:"address_line2"`
    AddressCity        *string  `json:"address_city"`
    AddressState       *string  `json:"address_state"`
    AddressCountry     *string  `json:"address_country"`
    AddressCountryCode *string  `json:"address_country_code"`
    AddressZip         *string  `json:"address_zip"`
    AddressLat         *float64 `json:"address_lat"`
    AddressLng         *float64 `json:"address_lng"`
    FormattedAddress   *string  `json:"formatted_address"`
}

Address represents a response Address from abode.

func Explode Uses

func Explode(address string) (*Address, error)

Explode takes a one-line address string, explodes it and returns an *Address

Package abode imports 6 packages (graph). Updated 2020-10-28. Refresh now. Tools for package owners.