area

package module
v0.0.6 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Sep 2, 2024 License: MIT Imports: 6 Imported by: 0

Documentation

Index

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 GetCitiesByProvinceID(provinceID uint64) []Area

func GetCountiesByCityID added in v0.0.2

func GetCountiesByCityID(cityID uint64) []Area

GetCountiesByCityID 获取指定市ID的县列表

func GetIpRegion added in v0.0.2

func GetIpRegion(ip string) (Area, error)

func GetProvinces added in v0.0.2

func GetProvinces() []Area

func GetUpperArea added in v0.0.2

func GetUpperArea(currentID uint64) (Area, bool)

GetUpperArea 获取指定区域ID的上级区域数据

func IsExistingCityById added in v0.0.2

func IsExistingCityById(cityId uint64) (Area, bool)

IsExistingCityById 根据市ID判断市是否存在

func SearchCitiesByTitle added in v0.0.2

func SearchCitiesByTitle(provinceId uint64, keyword string) []Area

SearchCitiesByTitle 根据市名称搜索指定ID的省下的市

func SearchCityByTitle added in v0.0.2

func SearchCityByTitle(provinceId uint64, keyword string) (Area, bool)

SearchCityByTitle 根据市名称搜索指定ID的省下的市

func SearchProvinceByTitle added in v0.0.2

func SearchProvinceByTitle(keyword string) (Area, bool)

SearchProvinceByTitle 根据省名称搜索地区ID

func SearchProvincesByTitle added in v0.0.2

func SearchProvincesByTitle(keyword string) []Area

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL