Documentation ¶
Index ¶
- Variables
- type CDATA
- type CcCurrencies
- type Config
- type ConfigLanguages
- type Countries
- type CountriesXml
- type Country
- type CountryXml
- type Currencies
- type CurrenciesXml
- type Currency
- type CurrencyXml
- type DialCodes
- type Enquiries
- type Flags
- type FlagsXml
- type GeoCode
- type GeoCodeReference
- type GeoCodeResult
- type GeoSet
- type GeoSetXml
- type GeoSets
- type GeoSetsXml
- type IntervalStruct
- type LangStructXml
- type Mottos
- type MottosXml
- type OrderByStruct
- type OtherAppsIds
- type Settings
- type SettingsType
- type TransCountries
- type TransCountry
- type TransGeneric
- type TransGenericItem
Constants ¶
This section is empty.
Variables ¶
View Source
var ConverterMapXml = map[string]func(interface{}) interface{}{ "country": func(data interface{}) interface{} { country := data.(*Country) return CountryToXML(*country) }, "currency": func(data interface{}) interface{} { currency := data.(*Currency) return CurrencyToXML(*currency) }, "geoSet": func(data interface{}) interface{} { geoSet := data.(*GeoSet) return GeoSetToXML(*geoSet) }, }
View Source
var CountrySettings = SettingsType{ PrimaryKey: "Alpha2", Indexes: []string{ "Name", "FullName", "Alpha2", "Alpha3", "UnM49", }, Public: []string{ "Name", "FullName", "OfficialName", "Alpha2", "Alpha3", "UnM49", "Flags", "Flags.Svg", "Dependency", "Mottos", "Mottos.Official", "Currencies", "Currencies.LegalTenders", "Currencies.WidelyAccepted", "DialCodes", "DialCodes.Main", "DialCodes.Exceptions", "CcTld", "TimeZones", "Languages", "Locales", "OtherAppsIds", "OtherAppsIds.GeoNamesOrg", }, }
View Source
var CurrencySettings = SettingsType{ PrimaryKey: "IsoAlpha", Indexes: []string{ "Name", "IsoAlpha", "IsoNumber", }, Public: []string{ "Name", "IsoAlpha", "IsoNumber", "Symbol", "Decimal", }, }
View Source
var GeoSetSettings = SettingsType{ PrimaryKey: "InternalCode", Indexes: []string{ "Name", "InternalCode", }, Public: []string{ "Name", "InternalCode", "UnM49", "Tags", "CountryCodes", }, }
View Source
var SettingsMap = map[string]interface{}{ "countries": CountrySettings, "geoSets": GeoSetSettings, "currencies": CurrencySettings, }
View Source
var SingleItemName = map[string]string{
"countries": "country",
"geoSets": "geoSet",
"currencies": "currency",
}
View Source
var TransSettingsMap = map[string]interface{}{ "countries": TransCountry{}, "geoSets": TransGenericItem{}, "currencies": TransGenericItem{}, }
View Source
var TypeMap = map[string]func() interface{}{ "countries": func() interface{} { return &Countries{} }, "country": func() interface{} { return &Country{} }, "currencies": func() interface{} { return &Currencies{} }, "currency": func() interface{} { return &Currency{} }, "geoSets": func() interface{} { return &GeoSets{} }, "geoSet": func() interface{} { return &GeoSet{} }, }
View Source
var TypeMapXml = map[string]func() interface{}{ "countries": func() interface{} { return &CountriesXml{} }, "currencies": func() interface{} { return &CurrenciesXml{} }, "geoSets": func() interface{} { return &GeoSetsXml{} }, }
Functions ¶
This section is empty.
Types ¶
type CcCurrencies ¶
type ConfigLanguages ¶
type CountriesXml ¶
type CountriesXml struct { XMLName xml.Name `xml:"countries"` Countries []CountryXml `xml:"country"` }
type Country ¶
type Country struct { Name string `json:"name" yaml:"name" xml:"name"` FullName string `json:"fullName" yaml:"fullName" xml:"fullName"` OfficialName map[string]string `json:"officialName" yaml:"officialName" xml:"officialName>name"` Alpha2 string `json:"alpha2" yaml:"alpha2" xml:"alpha2"` Alpha3 string `json:"alpha3" yaml:"alpha3" xml:"alpha3"` UnM49 string `json:"unM49" yaml:"unM49" xml:"unM49"` Flags Flags `json:"flags" yaml:"flags" xml:"flags"` Dependency *string `json:"dependency" yaml:"dependency" xml:"dependency"` Mottos Mottos `json:"mottos" yaml:"mottos" xml:"mottos"` Currencies CcCurrencies `json:"currencies" yaml:"currencies" xml:"currencies"` DialCodes DialCodes `json:"dialCodes" yaml:"dialCodes" xml:"dialCodes"` CcTld *string `json:"ccTld" yaml:"ccTld" xml:"ccTld"` TimeZones []string `json:"timeZones" yaml:"timeZones" xml:"timeZones>tz"` Languages []string `json:"languages" yaml:"languages" xml:"languages>lang"` Locales []string `json:"locales" yaml:"locales" xml:"locales>locale"` OtherAppsIds OtherAppsIds `json:"otherAppsIds" yaml:"otherAppsIds" xml:"otherAppsIds"` Keywords []string `json:"keywords" yaml:"keywords" xml:"keywords"` }
type CountryXml ¶
type CountryXml struct { XMLName xml.Name `xml:"country"` Index string `xml:"index,attr,omitempty"` Country OfficialName []LangStructXml `xml:"officialName>name"` Mottos MottosXml `xml:"mottos"` Flags FlagsXml `xml:"flags"` }
func CountryToXML ¶
func CountryToXML(country Country) CountryXml
type Currencies ¶
type Currencies []Currency
type CurrenciesXml ¶
type CurrenciesXml struct { XMLName xml.Name `xml:"currencies"` Currencies []CurrencyXml `xml:"currency"` }
type Currency ¶
type Currency struct { Name string `json:"name" yaml:"name" xml:"name"` IsoAlpha string `json:"isoAlpha" yaml:"isoAlpha" xml:"isoAlpha"` IsoNumber string `json:"isoNumber" yaml:"isoNumber" xml:"isoNumber"` Symbol *string `json:"symbol" yaml:"symbol" xml:"symbol,omitempty"` Decimal *int64 `json:"decimal" yaml:"decimal" xml:"decimal,omitempty"` }
type CurrencyXml ¶
type CurrencyXml struct { XMLName xml.Name `xml:"currency"` Index string `xml:"index,attr,omitempty"` Currency }
func CurrencyToXML ¶
func CurrencyToXML(currency Currency) CurrencyXml
type Enquiries ¶
type Enquiries struct { Index *string Select []string OrderBy OrderByStruct Interval IntervalStruct }
type GeoCodeReference ¶
type GeoCodeReference string
type GeoCodeResult ¶
type GeoCodeResult interface{}
type GeoSet ¶
type GeoSet struct { Name string `json:"name" yaml:"name" xml:"name"` InternalCode string `json:"internalCode" yaml:"internalCode" xml:"internalCode"` UnM49 *string `json:"unM49" yaml:"unM49" xml:"unM49"` Tags []string `json:"tags" yaml:"tags" xml:"tags>tag"` CountryCodes []string `json:"countryCodes" yaml:"countryCodes" xml:"countryCodes>cc"` }
type GeoSetXml ¶
type GeoSetXml struct { XMLName xml.Name `xml:"geoSet"` Index string `xml:"index,attr,omitempty"` GeoSet }
func GeoSetToXML ¶
type GeoSetsXml ¶
type IntervalStruct ¶
type LangStructXml ¶
type MottosXml ¶
type MottosXml struct {
Official []LangStructXml `json:"official" yaml:"official" xml:"official>motto"`
}
type OrderByStruct ¶
type OtherAppsIds ¶
type OtherAppsIds struct {
GeoNamesOrg *int64 `json:"geoNamesOrg" yaml:"geoNamesOrg" xml:"geoNamesOrg"`
}
type Settings ¶
type Settings struct {
Languages ConfigLanguages `json:"languages"`
}
type SettingsType ¶
type TransCountries ¶
type TransCountries map[string]TransCountry
type TransCountry ¶
type TransGeneric ¶
type TransGeneric map[string]TransGenericItem
type TransGenericItem ¶
type TransGenericItem struct {
Name string `json:"name"`
}
Click to show internal directories.
Click to hide internal directories.