area

package module
v0.0.1 Latest Latest
Warning

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

Go to latest
Published: Jul 15, 2024 License: MIT Imports: 7 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 (*Area) GetCityesByProvinceID

func (a *Area) GetCityesByProvinceID(provinceID uint64) []Area

func (*Area) GetCountiesByCityID

func (a *Area) GetCountiesByCityID(cityID uint64) []Area

GetCountiesByCityID 获取指定市ID的县列表

func (*Area) GetIpRegion

func (a *Area) GetIpRegion(ip string) (Area, error)

func (*Area) GetProvinces

func (a *Area) GetProvinces() []Area

func (*Area) GetUpperArea

func (a *Area) GetUpperArea(currentID uint64) (Area, bool)

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

func (*Area) IsExistingCityById

func (a *Area) IsExistingCityById(cityId uint64) (Area, bool)

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

func (*Area) SearchCitiesByTitle

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

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

func (*Area) SearchCityByTitle

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

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

func (*Area) SearchProvinceByTitle

func (a *Area) SearchProvinceByTitle(keyword string) (Area, bool)

SearchProvinceByTitle 根据省名称搜索地区ID

func (*Area) SearchProvincesByTitle

func (a *Area) SearchProvincesByTitle(keyword string) []Area

Jump to

Keyboard shortcuts

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