Documentation ¶
Index ¶
- type Area
- func (a *Area) GetCityesByProvinceID(provinceID uint64) []Area
- func (a *Area) GetCountiesByCityID(cityID uint64) []Area
- func (a *Area) GetIpRegion(ip string) (Area, error)
- func (a *Area) GetProvinces() []Area
- func (a *Area) GetUpperArea(currentID uint64) (Area, bool)
- func (a *Area) IsExistingCityById(cityId uint64) (Area, bool)
- func (a *Area) SearchCitiesByTitle(provinceId uint64, keyword string) []Area
- func (a *Area) SearchCityByTitle(provinceId uint64, keyword string) (Area, bool)
- func (a *Area) SearchProvinceByTitle(keyword string) (Area, bool)
- func (a *Area) 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 (*Area) GetCityesByProvinceID ¶
func (*Area) GetCountiesByCityID ¶
GetCountiesByCityID 获取指定市ID的县列表
func (*Area) GetProvinces ¶
func (*Area) GetUpperArea ¶
GetUpperArea 获取指定区域ID的上级区域数据
func (*Area) IsExistingCityById ¶
IsExistingCityById 根据市ID判断市是否存在
func (*Area) SearchCitiesByTitle ¶
SearchCitiesByTitle 根据市名称搜索指定ID的省下的市
func (*Area) SearchCityByTitle ¶
SearchCityByTitle 根据市名称搜索指定ID的省下的市
func (*Area) SearchProvinceByTitle ¶
SearchProvinceByTitle 根据省名称搜索地区ID
func (*Area) SearchProvincesByTitle ¶
Click to show internal directories.
Click to hide internal directories.