area

package
v0.1.1 Latest Latest
Warning

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

Go to latest
Published: Nov 30, 2021 License: MIT Imports: 1 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type City

type City struct {
	County
	Counties []*County `json:"children"`
	// contains filtered or unexported fields
}

func (*City) GetCounties

func (c *City) GetCounties() []ICounty

type County

type County struct {
	Code string `json:"code"`
	Name string `json:"name"`
}

func (*County) GetCode

func (a *County) GetCode() string

func (*County) GetName

func (a *County) GetName() string

type ICity

type ICity interface {
	ICounty
	GetCounties() []ICounty
}

func GetCities

func GetCities(province string) []ICity

type ICounty

type ICounty interface {
	GetCode() string
	GetName() string
}

func GetCounties

func GetCounties(province, city string) []ICounty

type IProvince

type IProvince interface {
	ICounty
	GetCities() []ICity
}

func GetProvinces

func GetProvinces() []IProvince

type Province

type Province struct {
	County
	Cities []*City `json:"children"`
	// contains filtered or unexported fields
}

func (*Province) GetCities

func (p *Province) GetCities() []ICity

Jump to

Keyboard shortcuts

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