Documentation
¶
Index ¶
- type AddressAreaTree
- type AreaDB
- func (db *AreaDB) GetCity(cityCode string) (*City, error)
- func (db *AreaDB) GetCounty(countyCode string) (*County, error)
- func (db *AreaDB) GetProvince(provinceCode string) (*Province, error)
- func (db *AreaDB) ListAreaTree() ([]AddressAreaTree, error)
- func (db *AreaDB) ListCity(provinceCode string) ([]City, error)
- func (db *AreaDB) ListCounty(cityCODE string) ([]County, error)
- func (db *AreaDB) ListProvince() ([]Province, error)
- type AreaTx
- type City
- type County
- type Province
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type AddressAreaTree ¶
type AddressAreaTree struct { Value string `json:"value"` Text string `json:"text"` Children []AddressAreaTree `json:"children"` }
AddressAreaTree 树状地址区域结构体
type AreaDB ¶
func (*AreaDB) GetCounty ¶
GetCounty 查询区/县
func (*AreaDB) GetProvince ¶
GetProvince 查询省
func (*AreaDB) ListAreaTree ¶
func (db *AreaDB) ListAreaTree() ([]AddressAreaTree, error)
ListAreaTree 获取省市区树状结构
func (*AreaDB) ListCity ¶
ListCity 所有市
func (*AreaDB) ListCounty ¶
ListCounty 所有区/县
type City ¶
type City struct { CityCode string `json:"cityCode,omitemtpy" db:"city_code"` CityName string `json:"cityName,omitemtpy" db:"city_name"` ProvinceCode string `json:"provinceCode,omitemtpy" db:"province_code"` ProvinceName string `json:"provinceName,omitemtpy" db:"province_name"` }
City 市
type County ¶
type County struct { CountyCode string `json:"countyCode,omitemtpy" db:"county_code"` CountyName string `json:"countyName,omitemtpy" db:"county_name"` ProvinceCode string `json:"provinceCode,omitemtpy" db:"province_code"` ProvinceName string `json:"provinceName,omitemtpy" db:"province_name"` CityCode string `json:"cityCode,omitemtpy" db:"city_code"` CityName string `json:"cityName,omitemtpy" db:"city_name"` }
County 区/县
Click to show internal directories.
Click to hide internal directories.