Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type AllDistrictResponse ¶
type AmapClient ¶
type AmapClient struct { Location *Location // contains filtered or unexported fields }
func NewAmapClient ¶
func NewAmapClient(key, secret string) *AmapClient
type GeoResponse ¶
type IpResponse ¶
type Location ¶
type Location struct {
// contains filtered or unexported fields
}
func (*Location) ChinaDistricts ¶
func (*Location) IpLocation ¶
func (l *Location) IpLocation(ip string) (*IpResponse, error)
func (*Location) ReGeo ¶
func (l *Location) ReGeo(request *ReGeoRequest) (*ReGeoResponse, error)
type ReGeoRequest ¶
type ReGeoResponse ¶
type ReGeoResponse struct { Response ReGeoCode struct { FormattedAddress string `json:"formatted_address"` AddressComponent struct { City any `json:"city"` Country string `json:"country"` Province string `json:"province"` Citycode string `json:"citycode"` District string `json:"district"` Adcode string `json:"adcode"` Township string `json:"township"` Towncode string `json:"towncode"` } `json:"addressComponent"` } `json:"regeocode"` }
Click to show internal directories.
Click to hide internal directories.