Documentation ¶
Index ¶
- func SortCitiesByName(c []*City, desc bool)
- func SortContinentsByCode(c []*Continent, desc bool)
- func SortContinentsByName(c []*Continent, desc bool)
- func SortCountriesByCode(c []*Country, desc bool)
- func SortCountriesByName(c []*Country, desc bool)
- func SortRegionsByCode(r []*Region, desc bool)
- func SortRegionsByName(r []*Region, desc bool)
- type City
- type CityView
- type Continent
- type Country
- type Region
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func SortCitiesByName ¶
SortCitiesByName sorts function. Sort cities by name
func SortContinentsByCode ¶
SortContinentsByCode sorts containers by code
func SortContinentsByName ¶
SortContinentsByName sorts containers by name
func SortCountriesByCode ¶
SortCountriesByCode sorts countries slicer by code
func SortCountriesByName ¶
SortCountriesByName sorts countries slice by name
func SortRegionsByCode ¶
SortRegionsByCode sorts regions by code
func SortRegionsByName ¶
SortRegionsByName sorts regions by name
Types ¶
type City ¶
type City struct { ID int `json:"id"` CountryID int `storm:"index" json:"-"` CountryCode string `storm:"index" json:"-"` RegionID int `json:"-"` RegionCode string `json:"-"` IDKey string `storm:"index" json:"-"` CodeKey string `storm:"index" json:"-"` Name string `json:"name"` }
City data structure
type CityView ¶
type CityView struct { ID int `json:"id"` CountryID int `json:"countryId"` CountryCode string `json:"countryCode"` CountryName string `json:"countryName"` RegionID int `json:"regionId"` RegionCode string `json:"regionCode"` RegionName string `json:"regionName"` Name string `json:"name"` }
CityView is city view data structure (full city data)
type Continent ¶
type Continent struct { ID int `json:"id"` Code string `storm:"unique" json:"code"` Name string `storm:"unique" json:"name"` }
Continent data structure
Click to show internal directories.
Click to hide internal directories.