Documentation ¶
Index ¶
- type Area
- func GetCitiesByProvinceID(provinceID uint64) []Area
- func GetCountiesByCityID(cityID uint64) []Area
- func GetIpRegion(ip string) (Area, error)
- func GetProvinces() []Area
- func GetUpperArea(currentID uint64) (Area, bool)
- func IsExistingCityById(cityId uint64) (Area, bool)
- func SearchCitiesByTitle(provinceId uint64, keyword string) []Area
- func SearchCityByTitle(provinceId uint64, keyword string) (Area, bool)
- func SearchProvinceByTitle(keyword string) (Area, bool)
- func SearchProvincesByTitle(keyword string) []Area
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Area ¶
type Area struct { ID uint64 `json:"id"` Title string `json:"title"` Level uint8 `json:"level"` UpperID uint64 `json:"upperID"` }
func GetCitiesByProvinceID ¶ added in v0.0.4
func GetCountiesByCityID ¶ added in v0.0.2
GetCountiesByCityID 获取指定市ID的县列表
func GetIpRegion ¶ added in v0.0.2
func GetProvinces ¶ added in v0.0.2
func GetProvinces() []Area
func GetUpperArea ¶ added in v0.0.2
GetUpperArea 获取指定区域ID的上级区域数据
func IsExistingCityById ¶ added in v0.0.2
IsExistingCityById 根据市ID判断市是否存在
func SearchCitiesByTitle ¶ added in v0.0.2
SearchCitiesByTitle 根据市名称搜索指定ID的省下的市
func SearchCityByTitle ¶ added in v0.0.2
SearchCityByTitle 根据市名称搜索指定ID的省下的市
func SearchProvinceByTitle ¶ added in v0.0.2
SearchProvinceByTitle 根据省名称搜索地区ID
func SearchProvincesByTitle ¶ added in v0.0.2
Click to show internal directories.
Click to hide internal directories.