models

package
v1.0.0 Latest Latest
Warning

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

Go to latest
Published: Feb 16, 2019 License: Apache-2.0 Imports: 4 Imported by: 6 modules, 7 packages

The first number is the count of modules that contain a package that imports this one. The module count is a better indicator of popularity than the package count. A module with 100 importing packages is counted only once instead of 100 times, reflecting the fact that the choice to use the package was likely made only once, not 100 times.
A '?' means that the value hasn't been computed yet.

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type AdminCode5

type AdminCode5 struct {
	GeonameId  int    `csv:"geonameId" valid:"required"`
	AdminCode5 string `csv:"adm5code" valid:"required"`
}

type AdminDivision

type AdminDivision struct {
	Code      string `csv:"code" valid:"required"`
	Name      string `csv:"name"`
	AsciiName string `csv:"ascii name" valid:"required"`
	GeonameId int    `csv:"geonameId" valid:"required"`
}

type AdminSubdivision

type AdminSubdivision struct {
	Code      string `csv:"concatenated codes" valid:"required"`
	Name      string `csv:"name" valid:"required"`
	AsciiName string `csv:"asciiname" valid:"required"`
	GeonameId int    `csv:"geonameId" valid:"required"`
}

type AltNameFile

type AltNameFile DumpFile

type AlternateName

type AlternateName struct {
	Id           int    `csv:"alternateNameId" valid:"required"`
	GeonameId    int    `csv:"geonameid" valid:"required"`
	IsoLanguage  string `csv:"isolanguage"`
	Name         string `csv:"alternate name" valid:"required"`
	IsPreferred  bool   `csv:"isPreferredName,omitempty"`
	IsShort      bool   `csv:"isShortName,omitempty"`
	IsColloquial bool   `csv:"isColloquial,omitempty"`
	IsHistoric   bool   `csv:"isHistoric,omitempty"`
	From         Time   `csv:"from"`
	To           Time   `csv:"to"`
}

func (*AlternateName) IsAlpha2

func (a *AlternateName) IsAlpha2() bool

func (*AlternateName) IsAlpha3

func (a *AlternateName) IsAlpha3() bool

type AlternateNameDelete

type AlternateNameDelete struct {
	Id        int    `csv:"alternateNameId" valid:"required"`
	GeonameId int    `csv:"geonameId" valid:"required"`
	Name      string `csv:"name" valid:"required"`
	Comment   string `csv:"comment"`
}

type AlternateNameModification

type AlternateNameModification struct {
	Id           int    `csv:"alternateNameId" valid:"required"`
	GeonameId    int    `csv:"geonameid" valid:"required"`
	IsoLanguage  string `csv:"isolanguage"`
	Name         string `csv:"alternate name" valid:"required"`
	IsPreferred  bool   `csv:"isPreferredName,omitempty"`
	IsShort      bool   `csv:"isShortName,omitempty"`
	IsColloquial bool   `csv:"isColloquial,omitempty"`
	IsHistoric   bool   `csv:"isHistoric,omitempty"`
}

type Country

type Country struct {
	Iso2Code           string  `csv:"ISO" valid:"required"`
	Iso3Code           string  `csv:"ISO3" valid:"required"`
	IsoNumeric         string  `csv:"ISO-Numeric" valid:"required"`
	Fips               string  `csv:"fips"`
	Name               string  `csv:"Country" valid:"required"`
	Capital            string  `csv:"Capital"`
	Area               float64 `csv:"Area(in sq km)"`
	Population         int     `csv:"Population"`
	Continent          string  `csv:"Continent" valid:"required"`
	Tld                string  `csv:"tld"`
	CurrencyCode       string  `csv:"CurrencyCode"`
	CurrencyName       string  `csv:"CurrencyName"`
	Phone              string  `csv:"Phone"`
	PostalCodeFormat   string  `csv:"Postal Code Format"`
	PostalCodeRegex    string  `csv:"Postal Code Regex"`
	Languages          string  `csv:"Languages"`
	GeonameID          int     `csv:"geonameid" valid:"required"`
	Neighbours         string  `csv:"neighbours"`
	EquivalentFipsCode string  `csv:"EquivalentFipsCode"`
}

type DumpFile

type DumpFile string

func (DumpFile) IsArchive

func (d DumpFile) IsArchive() bool

func (DumpFile) String

func (d DumpFile) String() string

func (DumpFile) TextFilename

func (d DumpFile) TextFilename() string

func (DumpFile) WithLastDate

func (d DumpFile) WithLastDate() DumpFile

type FeatureCode

type FeatureCode struct {
	Code        string `csv:"code" valid:"required"`
	Name        string `csv:"name" valid:"required"`
	Description string `csv:"description"`
}

type FeatureCodeFile

type FeatureCodeFile DumpFile

type GeoNameFile

type GeoNameFile DumpFile

type Geoname

type Geoname struct {
	Id                    int     `csv:"geonameid" valid:"required"`
	Name                  string  `csv:"name" valid:"required"`
	AsciiName             string  `csv:"asciiname"`
	AlternateNames        string  `csv:"alternatenames"`
	Latitude              float64 `csv:"latitude"`
	Longitude             float64 `csv:"longitude"`
	Class                 string  `csv:"feature class"`
	Code                  string  `csv:"feature code"`
	CountryCode           string  `csv:"country code"`
	AlternateCountryCodes string  `csv:"cc2"`
	Admin1Code            string  `csv:"admin1 code`
	Admin2Code            string  `csv:"admin2 code"`
	Admin3Code            string  `csv:"admin3 code"`
	Admin4Code            string  `csv:"admin4 code"`
	Population            int     `csv:"population"`
	Elevation             int     `csv:"elevation,omitempty"`
	DigitalElevationModel int     `csv:"dem,omitempty"`
	Timezone              string  `csv:"timezone"`
	ModificationDate      Time    `csv:"modification date" valid:"required"`
}

type GeonameDelete

type GeonameDelete struct {
	Id      int    `csv:"geonameId" valid:"required"`
	Name    string `csv:"name" valid:"required"`
	Comment string `csv:"comment"`
}

type Hierarchy

type Hierarchy struct {
	Parent int    `csv:"parent" valid:"required"`
	Child  int    `csv:"child" valid:"required"`
	Type   string `csv:"type"`
}

type Language

type Language struct {
	Iso639_1 string `csv:"ISO 639-1"`
	Iso639_2 string `csv:"ISO 639-2"`
	Iso639_3 string `csv:"ISO 639-3" valid:"required"`
	Name     string `csv:"Language Name" valid:"required"`
}

type Shape

type Shape struct {
	GeonameId int    `csv:"geoNameId" valid:"required"`
	GeoJson   string `csv:"geoJSON" valid:"required"`
}

type Time

type Time struct {
	time.Time
}

func (Time) MarshalCSV

func (t Time) MarshalCSV() ([]byte, error)

func (*Time) UnmarshalCSV

func (t *Time) UnmarshalCSV(data []byte) error

type TimeZone

type TimeZone struct {
	Id          string  `csv:"TimeZoneId" valid:"required"`
	CountryCode string  `csv:"CountryCode" valid:"required"`
	GmtOffset   float64 `csv:"GMT offset 1. Jan 2019"`
	DstOffset   float64 `csv:"DST offset 1. Jul 2019"`
	RawOffset   float64 `csv:"RawOffset (independant of DST)"`
}

type UserTag

type UserTag struct {
	GeonameId int    `csv:"geonameId"`
	Name      string `csv:"tag" valid:"required"`
}

Jump to

Keyboard shortcuts

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